Summary: | Another deadlock in the DB code | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Dumitru Daniliuc <dumi> | ||||
Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | andersca, ap, aroben, beidson, dglazkov, eric, michaeln | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Dumitru Daniliuc
2009-08-11 18:33:24 PDT
Good bug. Agreed that the root cause of this problem is the synchronous window.openDatabase method that must read the 'version' attribute value, and that caching that value and using the cached value at open time should help. I don't follow how caching whether the __WebKitDatabaseInfoTable__ exists solves the problem. (i see what your driving at now, because it gets created prior to checking for the cached version, we could just move the table creation till a little further along in all cases). Seems like this could be fixed within performOpenAndVerify(). If a cached version value exists, don't bother touching the dbfile in anyway beyond opening the sqlite3 handle, simply trust the cached value. Otherwise its the first opening of this DB in this session. (Create the special table if needed and) read the version value from the DB and populate the cache with that value. Provided this happens behind the guidMutex, i think there won't be a deadlock. Created attachment 35004 [details]
patch + layout test
Comment on attachment 35004 [details]
patch + layout test
r=me. Good work!
Comment on attachment 35004 [details]
patch + layout test
Rejecting patch 35004 from commit-queue. This patch will require manual commit.
Failed to run "['git', 'svn', 'rebase']" exit_code: 1 cwd: None
Comment on attachment 35004 [details] patch + layout test Sorry, we hit https://bugs.webkit.org/show_bug.cgi?id=28436 Comment on attachment 35004 [details] patch + layout test Clearing flags on attachment: 35004 Committed r47458: <http://trac.webkit.org/changeset/47458> All reviewed patches have been landed. Closing bug. |