New issue
Advanced search Search tips

Issue 736050 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

IndexedDB web-platform tests run out of quota sometimes.

Project Member Reported by qyears...@chromium.org, Jun 22 2017

Issue description

Many IndexedDB tests imported in https://chromium-review.googlesource.com/c/543695/ fail sometimes.

Examples of results after rebaselining:

https://storage.googleapis.com/chromium-layout-test-archives/linux_trusty_blink_rel/11216/layout-test-results/test-expectations.html

Since the results are not stable after rebaselining, I suspect that they might be flaky.
 

Comment 1 by jsb...@chromium.org, Jun 22 2017

Cc: pwnall@chromium.org
Components: Blink>Storage>IndexedDB
Owner: dmu...@chromium.org
Status: Assigned (was: Unconfirmed)
I don't think these are new tests, something has just introduced flakiness.

dmurph, pwnall - can you investigate?

Comment 2 by mek@chromium.org, Aug 8 2017

Labels: -Pri-3 Pri-2
I did a little bit of investigation, and it seems that all the failing tests (at least the ones that are failing for me locally) are failing with unexpected QuotaExceededErrors... Is this the tests not cleaning up properly, or us doing something wrong with quota?

Comment 3 by mek@chromium.org, Aug 8 2017

Summary: IndexedDB web-platform tests run out of quota sometimes. (was: New IndexedDB tests fail sometimes.)
Huh. that's not good at all.

Comment 5 by mek@chromium.org, Aug 8 2017

Cc: dpranke@chromium.org qyears...@chromium.org
My theory is that this is because testharness.js doesn't have any way to do async cleanup tasks. So while these indexeddb tests mostly try to call window.indexedDB.deleteDatabase on their databases, that is done from a completion_callback and there is nothing making sure the test runner actually waits for those tasks to finish.

So a couple of options:
1) teach testharness.js about async cleanup (something like https://github.com/w3c/web-platform-tests/issues/6075) and update the IDB tests to use that

2) Implement something like the storage clearing proposed in https://lists.w3.org/Archives/Public/public-test-infra/2017JanMar/0039.html and use that to mark all IDB tests as requiring storage cleared (although that discussion seems to have been about clearing storage before running a test, rather than after).

3) Add something to our testharnessreport.js to wait for cleaning up of IDB to complete. Not quite sure what that would look like though.

4) Something else?

Not sure what the easiest/most feasible thing to do is with our test running infrastructure.

Comment 6 by mek@chromium.org, Aug 8 2017

Actually this rabit hole goes way deeper. Of course it is an issue that tests can't clear up after themselves properly, but this is made worse because our test runner has a bug in its quota management:

LayoutTestContentBrowserClient::GetQuotaSettings (tries to) return a 1GB quota for all layout tests. That works fine for the first test you run, but then after that first test TestRunner::Reset comes by and overwrites the previously 1GB quota with a 5MB quota instead (trying to "reset the quota to the default"). And that much lower 5MB quota then means that tests are running out of quota much quicker than they normally would.

The functionality in TestRunner to overwrite the quota at all (which annoyingly is documented as just effecting websql quota, but actually effects all quota) is only used in one test, and that one test doesn't even seem to care about the quota it has. So probably completely ripping out the testRunner.setDatabaseQuota functionality would be by far the easiest work-around here.
Project Member

Comment 7 by bugdroid1@chromium.org, Aug 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5cee91c52bda550ec91d38546aff495769927c45

commit 5cee91c52bda550ec91d38546aff495769927c45
Author: Marijn Kruisselbrink <mek@chromium.org>
Date: Thu Aug 10 15:58:35 2017

Reset quota to default values, rather than to 5MB in TestRunner::Reset.

While this doesn't fix the bug that IndexedDB tests slowly leak data, it
should at least increase the quota enough to not cause later tests to
run out of quota.

Bug: 736050
Change-Id: I39148979947cbff5b25b359276a03de69e0b9e85
Reviewed-on: https://chromium-review.googlesource.com/608621
Reviewed-by: Peter Beverloo <peter@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#493404}
[modify] https://crrev.com/5cee91c52bda550ec91d38546aff495769927c45/content/shell/browser/layout_test/layout_test_message_filter.cc
[modify] https://crrev.com/5cee91c52bda550ec91d38546aff495769927c45/content/shell/test_runner/test_runner.cc
[modify] https://crrev.com/5cee91c52bda550ec91d38546aff495769927c45/content/shell/test_runner/web_test_delegate.h
[modify] https://crrev.com/5cee91c52bda550ec91d38546aff495769927c45/third_party/WebKit/LayoutTests/TestExpectations
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/idbcursor_continue_index3-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/idbcursor_iterating_objectstore2-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/idbindex_count4-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/interleaved-cursors-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/key_valid-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/request_bubble-and-capture-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/transaction-abort-multiple-metadata-revert-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/android/external/wpt/IndexedDB/idbobjectstore_add2-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/linux/external/wpt/IndexedDB/idbobjectstore_deleted-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/linux/external/wpt/IndexedDB/keypath-exceptions-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac-mac10.10/external/wpt/IndexedDB/idbcursor_advance_index-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac-mac10.10/external/wpt/IndexedDB/idbcursor_continue_index2-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac-mac10.10/external/wpt/IndexedDB/idbcursor_continue_index3-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac-mac10.10/external/wpt/IndexedDB/idbcursor_update_index3-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac-mac10.10/external/wpt/IndexedDB/idbobjectstore_add6-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac-mac10.10/external/wpt/IndexedDB/idbobjectstore_put-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac-mac10.11/external/wpt/IndexedDB/idbcursor_delete_objectstore-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac-mac10.11/external/wpt/IndexedDB/idbobjectstore_getAll-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac-mac10.11/external/wpt/IndexedDB/idbobjectstore_openKeyCursor-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac-mac10.11/external/wpt/IndexedDB/idbobjectstore_put4-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac-mac10.11/external/wpt/IndexedDB/index_sort_order-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac-mac10.9/external/wpt/IndexedDB/idbcursor_delete_objectstore3-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac-mac10.9/external/wpt/IndexedDB/idbobjectstore_delete6-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac-retina/external/wpt/IndexedDB/idbcursor-continue-exception-order-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac-retina/external/wpt/IndexedDB/idbcursor_continue_invalid-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac-retina/external/wpt/IndexedDB/idbcursor_update_index3-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac-retina/external/wpt/IndexedDB/idbindex_get7-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac-retina/external/wpt/IndexedDB/idbobjectstore-rename-errors-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac-retina/external/wpt/IndexedDB/idbobjectstore_clear3-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac-retina/external/wpt/IndexedDB/idbobjectstore_put6-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac-retina/external/wpt/IndexedDB/index_sort_order-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac-retina/external/wpt/IndexedDB/transaction-create_in_versionchange-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac-retina/external/wpt/IndexedDB/value_recursive-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac/external/wpt/IndexedDB/idbcursor_delete_objectstore3-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac/external/wpt/IndexedDB/idbcursor_update_index8-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac/external/wpt/IndexedDB/idbcursor_update_objectstore2-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac/external/wpt/IndexedDB/idbindex-rename-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac/external/wpt/IndexedDB/idbindex_openCursor2-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac/external/wpt/IndexedDB/idbobjectstore-rename-store-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac/external/wpt/IndexedDB/idbobjectstore_add6-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac/external/wpt/IndexedDB/idbobjectstore_deleted-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac/external/wpt/IndexedDB/idbobjectstore_getAllKeys-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac/external/wpt/IndexedDB/keygenerator-overflow-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac/external/wpt/IndexedDB/request-event-ordering-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/mac/external/wpt/IndexedDB/upgrade-transaction-lifecycle-backend-aborted-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/win/external/wpt/IndexedDB/idbcursor-continuePrimaryKey-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/win/external/wpt/IndexedDB/idbcursor_delete_objectstore-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/win/external/wpt/IndexedDB/idbcursor_delete_objectstore2-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/win/external/wpt/IndexedDB/idbobjectstore_add7-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/win/external/wpt/IndexedDB/idbobjectstore_add8-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/win/external/wpt/IndexedDB/idbobjectstore_put5-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/win/external/wpt/IndexedDB/idbobjectstore_put6-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/win/external/wpt/IndexedDB/index_sort_order-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/win/external/wpt/IndexedDB/keygenerator-explicit-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/win/external/wpt/IndexedDB/transaction-create_in_versionchange-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/win7/external/wpt/IndexedDB/idbcursor_continue_index2-expected.txt
[delete] https://crrev.com/9e6e37448af8c37f6d060355652f6975c785205f/third_party/WebKit/LayoutTests/platform/win7/external/wpt/IndexedDB/request-event-ordering-expected.txt
[modify] https://crrev.com/5cee91c52bda550ec91d38546aff495769927c45/third_party/WebKit/LayoutTests/storage/websql/open-database-creation-callback-expected.txt
[modify] https://crrev.com/5cee91c52bda550ec91d38546aff495769927c45/third_party/WebKit/LayoutTests/storage/websql/open-database-creation-callback.html
[modify] https://crrev.com/5cee91c52bda550ec91d38546aff495769927c45/third_party/WebKit/LayoutTests/storage/websql/sql-error-codes.js

Comment 8 by dmu...@chromium.org, May 15 2018

Labels: -Pri-2 Pri-3
Lowering priority since this seems to have stymied the issue.
Cc: dmu...@chromium.org
Owner: ----

Sign in to add a comment