Bug 78004 - IndexedDB: Layout Test storage/indexeddb/open-close-version.html is flaky
Summary: IndexedDB: Layout Test storage/indexeddb/open-close-version.html is flaky
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Joshua Bell
URL:
Keywords:
Depends on: 78167
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-07 11:04 PST by Joshua Bell
Modified: 2012-02-13 17:16 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Bell 2012-02-07 11:04:50 PST
storage/indexeddb/open-close-version.html is flaky on all platforms

This test uses setTimeout() calls to try and keep transactions alive, which is not supported in the spec and probably entering a race condition with timers.

The test should be reworked to use IDB correctly.
Comment 2 Joshua Bell 2012-02-07 13:56:46 PST
Looking at the flake output, it doesn't appear that the setTimeout is at fault. (And the usage appears correct, contrary to my recollection). Here are three examples:

===========================================
Example 1:
===========================================
...
TEST: open and setVersion blocked if a VERSION_CHANGE transaction is running - close when blocked
window.dbname = 'test3'; window.ver = 1; window.steps = []
'h1.open'
'h1.open.onsuccess'
'h2.open'
'h2.open.onsuccess'
'h1.setVersion'
'h2.setVersion'
<TIMEOUT>
===========================================

===========================================
Example 2:
===========================================
...
TEST: two setVersions from the same connection
window.dbname = 'test6'; window.ver = 1; window.steps = []
'h1.open'
'h1.open.onsuccess'
'h1.setVersion'
'h1.setVersion'
'h1.setVersion.onsuccess'
'h1.setVersion.transaction-complete'
half done
<TIMEOUT>
===========================================

===========================================
Example 3:
===========================================
...
TEST: two setVersions from the same connection
window.dbname = 'test6'; window.ver = 1; window.steps = []
'h1.open'
'h1.open.onsuccess'
'h1.setVersion'
'h1.setVersion'<TIMEOUT>
===========================================


Analysis: All three of these point to setVersion calls getting wedged, so that either no events go out (so one handle can close) or the call is never processed. 

This looks very similar to http://crbug.com/80111 but without the tab closure issue - all of these are occurring within the same renderer process.


===========================================
Example :
===========================================
...
<TIMEOUT>
===========================================
Analysis:
===========================================
Comment 3 Joshua Bell 2012-02-13 17:16:59 PST
This has been happy since http://webkit.org/b/78167 landed in http://trac.webkit.org/changeset/107278 so declaring victory