Flaky tests: storage/indexeddb/idbdatabase-{create,delete}ObjectStore-exception-order.html |
|||
Issue description
FAIL IDBDatabase.createObjectStore exception order: InvalidStateError vs. TransactionInactiveError assert_throws: "running an upgrade transaction" check (InvalidStateError) should precede "not active" check (TransactionInactiveError) function "() => { db.createObjectStore('s2'); }" threw object "TransactionInactiveError: Failed to execute 'createObjectStore' on 'IDBDatabase': The transaction has finished." that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
It looks like this is a race because we gate the "running an upgrade transaction" on whether or not IDBDatabase::m_versionChangeTransaction is set or not. We don't clear it synchronously from IDBTransaction::abort(); we wait until the asynchronous IDBTransaction::onAbort() comes through from the back end acknowledging the abort.
We could look on clearing it synchronously in IDBTransaction::abort(), or change the test be more than if (!m_versionChangeTransaction) (i.e. check the TX's state too)
,
Oct 28 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1e8c7e5674f3c7899652c8073d2f52c8bb693c47 commit 1e8c7e5674f3c7899652c8073d2f52c8bb693c47 Author: jsbell <jsbell@chromium.org> Date: Fri Oct 28 19:05:26 2016 Mark a couple IndexedDB tests as flaky BUG= 657968 TBR=phoglund@chromium.org,pwnall@chromium.org NOTRY=true Review-Url: https://codereview.chromium.org/2461763002 Cr-Commit-Position: refs/heads/master@{#428450} [modify] https://crrev.com/1e8c7e5674f3c7899652c8073d2f52c8bb693c47/third_party/WebKit/LayoutTests/TestExpectations
,
Dec 1 2016
,
Dec 1 2016
I used the following commands to get the flaky behavior, after removing the relevant TestExpectations lines. third_party/WebKit/Tools/Scripts/run-webkit-tests storage/indexeddb/idbdatabase-createObjectStore-exception-order.html -t Default --repeat-each=200 third_party/WebKit/Tools/Scripts/run-webkit-tests storage/indexeddb/idbdatabase-deleteObjectStore-exception-order.html -t Default --repeat-each=200 Testing note for future me: I got failures (~40% for createObjectStore, ~1% for deleteObjectStore) on Linux, but no failures on Mac.
,
Dec 9 2016
Step 10 in the "running an upgrade transaction" algorithm [2] says "When transaction is finished, immediately set request’s transaction to null. This must be done in the same task as the task firing the complete or abort event, but after the event has been fired." I interpret this to mean that before the abort element is fired, the transaction is still running. My interpretation is reflected in http://crrev.com/2538343002 [2] https://w3c.github.io/IndexedDB/#upgrade-transaction-steps
,
Dec 9 2016
I started working on a test that checks all the lifecycle stages. We might not be following (my interpretation of) the standard either. http://crrev.com/2556373003
,
Dec 13 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c6c814b48c0ec98a495202b17ce55a0aef8364d4 commit c6c814b48c0ec98a495202b17ce55a0aef8364d4 Author: pwnall <pwnall@chromium.org> Date: Tue Dec 13 01:10:32 2016 De-flake IndexedDB layout tests. Per the IndexedDB specification, a versionchange transaction is running until the open request's transaction member is set to null, which should happen (synchronously) after the onabort() event handler is called. Therefore, tests can only assume that a transaction stopped running after the onabort event handler has occurred. BUG= 657968 Review-Url: https://codereview.chromium.org/2538343002 Cr-Commit-Position: refs/heads/master@{#437974} [modify] https://crrev.com/c6c814b48c0ec98a495202b17ce55a0aef8364d4/third_party/WebKit/LayoutTests/TestExpectations [modify] https://crrev.com/c6c814b48c0ec98a495202b17ce55a0aef8364d4/third_party/WebKit/LayoutTests/storage/indexeddb/idbdatabase-createObjectStore-exception-order.html [modify] https://crrev.com/c6c814b48c0ec98a495202b17ce55a0aef8364d4/third_party/WebKit/LayoutTests/storage/indexeddb/idbdatabase-deleteObjectStore-exception-order.html
,
Jan 5 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/676555942ebaa74b60776e67874efd0b1f9a5779 commit 676555942ebaa74b60776e67874efd0b1f9a5779 Author: pwnall <pwnall@chromium.org> Date: Thu Jan 05 08:57:38 2017 Tests for exceptions related to IndexedDB upgrade transaction lifecycle. BUG= 657968 Review-Url: https://codereview.chromium.org/2556373003 Cr-Commit-Position: refs/heads/master@{#441614} [add] https://crrev.com/676555942ebaa74b60776e67874efd0b1f9a5779/third_party/WebKit/LayoutTests/storage/indexeddb/resources/support-promises.js [add] https://crrev.com/676555942ebaa74b60776e67874efd0b1f9a5779/third_party/WebKit/LayoutTests/storage/indexeddb/upgrade-transaction-lifecycle-backend-aborted.html [add] https://crrev.com/676555942ebaa74b60776e67874efd0b1f9a5779/third_party/WebKit/LayoutTests/storage/indexeddb/upgrade-transaction-lifecycle-committed.html [add] https://crrev.com/676555942ebaa74b60776e67874efd0b1f9a5779/third_party/WebKit/LayoutTests/storage/indexeddb/upgrade-transaction-lifecycle-microtasks.html [add] https://crrev.com/676555942ebaa74b60776e67874efd0b1f9a5779/third_party/WebKit/LayoutTests/storage/indexeddb/upgrade-transaction-lifecycle-user-aborted.html
,
Jan 5 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by jsb...@chromium.org
, Oct 20 2016