Bug 199818 - IndexedDB: error in starting version change transaction may be neglected
Summary: IndexedDB: error in starting version change transaction may be neglected
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: 2019-07-15 17:34 PDT by Sihui Liu
Modified: 2019-07-19 11:06 PDT (History)
8 users (show)

See Also:


Attachments
Patch (10.05 KB, patch)
2019-07-15 17:57 PDT, Sihui Liu
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-highsierra (3.19 MB, application/zip)
2019-07-15 19:13 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews104 for mac-highsierra-wk2 (2.90 MB, application/zip)
2019-07-15 19:21 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews112 for mac-highsierra (2.86 MB, application/zip)
2019-07-15 19:33 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews125 for ios-simulator-wk2 (2.81 MB, application/zip)
2019-07-15 19:58 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews210 for win-future (14.00 MB, application/zip)
2019-07-15 21:32 PDT, EWS Watchlist
no flags Details
Patch (6.66 KB, patch)
2019-07-16 15:29 PDT, Sihui Liu
no flags Details | Formatted Diff | Diff
Patch for landing (6.89 KB, patch)
2019-07-17 10:07 PDT, Sihui Liu
no flags Details | Formatted Diff | Diff
Patch (7.55 KB, patch)
2019-07-18 17:10 PDT, 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 2019-07-15 17:34:17 PDT
For version change transaction, IDBServer doesn't wait the result of beginTransaction from the background thread before giving the IDBClient the result of open request.
In this case, we could fail to update version number of IDBDatabaseInfo.
Comment 1 Sihui Liu 2019-07-15 17:57:41 PDT
Created attachment 374175 [details]
Patch
Comment 2 EWS Watchlist 2019-07-15 19:13:06 PDT
Comment on attachment 374175 [details]
Patch

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

New failing tests:
storage/indexeddb/intversion-long-queue-private.html
storage/indexeddb/intversion-long-queue.html
Comment 3 EWS Watchlist 2019-07-15 19:13:07 PDT
Created attachment 374181 [details]
Archive of layout-test-results from ews101 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 4 EWS Watchlist 2019-07-15 19:21:34 PDT
Comment on attachment 374175 [details]
Patch

Attachment 374175 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/12747000

New failing tests:
storage/indexeddb/intversion-long-queue-private.html
storage/indexeddb/intversion-long-queue.html
Comment 5 EWS Watchlist 2019-07-15 19:21:36 PDT
Created attachment 374182 [details]
Archive of layout-test-results from ews104 for mac-highsierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-highsierra-wk2  Platform: Mac OS X 10.13.6
Comment 6 EWS Watchlist 2019-07-15 19:33:24 PDT
Comment on attachment 374175 [details]
Patch

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

New failing tests:
storage/indexeddb/intversion-long-queue-private.html
storage/indexeddb/intversion-long-queue.html
Comment 7 EWS Watchlist 2019-07-15 19:33:26 PDT
Created attachment 374183 [details]
Archive of layout-test-results from ews112 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews112  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 8 EWS Watchlist 2019-07-15 19:58:11 PDT
Comment on attachment 374175 [details]
Patch

Attachment 374175 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/12747052

New failing tests:
storage/indexeddb/intversion-long-queue-private.html
storage/indexeddb/intversion-long-queue.html
Comment 9 EWS Watchlist 2019-07-15 19:58:13 PDT Comment hidden (obsolete)
Comment 10 EWS Watchlist 2019-07-15 21:32:12 PDT
Comment on attachment 374175 [details]
Patch

Attachment 374175 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/12747715

New failing tests:
storage/indexeddb/intversion-long-queue-private.html
storage/indexeddb/intversion-long-queue.html
Comment 11 EWS Watchlist 2019-07-15 21:32:14 PDT
Created attachment 374191 [details]
Archive of layout-test-results from ews210 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews210  Port: win-future  Platform: CYGWIN_NT-10.0-17763-3.0.5-338.x86_64-x86_64-64bit
Comment 12 Sihui Liu 2019-07-16 15:29:10 PDT
Created attachment 374250 [details]
Patch
Comment 13 Brady Eidson 2019-07-16 16:28:57 PDT
Comment on attachment 374250 [details]
Patch

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

> Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp:655
> +    auto operation = WTFMove(m_currentOpenDBRequest);

If you make an `IDBResultData result` after 655...

> Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp:661
> +        operation->connection().didOpenDatabase(result);

This line and 666 are the same, can be moved out if we make a result variable before the if

> Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp:666
> +        operation->connection().didOpenDatabase(result);

This line and 661 are the same, can be moved out if we make a result variable before the if
Comment 14 Sihui Liu 2019-07-16 16:51:51 PDT
<rdar://problem/52925738>
Comment 15 Sihui Liu 2019-07-17 10:07:36 PDT
Created attachment 374304 [details]
Patch for landing
Comment 16 WebKit Commit Bot 2019-07-17 13:27:36 PDT
Comment on attachment 374304 [details]
Patch for landing

Clearing flags on attachment: 374304

Committed r247531: <https://trac.webkit.org/changeset/247531>
Comment 17 WebKit Commit Bot 2019-07-17 13:27:38 PDT
All reviewed patches have been landed.  Closing bug.
Comment 18 Ryan Haddad 2019-07-18 16:31:43 PDT
Reverted r247531 for reason:

Caused multiple IndexedDB layout test crashes.

Committed r247624: <https://trac.webkit.org/changeset/247624>
Comment 19 Sihui Liu 2019-07-18 17:10:12 PDT
Created attachment 374431 [details]
Patch
Comment 20 WebKit Commit Bot 2019-07-19 11:06:15 PDT
Comment on attachment 374431 [details]
Patch

Clearing flags on attachment: 374431

Committed r247649: <https://trac.webkit.org/changeset/247649>
Comment 21 WebKit Commit Bot 2019-07-19 11:06:17 PDT
All reviewed patches have been landed.  Closing bug.