RESOLVED FIXED 195302
Check IDB quota usage through QuotaManager
https://bugs.webkit.org/show_bug.cgi?id=195302
Summary Check IDB quota usage through QuotaManager
youenn fablet
Reported 2019-03-04 17:20:22 PST
Check IDB quota usage through QuotaManager
Attachments
Patch (52.71 KB, patch)
2019-03-04 17:28 PST, youenn fablet
no flags
Patch (64.41 KB, patch)
2019-03-07 22:38 PST, youenn fablet
no flags
Archive of layout-test-results from ews106 for mac-highsierra-wk2 (975.54 KB, application/zip)
2019-03-07 23:31 PST, EWS Watchlist
no flags
Archive of layout-test-results from ews102 for mac-highsierra (2.49 MB, application/zip)
2019-03-07 23:43 PST, EWS Watchlist
no flags
Archive of layout-test-results from ews114 for mac-highsierra (2.69 MB, application/zip)
2019-03-08 00:29 PST, EWS Watchlist
no flags
Archive of layout-test-results from ews124 for ios-simulator-wk2 (1.11 MB, application/zip)
2019-03-08 04:31 PST, EWS Watchlist
no flags
Patch (88.39 KB, patch)
2019-03-10 15:27 PDT, youenn fablet
no flags
Archive of layout-test-results from ews103 for mac-highsierra (2.44 MB, application/zip)
2019-03-10 16:32 PDT, EWS Watchlist
no flags
Patch (89.29 KB, patch)
2019-03-10 18:31 PDT, youenn fablet
no flags
Patch (72.74 KB, patch)
2019-03-11 13:42 PDT, youenn fablet
no flags
Patch (72.77 KB, patch)
2019-03-11 16:47 PDT, youenn fablet
no flags
Patch (73.15 KB, patch)
2019-03-11 16:52 PDT, youenn fablet
no flags
Patch (77.56 KB, patch)
2019-03-11 21:09 PDT, youenn fablet
ews-watchlist: commit-queue-
Archive of layout-test-results from ews205 for win-future (12.92 MB, application/zip)
2019-03-12 02:11 PDT, EWS Watchlist
no flags
Patch (72.33 KB, patch)
2019-03-12 09:51 PDT, youenn fablet
no flags
Patch (72.54 KB, patch)
2019-03-12 11:42 PDT, youenn fablet
no flags
Updated according review comments (72.59 KB, patch)
2019-03-13 11:17 PDT, youenn fablet
no flags
youenn fablet
Comment 1 2019-03-04 17:28:16 PST
youenn fablet
Comment 2 2019-03-07 22:38:36 PST
EWS Watchlist
Comment 3 2019-03-07 22:40:18 PST
Attachment 363988 [details] did not pass style-queue: ERROR: Source/WebCore/Modules/indexeddb/server/IDBServer.cpp:62: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 1 in 31 files If any of these errors are false positives, please file a bug against check-webkit-style.
EWS Watchlist
Comment 4 2019-03-07 23:31:07 PST
Comment on attachment 363988 [details] Patch Attachment 363988 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/11424062 Number of test failures exceeded the failure limit.
EWS Watchlist
Comment 5 2019-03-07 23:31:09 PST
Created attachment 363990 [details] Archive of layout-test-results from ews106 for mac-highsierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-highsierra-wk2 Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 6 2019-03-07 23:43:22 PST
Comment on attachment 363988 [details] Patch Attachment 363988 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/11424110 New failing tests: storage/indexeddb/transaction-coordination-across-databases-private.html storage/indexeddb/transaction-coordination-across-databases.html storage/indexeddb/storage-limit.html storage/websql/open-database-while-transaction-in-progress.html storage/websql/transaction-database-expand-quota.html storage/indexeddb/storage-limit-2.html
EWS Watchlist
Comment 7 2019-03-07 23:43:23 PST
Created attachment 363991 [details] Archive of layout-test-results from ews102 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-highsierra Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 8 2019-03-08 00:29:05 PST
Comment on attachment 363988 [details] Patch Attachment 363988 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/11424175 Number of test failures exceeded the failure limit.
EWS Watchlist
Comment 9 2019-03-08 00:29:06 PST
Created attachment 363993 [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
EWS Watchlist
Comment 10 2019-03-08 04:31:31 PST
Comment on attachment 363988 [details] Patch Attachment 363988 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/11425298 New failing tests: imported/w3c/web-platform-tests/webrtc/simplecall-no-ssrcs.https.html
EWS Watchlist
Comment 11 2019-03-08 04:31:33 PST
Created attachment 364005 [details] Archive of layout-test-results from ews124 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews124 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
youenn fablet
Comment 12 2019-03-10 15:27:34 PDT
EWS Watchlist
Comment 13 2019-03-10 15:31:48 PDT
Attachment 364201 [details] did not pass style-queue: ERROR: Source/WebCore/Modules/indexeddb/server/IDBServer.cpp:62: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Tools/WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.mm:38: The parameter name "quota" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 2 in 44 files If any of these errors are false positives, please file a bug against check-webkit-style.
EWS Watchlist
Comment 14 2019-03-10 16:32:04 PDT
Created attachment 364211 [details] Archive of layout-test-results from ews103 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-highsierra Platform: Mac OS X 10.13.6
youenn fablet
Comment 15 2019-03-10 18:31:22 PDT
EWS Watchlist
Comment 16 2019-03-10 18:32:36 PDT
Attachment 364217 [details] did not pass style-queue: ERROR: Source/WebCore/Modules/indexeddb/server/IDBServer.cpp:62: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Tools/WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.mm:38: The parameter name "quota" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 2 in 45 files If any of these errors are false positives, please file a bug against check-webkit-style.
youenn fablet
Comment 17 2019-03-11 13:42:33 PDT
EWS Watchlist
Comment 18 2019-03-11 13:45:41 PDT
Attachment 364283 [details] did not pass style-queue: ERROR: Source/WebCore/Modules/indexeddb/server/IDBServer.cpp:62: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 1 in 32 files If any of these errors are false positives, please file a bug against check-webkit-style.
youenn fablet
Comment 19 2019-03-11 16:47:15 PDT
EWS Watchlist
Comment 20 2019-03-11 16:49:33 PDT
Attachment 364308 [details] did not pass style-queue: ERROR: Source/WebCore/Modules/indexeddb/server/IDBServer.cpp:62: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 1 in 32 files If any of these errors are false positives, please file a bug against check-webkit-style.
youenn fablet
Comment 21 2019-03-11 16:52:27 PDT
EWS Watchlist
Comment 22 2019-03-11 16:54:31 PDT
Attachment 364310 [details] did not pass style-queue: ERROR: Source/WebCore/Modules/indexeddb/server/IDBServer.cpp:62: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 1 in 32 files If any of these errors are false positives, please file a bug against check-webkit-style.
youenn fablet
Comment 23 2019-03-11 21:09:25 PDT
EWS Watchlist
Comment 24 2019-03-11 21:12:33 PDT
Attachment 364345 [details] did not pass style-queue: ERROR: Source/WebCore/Modules/indexeddb/server/IDBServer.cpp:62: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 1 in 32 files If any of these errors are false positives, please file a bug against check-webkit-style.
EWS Watchlist
Comment 25 2019-03-12 02:11:38 PDT
Comment on attachment 364345 [details] Patch Attachment 364345 [details] did not pass win-ews (win): Output: https://webkit-queues.webkit.org/results/11470550 New failing tests: storage/indexeddb/storage-limit.html http/tests/IndexedDB/storage-limit.https.html
EWS Watchlist
Comment 26 2019-03-12 02:11:49 PDT
Created attachment 364368 [details] Archive of layout-test-results from ews205 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews205 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
youenn fablet
Comment 27 2019-03-12 09:51:41 PDT
EWS Watchlist
Comment 28 2019-03-12 09:54:18 PDT
Attachment 364395 [details] did not pass style-queue: ERROR: Source/WebCore/Modules/indexeddb/server/IDBServer.cpp:62: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 1 in 31 files If any of these errors are false positives, please file a bug against check-webkit-style.
youenn fablet
Comment 29 2019-03-12 11:42:20 PDT
EWS Watchlist
Comment 30 2019-03-12 11:44:23 PDT
Attachment 364418 [details] did not pass style-queue: ERROR: Source/WebCore/Modules/indexeddb/server/IDBServer.cpp:62: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 1 in 31 files If any of these errors are false positives, please file a bug against check-webkit-style.
youenn fablet
Comment 31 2019-03-12 14:02:49 PDT
Wincairo error seems unrelated.
youenn fablet
Comment 32 2019-03-13 09:20:28 PDT
ping review
Chris Dumez
Comment 33 2019-03-13 10:04:46 PDT
Comment on attachment 364418 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=364418&action=review Would be good if Brady could take a look but it seems fine. > Source/WebCore/Modules/indexeddb/server/IDBServer.cpp:703 > +void IDBServer::QuotaUser::clearSpaceUsed() I'd call it 'resetSpaceSpaced'. Clear makes it sound like it might actually remove files. > Source/WebCore/Modules/indexeddb/server/IDBServer.cpp:782 > + quotaManager->requestSpace(taskSize, [callback = WTFMove(callback)](auto decision) mutable { Doesn't this work? quotaManager->requestSpace(taskSize, WTFMove(callback)); > Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp:74 > + return [&server](PAL::SessionID, const auto& origin) { Seems risky to capture server by reference here given that you are not calling the lambda right away and leaving it up to the caller. If the caller were to store this lambda and dispatch then call it, we could crash.
youenn fablet
Comment 34 2019-03-13 10:53:21 PDT
Thanks for the review. (In reply to Chris Dumez from comment #33) > Comment on attachment 364418 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=364418&action=review > > Would be good if Brady could take a look but it seems fine. Sure, I'll wait to land this patch until this afternoon. > > Source/WebCore/Modules/indexeddb/server/IDBServer.cpp:703 > > +void IDBServer::QuotaUser::clearSpaceUsed() > > I'd call it 'resetSpaceSpaced'. Clear makes it sound like it might actually > remove files. OK > > Source/WebCore/Modules/indexeddb/server/IDBServer.cpp:782 > > + quotaManager->requestSpace(taskSize, [callback = WTFMove(callback)](auto decision) mutable { > > Doesn't this work? > > quotaManager->requestSpace(taskSize, WTFMove(callback)); Right. > > Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp:74 > > + return [&server](PAL::SessionID, const auto& origin) { > > Seems risky to capture server by reference here given that you are not > calling the lambda right away and leaving it up to the caller. If the caller > were to store this lambda and dispatch then call it, we could crash. Well InProcessIDBServer is passing *this in the IDBServer constructor and IDBServer keeps it as a reference so I thought that was fine. Looking more closely though, it seems that the *this reference might never be used in the case of InProcessIDBServer. I'll make InProcessIDBServer WeakPtr-able to make things stronger.
youenn fablet
Comment 35 2019-03-13 11:17:36 PDT
Created attachment 364551 [details] Updated according review comments
EWS Watchlist
Comment 36 2019-03-13 11:19:56 PDT
Attachment 364551 [details] did not pass style-queue: ERROR: Source/WebCore/Modules/indexeddb/server/IDBServer.cpp:62: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 1 in 31 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Commit Bot
Comment 37 2019-03-13 14:47:19 PDT
Comment on attachment 364551 [details] Updated according review comments Clearing flags on attachment: 364551 Committed r242911: <https://trac.webkit.org/changeset/242911>
WebKit Commit Bot
Comment 38 2019-03-13 14:47:21 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 39 2019-03-13 14:48:28 PDT
Shawn Roberts
Comment 40 2019-03-21 11:15:32 PDT
http/tests/security/cross-origin-indexeddb.html imported/blink/fast/text/output-isolate-at-end-of-line-crash.html legacy-animation-engine/imported/blink/fast/text/output-isolate-at-end-of-line-crash.html is crashing on Mac and iOS Sim Debug bots. Crashing started to happen after this revision. I cannot repro locally. Dashboard : https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=http%2Ftests%2Fsecurity%2Fcross-origin-indexeddb.html%20imported%2Fblink%2Ffast%2Ftext%2Foutput-isolate-at-end-of-line-crash.html%20legacy-animation-engine%2Fimported%2Fblink%2Ffast%2Ftext%2Foutput-isolate-at-end-of-line-crash.html Crash log : https://build.webkit.org/results/Apple%20Mojave%20Debug%20WK2%20(Tests)/r243285%20(2035)/http/tests/security/cross-origin-worker-indexeddb-crash-log.txt
Note You need to log in before you can comment on or make changes to this bug.