Bug 152892 - Modern IDB: storage/indexeddb/dont-wedge.html is flaky
Summary: Modern IDB: storage/indexeddb/dont-wedge.html is flaky
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords:
Depends on:
Blocks: 149117 150882
  Show dependency treegraph
 
Reported: 2016-01-08 06:35 PST by Brady Eidson
Modified: 2016-01-12 11:18 PST (History)
4 users (show)

See Also:


Attachments
Patch v1 (12.17 KB, patch)
2016-01-12 06:36 PST, Brady Eidson
achristensen: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2016-01-08 06:35:08 PST
Modern IDB: storage/indexeddb/dont-wedge.html is flaky

https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=storage/indexeddb/dont-wedge.html
Comment 1 Brady Eidson 2016-01-08 08:51:55 PST
Marked flaky in http://trac.webkit.org/changeset/194765
Comment 2 Brady Eidson 2016-01-11 16:41:47 PST
Trying to explore this now. No matter what I try I can't reproduce locally. I also can't figure out how to get the flakiness dashboard to actually show me the output before it timed out.  =/
Comment 3 Brady Eidson 2016-01-11 16:43:47 PST
Got them. For posterity:

FAIL: Timed out waiting for notifyDone to be called
Check that a page reloaded during an in-flight upgradeneeded event doesn't hang.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;

dbname = "dont-wedge.html"
dbname1 = dbname + '1'
dbname2 = dbname + '2'

deleteDatabase1():
indexedDB.deleteDatabase(dbname1)
In a multi process implementation this deleteDatabase may be blocked temporarily, so we don't check for either the presence or absence of a blocked event.
Comment 4 Brady Eidson 2016-01-11 16:45:16 PST
Setting DRT up to run the test 1000 times I can get it to sometimes hang locally.

Exploring.
Comment 5 Brady Eidson 2016-01-11 17:07:06 PST
When the IDBOpenDBRequest is told about its database connection opening in IDBOpenDBRequest::requestCompleted, its context has already stopped, so it doesn't actually create the database connection and/or deliver the event.

Also, since the connection never fully opens, it doesn't get closed with the page navigates.

This is likely a timing race between the page navigation and the server opening a connection requested before the navigation.
Comment 6 Brady Eidson 2016-01-12 06:36:43 PST
Created attachment 268763 [details]
Patch v1

Never came up with a way to truly and reliably reproduce other than "tell DRT to run the test 10,000 times in a row and hope it hits"

Before this patch, it would always hit by run ~1000

After this patch it doesn't hit at all, and with logging on I can verify the new code fires every once and awhile, doing what it is support to do.
Comment 7 Brady Eidson 2016-01-12 10:31:37 PST
(In reply to comment #6)
> 
> After this patch it doesn't hit at all, and with logging on I can verify the
> new code fires every once and awhile, doing what it is support to do.

s/support/supposed/
Comment 8 Brady Eidson 2016-01-12 11:18:50 PST
http://trac.webkit.org/changeset/194904