Bug 188461 - CrashTracer: com.apple.WebKit.Storage at WebCore::IDBServer::UniqueIDBDatabase::scheduleShutdownForClose
Summary: CrashTracer: com.apple.WebKit.Storage at WebCore::IDBServer::UniqueIDBDatabas...
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: 2018-08-09 17:22 PDT by Sihui Liu
Modified: 2018-08-10 12:05 PDT (History)
7 users (show)

See Also:


Attachments
Patch (1.81 KB, patch)
2018-08-09 17:49 PDT, Sihui Liu
no flags Details | Formatted Diff | Diff
Patch (1.62 KB, patch)
2018-08-10 10:16 PDT, Sihui Liu
no flags Details | Formatted Diff | Diff
Patch (1.58 KB, patch)
2018-08-10 10:17 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 2018-08-09 17:22:05 PDT
Thread 0 Crashed ↩:
0   WebCore                       	0x00000001f163e398 WebCore::IDBServer::UniqueIDBDatabase::scheduleShutdownForClose() + 268 (UniqueIDBDatabase.cpp:276)
1   WebCore                       	0x00000001f1ea6290 WebCore::ThreadTimers::sharedTimerFiredInternal() + 352 (ThreadTimers.cpp:117)
2   WebCore                       	0x00000001f1ea6290 WebCore::ThreadTimers::sharedTimerFiredInternal() + 352 (ThreadTimers.cpp:117)
3   WebCore                       	0x00000001f1eeb254 WebCore::timerFired(__CFRunLoopTimer*, void*) + 28 (MainThreadSharedTimerCF.cpp:74)
Comment 1 Sihui Liu 2018-08-09 17:22:48 PDT
<rdar://problem/33555052>
Comment 2 Sihui Liu 2018-08-09 17:49:31 PDT
Created attachment 346881 [details]
Patch
Comment 3 Chris Dumez 2018-08-10 08:42:20 PDT
Comment on attachment 346881 [details]
Patch

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

> Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp:1553
> +        if (!m_owningPointerForClose)

Could we simply call m_operationAndTransactionTimer.stop(); in scheduleShutdownForClose(), similarly to what we already do in immediateCloseForUserDelete()?

The ASSERT(!m_owningPointerForClose); in invokeOperationAndTransactionTimer() should make sure no one restarts the timer after that.
Comment 4 Sihui Liu 2018-08-10 10:04:05 PDT
Comment on attachment 346881 [details]
Patch

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

>> Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp:1553
>> +        if (!m_owningPointerForClose)
> 
> Could we simply call m_operationAndTransactionTimer.stop(); in scheduleShutdownForClose(), similarly to what we already do in immediateCloseForUserDelete()?
> 
> The ASSERT(!m_owningPointerForClose); in invokeOperationAndTransactionTimer() should make sure no one restarts the timer after that.

Yes, I think this will work too.
Comment 5 Sihui Liu 2018-08-10 10:16:16 PDT
Created attachment 346909 [details]
Patch
Comment 6 Sihui Liu 2018-08-10 10:17:14 PDT
Created attachment 346910 [details]
Patch
Comment 7 Chris Dumez 2018-08-10 10:18:27 PDT
Comment on attachment 346910 [details]
Patch

r=me
Comment 8 WebKit Commit Bot 2018-08-10 12:05:52 PDT
Comment on attachment 346910 [details]
Patch

Clearing flags on attachment: 346910

Committed r234766: <https://trac.webkit.org/changeset/234766>
Comment 9 WebKit Commit Bot 2018-08-10 12:05:54 PDT
All reviewed patches have been landed.  Closing bug.