RESOLVED FIXED 148205
Regression(r188698): http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html is very flaky
https://bugs.webkit.org/show_bug.cgi?id=148205
Summary Regression(r188698): http/tests/cache/disk-cache/disk-cache-revalidation-new-...
Attachments
Patch (4.30 KB, patch)
2015-08-20 20:31 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2015-08-20 12:56:58 PDT
I can reproduce the flakiness locally. Looking at this.
Chris Dumez
Comment 2 2015-08-20 13:53:34 PDT
Chris Dumez
Comment 3 2015-08-20 15:35:28 PDT
Looks like this became flaky due to <http://trac.webkit.org/changeset/188640>. I am still working to understand why.
Chris Dumez
Comment 4 2015-08-20 15:44:26 PDT
Reopening to investigate the real cause of the regression.
Chris Dumez
Comment 5 2015-08-20 16:34:21 PDT
So it looks like what is happening is that we get a 304 response in NetworkResourceLoader::didReceiveResponseAsync() / NetworkResourceLoader::didFinishLoading() but m_cacheEntryForValidation is null. As a result, we will call store() with that 304 response instead of updating an existing cache entry. Since 304 is not cacheable, makeCacheDecision() will refuse to cache and we will delete the existing entry in the cache (because we think it is no longer cacheable). My assumption is that those are 304 responses to revalidation's triggered by our MemoryCache instead of the disk cache. This is why m_cacheEntryForValidation is null. I think that even though the resource was revalidated by the memory cache, we should probably still update it in the disk cache if it exists.
Chris Dumez
Comment 6 2015-08-20 20:31:56 PDT
Antti Koivisto
Comment 7 2015-08-21 03:33:00 PDT
Comment on attachment 259580 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=259580&action=review It is encouraging that tests caught this subtle bug. > Source/WebKit2/ChangeLog:14 > + Longer term, we should probably update the entry in the disk cache (if > + it exists) when it is revalidated by the memory cache. Currently, Yeah.
Chris Dumez
Comment 8 2015-08-21 09:19:00 PDT
Comment on attachment 259580 [details] Patch Clearing flags on attachment: 259580 Committed r188755: <http://trac.webkit.org/changeset/188755>
Chris Dumez
Comment 9 2015-08-21 09:19:04 PDT
All reviewed patches have been landed. Closing bug.
Tim Horton
Comment 10 2015-08-21 11:33:58 PDT
(In reply to comment #7) > Comment on attachment 259580 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=259580&action=review > > It is encouraging that tests caught this subtle bug. Yes! That is awesome.
Note You need to log in before you can comment on or make changes to this bug.