Bug 188461

Summary: CrashTracer: com.apple.WebKit.Storage at WebCore::IDBServer::UniqueIDBDatabase::scheduleShutdownForClose
Product: WebKit Reporter: Sihui Liu <sihui_liu>
Component: New BugsAssignee: Sihui Liu <sihui_liu>
Status: RESOLVED FIXED    
Severity: Normal CC: alecflett, beidson, cdumez, commit-queue, ews-watchlist, jsbell, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

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.