Bug 192796 - Clean up IndexedDB files between tests
Summary: Clean up IndexedDB files between tests
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sihui Liu
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-12-17 20:31 PST by Sihui Liu
Modified: 2019-01-28 22:07 PST (History)
12 users (show)

See Also:


Attachments
Patch (11.15 KB, patch)
2018-12-17 20:37 PST, Sihui Liu
no flags Details | Formatted Diff | Diff
Patch (13.73 KB, patch)
2018-12-18 11:17 PST, Sihui Liu
no flags Details | Formatted Diff | Diff
Patch for landing (13.69 KB, patch)
2018-12-18 15:19 PST, Sihui Liu
no flags Details | Formatted Diff | Diff
Patch (10.11 KB, patch)
2019-01-22 15:12 PST, Sihui Liu
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews114 for mac-highsierra (2.21 MB, application/zip)
2019-01-22 17:30 PST, EWS Watchlist
no flags Details
Patch (10.30 KB, patch)
2019-01-22 17:32 PST, Sihui Liu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sihui Liu 2018-12-17 20:31:25 PST
We should clear IDB files between tests to give each test a clean state.
Comment 1 Sihui Liu 2018-12-17 20:37:53 PST
Created attachment 357526 [details]
Patch
Comment 2 Alex Christensen 2018-12-18 09:21:41 PST
Comment on attachment 357526 [details]
Patch

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

> Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp:520
> +void WKWebsiteDataStoreRemoveAllIndexedDatabasesSync(WKWebsiteDataStoreRef dataStoreRef, void* context, WKWebsiteDataStoreRemoveAllIndexedDatabasesCallback callback)

Why does this have "Sync" in its name?
Comment 3 Geoffrey Garen 2018-12-18 09:54:50 PST
Comment on attachment 357526 [details]
Patch

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

>> Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp:520
>> +void WKWebsiteDataStoreRemoveAllIndexedDatabasesSync(WKWebsiteDataStoreRef dataStoreRef, void* context, WKWebsiteDataStoreRemoveAllIndexedDatabasesCallback callback)
> 
> Why does this have "Sync" in its name?

Since this function uses a callback, it is not synchronous. So, let's call this "WKWebsiteDataStoreRemoveAllIndexedDatabases".
Comment 4 Sihui Liu 2018-12-18 09:57:16 PST
(In reply to Geoffrey Garen from comment #3)
> Comment on attachment 357526 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=357526&action=review
> 
> >> Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp:520
> >> +void WKWebsiteDataStoreRemoveAllIndexedDatabasesSync(WKWebsiteDataStoreRef dataStoreRef, void* context, WKWebsiteDataStoreRemoveAllIndexedDatabasesCallback callback)
> > 
> > Why does this have "Sync" in its name?
> 
> Since this function uses a callback, it is not synchronous. So, let's call
> this "WKWebsiteDataStoreRemoveAllIndexedDatabases".

Yes, I guess because it's used with runUntil so I used sync.. Will change to WKWebsiteDataStoreRemoveAllIndexedDatabases
Comment 5 Sihui Liu 2018-12-18 11:17:44 PST
Created attachment 357586 [details]
Patch
Comment 6 Geoffrey Garen 2018-12-18 12:54:10 PST
Comment on attachment 357586 [details]
Patch

r=me
Comment 7 Sihui Liu 2018-12-18 15:19:08 PST
Created attachment 357620 [details]
Patch for landing
Comment 8 WebKit Commit Bot 2018-12-18 15:56:32 PST
Comment on attachment 357620 [details]
Patch for landing

Clearing flags on attachment: 357620

Committed r239358: <https://trac.webkit.org/changeset/239358>
Comment 9 WebKit Commit Bot 2018-12-18 15:56:34 PST
All reviewed patches have been landed.  Closing bug.
Comment 10 Radar WebKit Bug Importer 2018-12-18 15:57:24 PST
<rdar://problem/46824999>
Comment 11 Truitt Savell 2018-12-19 09:21:46 PST
It appears that after https://trac.webkit.org/changeset/239358/webkit

we are seeing a large number of imported/w3c/web-platform-tests/IndexedDB/

tests crashing on debug wk2 bots with asserts. 

Sample log:
https://build.webkit.org/results/Apple%20Mojave%20Debug%20WK2%20(Tests)/r239376%20(954)/imported/w3c/web-platform-tests/IndexedDB/close-in-upgradeneeded-crash-log.txt

results from Mojave Debug Wk2:
https://build.webkit.org/results/Apple%20Mojave%20Debug%20WK2%20(Tests)/r239376%20(954)/results.html
Comment 12 Truitt Savell 2018-12-19 10:43:52 PST
also looks like this caused two perf test failures: 

https://build.webkit.org/builders/Apple%20Sierra%20Release%20WK2%20%28Perf%29/builds/2381
Comment 13 Truitt Savell 2018-12-19 10:57:14 PST
Reverted r239358 for reason:

Revision caused imported/w3c/web-platform-tests/IndexedDB/ to crash on Debug bots

Committed r239380: <https://trac.webkit.org/changeset/239380>
Comment 14 Truitt Savell 2018-12-19 11:02:24 PST
rolled out in https://trac.webkit.org/changeset/239380/webkit
Comment 15 Sihui Liu 2019-01-22 15:12:49 PST
Created attachment 359785 [details]
Patch
Comment 16 Geoffrey Garen 2019-01-22 15:32:01 PST
Comment on attachment 359785 [details]
Patch

r=me
Comment 17 EWS Watchlist 2019-01-22 17:30:02 PST
Comment on attachment 359785 [details]
Patch

Attachment 359785 [details] did not pass mac-debug-ews (mac):
Output: https://webkit-queues.webkit.org/results/10847394

New failing tests:
imported/w3c/web-platform-tests/IndexedDB/idbfactory-open-request-error.html
Comment 18 EWS Watchlist 2019-01-22 17:30:04 PST
Created attachment 359820 [details]
Archive of layout-test-results from ews114 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 19 Sihui Liu 2019-01-22 17:32:41 PST
Created attachment 359821 [details]
Patch
Comment 20 Geoffrey Garen 2019-01-22 21:03:34 PST
Comment on attachment 359821 [details]
Patch

r=me
Comment 21 WebKit Commit Bot 2019-01-23 13:39:24 PST
Comment on attachment 359821 [details]
Patch

Clearing flags on attachment: 359821

Committed r240358: <https://trac.webkit.org/changeset/240358>
Comment 22 WebKit Commit Bot 2019-01-23 13:39:26 PST
All reviewed patches have been landed.  Closing bug.