Bug 35624

Summary: Closing a database while a transaction is in progress can cause a crash
Product: WebKit Reporter: Dumitru Daniliuc <dumi>
Component: New BugsAssignee: Dumitru Daniliuc <dumi>
Status: RESOLVED FIXED    
Severity: Normal CC: michaeln
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
patch dglazkov: review+, dumi: commit-queue-

Dumitru Daniliuc
Reported 2010-03-02 18:06:50 PST
Before running any transaction step on the DB thread or the main thread, we check if the database is closed by calling the SQLTransaction::checkAndHandleClosedDatabase() method. Parts of that method though are intended to run only on the DB thread, and could cause a crash if run on the main thread. In particular, calling SQLTransactionCoordinator::releaseLock() on the main thread after SQLTransactionCoordinator::shutdown() was called on the DB thread triggers an assertion failure. Solution: check what thread we're on inside SQLTransaction::checkAndHandleClosedDatabase() and only run the appropriate code for that thread.
Attachments
patch (1.35 KB, patch)
2010-03-02 18:40 PST, Dumitru Daniliuc
dglazkov: review+
dumi: commit-queue-
Dumitru Daniliuc
Comment 1 2010-03-02 18:40:48 PST
Michael Nordman
Comment 2 2010-03-02 18:52:13 PST
yup... lgtm
Dimitri Glazkov (Google)
Comment 3 2010-03-03 13:11:18 PST
Comment on attachment 49874 [details] patch Per our IM discussion, please describe why it's impossible to write a deterministic regression test for it and mention the flakiness in the layout test it fixes.
Dumitru Daniliuc
Comment 4 2010-03-03 17:02:29 PST
Landed as r55487.
Note You need to log in before you can comment on or make changes to this bug.