Bug 181887 - DOMCache data sometimes not properly removed when clearing data for a given origin
Summary: DOMCache data sometimes not properly removed when clearing data for a given o...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Service Workers (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-01-19 15:36 PST by Chris Dumez
Modified: 2018-01-20 02:43 PST (History)
6 users (show)

See Also:


Attachments
Patch (2.96 KB, patch)
2018-01-19 15:40 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-sierra (2.24 MB, application/zip)
2018-01-19 16:30 PST, EWS Watchlist
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2018-01-19 15:36:05 PST
DOMCache data sometimes not properly removed when clearing data for a given origin.
Comment 1 Chris Dumez 2018-01-19 15:36:27 PST
<rdar://problem/36671239>
Comment 2 Chris Dumez 2018-01-19 15:40:12 PST
Created attachment 331798 [details]
Patch
Comment 3 EWS Watchlist 2018-01-19 16:30:29 PST
Comment on attachment 331798 [details]
Patch

Attachment 331798 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/6142359

New failing tests:
imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-a-bitrate.html
Comment 4 EWS Watchlist 2018-01-19 16:30:30 PST
Created attachment 331812 [details]
Archive of layout-test-results from ews101 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 5 youenn fablet 2018-01-20 00:44:38 PST
Comment on attachment 331798 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=331798&action=review

> Source/WebKit/ChangeLog:15
> +        generated by cachesRootPath(*folderOrigin) differed from the actual folder path

Either the salt is different or the stored data is corrupted.
Maybe there was a conflict with cached data stored by a WebKit that was not partitioning based on ClientOrigin?
We probably should add a version number like we did for service worker paths.

> Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp:423
> +            m_ioQueue->dispatch([path = folderPath.isolatedCopy(), taskHandler = WTFMove(taskHandler)] {

Can you add an ASSERT(folderPath == cachesRootPath(*folderOrigin)) ?
Comment 6 youenn fablet 2018-01-20 00:57:35 PST
(In reply to youenn fablet from comment #5)
> Comment on attachment 331798 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=331798&action=review
> 
> > Source/WebKit/ChangeLog:15
> > +        generated by cachesRootPath(*folderOrigin) differed from the actual folder path
> 
> Either the salt is different or the stored data is corrupted.
> Maybe there was a conflict with cached data stored by a WebKit that was not
> partitioning based on ClientOrigin?
> We probably should add a version number like we did for service worker paths.
> 
> > Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp:423
> > +            m_ioQueue->dispatch([path = folderPath.isolatedCopy(), taskHandler = WTFMove(taskHandler)] {
> 
> Can you add an ASSERT(folderPath == cachesRootPath(*folderOrigin)) ?

Let's do that as a follow-up.
Landing patch as is for now.
Comment 7 WebKit Commit Bot 2018-01-20 02:43:42 PST
Comment on attachment 331798 [details]
Patch

Clearing flags on attachment: 331798

Committed r227269: <https://trac.webkit.org/changeset/227269>
Comment 8 WebKit Commit Bot 2018-01-20 02:43:44 PST
All reviewed patches have been landed.  Closing bug.