WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
181546
WKWebView.ClearAppCache is a flaky API test failure on High Sierra.
https://bugs.webkit.org/show_bug.cgi?id=181546
Summary
WKWebView.ClearAppCache is a flaky API test failure on High Sierra.
Matt Lewis
Reported
2018-01-11 11:21:12 PST
WKWebView.ClearAppCache is a flaky API failure on High Sierra. build:
https://build.webkit.org/builders/Apple%20High%20Sierra%20Release%20WK1%20(Tests)/builds/2565/steps/run-api-tests/logs/stdio
https://build.webkit.org/builders/Apple%20High%20Sierra%20Release%20WK1%20(Tests)/builds/2565
Error in log: FAIL WKWebView.ClearAppCache /Volumes/Data/slave/highsierra-release/build/Tools/TestWebKitAPI/Tests/WebKitCocoa/LocalStorageClear.mm:183 Value of: 1ul Actual: 1 Expected: websiteDataRecords.count Which is: 2 /Volumes/Data/slave/highsierra-release/build/Tools/TestWebKitAPI/Tests/WebKitCocoa/LocalStorageClear.mm:185 Value of: [record.displayName UTF8String] Actual: "Local documents on your computer" Expected: "127.0.0.1" /Volumes/Data/slave/highsierra-release/build/Tools/TestWebKitAPI/Tests/WebKitCocoa/LocalStorageClear.mm:187 Value of: [type UTF8String] Actual: "WKWebsiteDataTypeLocalStorage" Expected: [WKWebsiteDataTypeOfflineWebApplicationCache UTF8String] Which is: "WKWebsiteDataTypeOfflineWebApplicationCache" I was able to reproduce the failure locally by running this twice: run-api-tests --debug WKWebView --verbose The crash claimed it to be a simulated crash.
Attachments
Patch
(2.06 KB, patch)
2018-03-19 15:55 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2018-01-11 11:22:21 PST
<
rdar://problem/36444327
>
Alexey Proskuryakov
Comment 2
2018-01-11 20:13:40 PST
I believe that we've been seeing it very frequently on El Capitan as well.
Chris Dumez
Comment 3
2018-03-19 14:59:19 PDT
(In reply to Alexey Proskuryakov from
comment #2
)
> I believe that we've been seeing it very frequently on El Capitan as well.
The type of data that remains is localStorage. It remains after the initial call to remove all data :/
Chris Dumez
Comment 4
2018-03-19 15:25:31 PDT
LocalStorageDatabaseTracker::deleteDatabasesModifiedSince() chooses not to delete file__0 because it is not able to compute the last modified time for path: /Users/chris/Library/WebKit/TestWebKitAPI/WebsiteData/LocalStorage/file__0.localstorage
Chris Dumez
Comment 5
2018-03-19 15:26:15 PDT
(In reply to Chris Dumez from
comment #4
)
> LocalStorageDatabaseTracker::deleteDatabasesModifiedSince() chooses not to > delete file__0 because it is not able to compute the last modified time for > path: > /Users/chris/Library/WebKit/TestWebKitAPI/WebsiteData/LocalStorage/file__0. > localstorage
/Users/chris/Library/WebKit/TestWebKitAPI/WebsiteData/LocalStorage/file__0.localstorage does not exist on my machine but I have /Users/chris/Library/WebKit/TestWebKitAPI/WebsiteData/LocalStorage/file__0.localstorage-wal !
Chris Dumez
Comment 6
2018-03-19 15:35:02 PDT
I suspect it could be related to LocalStorageDatabaseTracker::deleteAllDatabases() using FileSystem::deleteFile() instead of SQLiteFileSystem::deleteDatabaseFile().
Chris Dumez
Comment 7
2018-03-19 15:39:46 PDT
(In reply to Chris Dumez from
comment #6
)
> I suspect it could be related to > LocalStorageDatabaseTracker::deleteAllDatabases() using > FileSystem::deleteFile() instead of SQLiteFileSystem::deleteDatabaseFile().
Not it, LocalStorageDatabaseTracker::deleteAllDatabases() appears to be unused.
Chris Dumez
Comment 8
2018-03-19 15:41:33 PDT
Looks like we correctly use SQLiteFileSystem::deleteDatabaseFile() in all places. So I suspect the issue could be that we are deleting database files while the database is still open. I guess Sqlite could end up later writing a -wal file as a result.
Chris Dumez
Comment 9
2018-03-19 15:43:42 PDT
e.g. LocalStorageDatabaseTracker::removeDatabaseWithOriginIdentifier() seems to delete the database file while it is open.
Chris Dumez
Comment 10
2018-03-19 15:55:28 PDT
Created
attachment 336082
[details]
Patch
WebKit Commit Bot
Comment 11
2018-03-19 19:34:29 PDT
Comment on
attachment 336082
[details]
Patch Clearing flags on attachment: 336082 Committed
r229736
: <
https://trac.webkit.org/changeset/229736
>
WebKit Commit Bot
Comment 12
2018-03-19 19:34:31 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug