Bug 157141 - inspector/indexeddb/requestDatabaseNames.html is flaky on Mac
Summary: inspector/indexeddb/requestDatabaseNames.html is flaky on Mac
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Mac Unspecified
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords:
Depends on:
Blocks: 149117
  Show dependency treegraph
 
Reported: 2016-04-28 10:20 PDT by Ryan Haddad
Modified: 2016-05-11 13:40 PDT (History)
2 users (show)

See Also:


Attachments
Patch (6.55 KB, patch)
2016-04-28 15:03 PDT, 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 Ryan Haddad 2016-04-28 10:20:15 PDT
Flakiness dashboard:
<https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=inspector%2Findexeddb%2FrequestDatabaseNames.html>

Most recent failure:
<https://build.webkit.org/builders/Apple%20Yosemite%20Debug%20WK2%20(Tests)/builds/11744>

--- /Volumes/Data/slave/yosemite-debug-tests-wk2/build/layout-test-results/inspector/indexeddb/requestDatabaseNames-expected.txt
+++ /Volumes/Data/slave/yosemite-debug-tests-wk2/build/layout-test-results/inspector/indexeddb/requestDatabaseNames-actual.txt
@@ -3,17 +3,17 @@
 CONSOLE MESSAGE: line 10: Created Database 'ቍ'
 CONSOLE MESSAGE: line 10: Created Database '𐍆'
 
-PASS: No IndexedDB databases should exist initially
+FAIL: No IndexedDB databases should exist initially
 Created Database 'Database1'
-PASS: A single IndexedDB database should exist
-["Database1"]
+FAIL: A single IndexedDB database should exist
+["Database1","Page 20Cache 20Test"]
 Created Database 'Database2'
-PASS: Two IndexedDB databases should exist
-["Database1","Database2"]
+FAIL: Two IndexedDB databases should exist
+["Database1","Database2","Page 20Cache 20Test"]
 Created Database 'ቍ'
-PASS: Two IndexedDB databases should exist
-["Database1","Database2","ቍ"]
+FAIL: Two IndexedDB databases should exist
+["Database1","Database2","Page 20Cache 20Test","ቍ"]
 Created Database '𐍆'
-PASS: Four IndexedDB databases should exist
-["Database1","Database2","ቍ","𐍆"]
+FAIL: Four IndexedDB databases should exist
+["Database1","Database2","Page 20Cache 20Test","ቍ","𐍆"]
Comment 1 Brady Eidson 2016-04-28 11:20:52 PDT
INTERESTING.

Test test appears to be conflicting with other tests running at the same time using either the same DatabaseProcess or same database directory.

If multiple WKTR are using the same DatabaseProcess, they shouldn't - That's bad.
If multiple WKTRs are pointing their DatabaseProcesses at the same database directory, they shouldn't - That's bad.

I wonder if this is the source of many of the other WK2 flakes?
Comment 2 Brady Eidson 2016-04-28 11:22:52 PDT
I'm going to make a change to this test to try to prove or disprove this.
Comment 3 Brady Eidson 2016-04-28 11:25:08 PDT
Also, just to clarify, DRTs should *also* not share the same databases directory.

I don't know if they are, but they shouldn't.
Comment 4 Brady Eidson 2016-04-28 12:22:57 PDT
Added one tiny additional bit of logging to help support this theory in http://trac.webkit.org/changeset/200202

In a little bit I'm going to turn on debug build logging to see if this is really happening.
Comment 5 Brady Eidson 2016-04-28 13:00:46 PDT
I did a "run-webkit-tests storage/indexeddb" which runs 3 WKTRs
I also did a "run-webkit-tests -1 storage/indexeddb" which runs 3 DRTs

I then monitored the filesystem using fs_usage.

In either the WK1 or WK2 case, each unique DRT or WKTR did, in fact, have an independent directory for its databases.

So that theory seems scratched...

But the results here clearly show tests stomping on each other in some way.
Comment 6 Brady Eidson 2016-04-28 14:05:31 PDT
Aha. It's a page cache test (of course), and causes problems in the same process down the line.

I can reliably reproduce like so:
run-webkit-tests -1 fast/history/page-cache-indexed-opened-db.html inspector/indexeddb --child-processes=1
Comment 7 Brady Eidson 2016-04-28 14:41:22 PDT
This is actually a simple bug in the "get all database names" code that chokes on database names with spaces in them.
Comment 8 Brady Eidson 2016-04-28 15:03:56 PDT
Created attachment 277652 [details]
Patch
Comment 9 Brady Eidson 2016-04-28 15:10:44 PDT
http://trac.webkit.org/changeset/200212