Bug 196120 - Crash at IDBDatabaseInfo::infoForExistingObjectStore and IDBObjectStoreInfo::addExistingIndex
Summary: Crash at IDBDatabaseInfo::infoForExistingObjectStore and IDBObjectStoreInfo::...
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-03-21 17:17 PDT by Sihui Liu
Modified: 2019-03-29 09:09 PDT (History)
9 users (show)

See Also:


Attachments
Patch (4.13 KB, patch)
2019-03-21 17:28 PDT, Sihui Liu
no flags Details | Formatted Diff | Diff
Patch (4.13 KB, patch)
2019-03-21 17:28 PDT, Sihui Liu
no flags Details | Formatted Diff | Diff
Patch (4.00 KB, patch)
2019-03-21 17:50 PDT, Sihui Liu
no flags Details | Formatted Diff | Diff
Patch for landing (4.06 KB, patch)
2019-03-27 17:51 PDT, Sihui Liu
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-cq-03 for mac-highsierra (2.47 MB, application/zip)
2019-03-27 18:55 PDT, WebKit Commit Bot
no flags Details
Patch for landing (4.07 KB, patch)
2019-03-28 11:39 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-03-21 17:17:58 PDT
Add release logging to help debug and early return to reduce the crash.
Comment 1 Sihui Liu 2019-03-21 17:20:47 PDT
<rdar://problem/39869767>
Comment 2 Sihui Liu 2019-03-21 17:28:15 PDT
Created attachment 365652 [details]
Patch
Comment 3 Sihui Liu 2019-03-21 17:28:53 PDT
Created attachment 365653 [details]
Patch
Comment 4 Ryosuke Niwa 2019-03-21 17:36:24 PDT
Comment on attachment 365653 [details]
Patch

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

> Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:1299
> +        RELEASE_LOG(IndexedDB, "%p - SQLiteIDBBackingStore::clearObjectStore: m_databaseInfo is null for database %s", this, m_identifier.databaseName().utf8().data());

Maybe use RELEASE_LOG_ERROR? I don't think we should log the database name though...
That doesn't sound right from privacy perspective.

> Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp:1003
> +        RELEASE_LOG(IndexedDB, "%p - UniqueIDBDatabase::performCreateIndex: m_backingStore is null for database %s", this, m_identifier.databaseName().utf8().data());

Ditto.

> Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp:1207
> +        RELEASE_LOG(IndexedDB, "%p - UniqueIDBDatabase::performPutOrAdd: m_backingStore is null for database %s", this, m_identifier.databaseName().utf8().data());

Ditto.
Comment 5 Ryosuke Niwa 2019-03-21 17:36:40 PDT
+Chris, Keith who knows about logging.
Comment 6 Sihui Liu 2019-03-21 17:50:07 PDT
Created attachment 365655 [details]
Patch
Comment 7 Brady Eidson 2019-03-27 10:30:34 PDT
Comment on attachment 365655 [details]
Patch

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

Agreed we can't put these names in release_log

But comments inline...

> Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp:1005
> +        error = IDBError(InvalidStateError, "Backing store is invalid"_s);

If this error said "backing store is invalid for call to createIndex", and the next one said...

> Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp:1209
> +        error = IDBError(InvalidStateError, "Backing store is invalid"_s);

... "backing store is invalid for call to put/add", and then you release_log_error'ed the error reason messages, then we'd at least be able to narrow down which of these cases is the one happening/happening-most-often
Comment 8 Sihui Liu 2019-03-27 17:51:37 PDT
Created attachment 366135 [details]
Patch for landing
Comment 9 WebKit Commit Bot 2019-03-27 18:55:32 PDT
Comment on attachment 366135 [details]
Patch for landing

Rejecting attachment 366135 [details] from commit-queue.

New failing tests:
fetch/fetch-worker-crash.html
Full output: https://webkit-queues.webkit.org/results/11690655
Comment 10 WebKit Commit Bot 2019-03-27 18:55:34 PDT
Created attachment 366142 [details]
Archive of layout-test-results from webkit-cq-03 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the commit-queue.
Bot: webkit-cq-03  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 11 Sihui Liu 2019-03-28 08:54:29 PDT
(In reply to WebKit Commit Bot from comment #10)
> Created attachment 366142 [details]
> Archive of layout-test-results from webkit-cq-03 for mac-highsierra
> 
> The attached test failures were seen while running run-webkit-tests on the
> commit-queue.
> Bot: webkit-cq-03  Port: mac-highsierra  Platform: Mac OS X 10.13.6

This patch is not the cause of this failure as it only adds some log and assertions in IDB.
Comment 12 WebKit Commit Bot 2019-03-28 11:05:34 PDT
Comment on attachment 366135 [details]
Patch for landing

Rejecting attachment 366135 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-03', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 366135, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Logging in as commit-queue@webkit.org...
Fetching: https://bugs.webkit.org/attachment.cgi?id=366135&action=edit
Fetching: https://bugs.webkit.org/show_bug.cgi?id=196120&ctype=xml&excludefield=attachmentdata
Processing 1 patch from 1 bug.
Updating working directory
Processing patch 366135 from bug 196120.
Fetching: https://bugs.webkit.org/attachment.cgi?id=366135
Failed to run "['git', 'svn', 'dcommit', '--rmdir']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	Source/WebCore/ChangeLog

ERROR from SVN:
Item is out of date: File '/trunk/Source/WebCore/ChangeLog' is out of date
W: 70d1ec54d9942358767916e365c50aa7e6262890 and refs/remotes/origin/master differ, using rebase:
:040000 040000 4948d8ccbf6a78aa184f64343a76eb4d01108f75 b9ef7f75288afb9bcc0683b2f0df21ca3a50a8b5 M	Source
Current branch master is up to date.
ERROR: Not all changes have been committed into SVN, however the committed
ones (if any) seem to be successfully integrated into the working tree.
Please see the above messages for details.


Failed to run "['git', 'svn', 'dcommit', '--rmdir']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	Source/WebCore/ChangeLog

ERROR from SVN:
Item is out of date: File '/trunk/Source/WebCore/ChangeLog' is out of date
W: 70d1ec54d9942358767916e365c50aa7e6262890 and refs/remotes/origin/master differ, using rebase:
:040000 040000 4948d8ccbf6a78aa184f64343a76eb4d01108f75 b9ef7f75288afb9bcc0683b2f0df21ca3a50a8b5 M	Source
Current branch master is up to date.
ERROR: Not all changes have been committed into SVN, however the committed
ones (if any) seem to be successfully integrated into the working tree.
Please see the above messages for details.


Failed to run "['git', 'svn', 'dcommit', '--rmdir']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit
Updating OpenSource
Current branch master is up to date.

Full output: https://webkit-queues.webkit.org/results/11692701
Comment 13 Sihui Liu 2019-03-28 11:39:45 PDT
Created attachment 366190 [details]
Patch for landing
Comment 14 WebKit Commit Bot 2019-03-28 12:18:16 PDT
Comment on attachment 366190 [details]
Patch for landing

Clearing flags on attachment: 366190

Committed r243615: <https://trac.webkit.org/changeset/243615>
Comment 15 WebKit Commit Bot 2019-03-28 12:18:18 PDT
All reviewed patches have been landed.  Closing bug.
Comment 16 Radar WebKit Bug Importer 2019-03-28 12:19:18 PDT
<rdar://problem/49390104>