Closed
Bug 1345421
Opened 7 years ago
Closed 7 years ago
Intermittent dom/tests/browser/browser_localStorage_e10s.js | Storage existence === preload - Got false, expected true
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox-esr52 | --- | unaffected |
firefox54 | --- | unaffected |
firefox55 | --- | fixed |
firefox56 | --- | fixed |
People
(Reporter: intermittent-bug-filer, Assigned: asuth)
Details
(Keywords: intermittent-failure, Whiteboard: [stockwell fixed:timing])
Attachments
(2 files)
6.01 KB,
patch
|
baku
:
review+
|
Details | Diff | Splinter Review |
9.09 KB,
patch
|
baku
:
review+
|
Details | Diff | Splinter Review |
Filed by: cbook [at] mozilla.com https://treeherder.mozilla.org/logviewer.html#?job_id=82402935&repo=autoland https://archive.mozilla.org/pub/firefox/tinderbox-builds/autoland-win32-debug/1488959184/autoland_win7_vm-debug_test-mochitest-e10s-browser-chrome-6-bm137-tests1-windows-build47.txt.gz
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment 4•7 years ago
|
||
This looks like test bucketing issue. Hit inbound yesterday, today it's only on autoland. Andrew, can you take a look at this or find an owner, please? Thank you.
Flags: needinfo?(bugmail)
Whiteboard: [stockwell needswork]
Assignee | ||
Comment 5•7 years ago
|
||
I'll check it out. This test wants an update to bug 1345990's much superior mechanism for ensuring fresh processes, anyways.
Assignee: nobody → bugmail
Status: NEW → ASSIGNED
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Assignee | ||
Comment 10•7 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=c500b01079660ee13f752092ecf16167bc257851
Assignee | ||
Comment 11•7 years ago
|
||
I believe I've identified the problem as a race related to DB thread flushes. mOriginsHavingData is only updated when the db operations are flushed and are synchronously retrieved from the main thread when requested by the actor, not bounced off the database thread (with implied flush). I was able to reproduce the problem locally and this fixed it, so I've pushed that to try. The other remaining item is to ensure that the freshly created child reliably receives and processes RecvOriginsHavingData prior to nsGlobalWindow::SetNewDocument being invoked in the content process. Otherwise the test passes because of a false-positive because of the the special-case logic where preload decides to preload everything until it receives that info. I was using rr to validate this but it freaked out, so I'll have to upgrade and/or use another avenue. I'm hoping there's something that was not obvious in my code inspection making this safe by falling inside some reliably enclosing control-flow, because it does currently seems like there's a race.
Comment hidden (Intermittent Failures Robot) |
Assignee | ||
Comment 13•7 years ago
|
||
(In reply to Andrew Sutherland [:asuth] from comment #11) > The other remaining item is to ensure that the freshly created child > reliably receives and processes RecvOriginsHavingData prior to > nsGlobalWindow::SetNewDocument being invoked in the content process. It works out with current ordering, but it's somewhat accidental. LocalStorageManager creation is being triggered as a side-effect of a testing frame script. And we need a proper PContent/PBrowser round-trip to ensure ordering and we're only getting that because PNecko is currently main thread and so the HTTP channel gets us a round-trip. Otherwise the guaranteed requests all seem to be unidirectional async to the content process and also dependent on an incidental frame script load. Especially since HTTP channel loads are moving increasingly to PBackground, I'm going to make the test safer by splitting the tab opening into 2 phases. We'll load about:blank, then loadURI the browser to the actual page. === Details The mochitest infra file browser-test.js registers `chrome://mochikit/content/tests/SimpleTest/AsyncUtilsContent.js` with the global message manager as a frame script that should be loaded into all processes. When the child process evaluates the script, the line `EventUtils.navigator = content.document.defaultView.navigator;` induces startup of the LocalStorageManager and creation of our IPC actor with a native stack whose highlights look like: mozilla::dom::StorageDBChild::StorageDBChild mozilla::dom::LocalStorageCache::StartDatabase mozilla::dom::LocalStorageManager::LocalStorageManager CallGetService nsGlobalWindow::PreloadLocalStorage nsGlobalWindow::SetNewDocument nsDocShell::CreateAboutBlankContentViewer nsDocShell::EnsureContentViewer nsDocShell::GetDocument aside: rr doesn't like xvfb-run sometimes.
Assignee | ||
Comment 14•7 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=aa8e62bac9580b93cd53949cdbdd0a59584d0765
Comment hidden (Intermittent Failures Robot) |
Assignee | ||
Comment 16•7 years ago
|
||
Bug 1345990 introduced a "forceNewProcess" argument in BrowserTestUtils.openNewForegroundTab. By switching to this we can stop bloating the process count pref to try and produce equivalent results. To minimize test churn and because it doesn't really hurt to double-check, the code that asserts that our tabs are each in different processes and related book-keeping infrastructure have been left intact. We also set a preference to disable preallocated processes in the interest of maximizing test consistency and minimizing breakage. It's conceivable that a preallocated process might end up creating its StorageDBParent actor prior to when we want, breaking things. By ensuring the process isn't created until we want it, we avoid a lot of brittleness.
Attachment #8877643 -
Flags: review?(amarchesini)
Assignee | ||
Comment 17•7 years ago
|
||
The intermittent failure appears to have been due to mOriginsHavingData only being updated when the db thread flushes. The db thread has a hard-coded 5 second flush interval. It's likely that e10s startup was previously so slow that we were assured of having a flush happen by the time our fresh process created its parent actor. We correct this by reliably ensuring a flush before spinning up the process to check preload state. We also ensure a flush at the start of the test for our check that there was no preload in the initial cases. We were actually more vulnerable in that case, I believe, but as a browser chrome test, there were no other tests that would have used content localStorage. We additionally ensure that the content process has received and populated mOriginsHavingData by having the tab opening process wait for about:blank to load in the process before actually opening our origin. Prior to this change we were depending on orderings that aren't guaranteed.
Attachment #8877644 -
Flags: review?(amarchesini)
Updated•7 years ago
|
Attachment #8877643 -
Flags: review?(amarchesini) → review+
Updated•7 years ago
|
Attachment #8877644 -
Flags: review?(amarchesini) → review+
Assignee | ||
Comment 18•7 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/9c5366883d69fec2bf728e718410e7b5034d17b5 Bug 1345421 - Part 1: Clean up mechanism used to create fresh processes. r=baku https://hg.mozilla.org/integration/mozilla-inbound/rev/13c27668f2d7c166bb46af2cd0b9c3a5642f428d Bug 1345421 - Part 2: Ensure mOriginsHavingData is up-to-date via flushing. r=baku
Comment hidden (Intermittent Failures Robot) |
Comment 21•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9c5366883d69 https://hg.mozilla.org/mozilla-central/rev/13c27668f2d7
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Updated•7 years ago
|
status-firefox54:
--- → unaffected
status-firefox55:
--- → affected
status-firefox-esr52:
--- → unaffected
Whiteboard: [stockwell needswork] → [stockwell fixed]
Comment 22•7 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-beta/rev/5527f743aec0 https://hg.mozilla.org/releases/mozilla-beta/rev/9b401b03ab50
Flags: in-testsuite+
Comment hidden (Intermittent Failures Robot) |
Updated•7 years ago
|
Flags: qe-verify-
Updated•7 years ago
|
Whiteboard: [stockwell fixed] → [stockwell fixed:timing]
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•