bug451286_window.xul (used by test_bug451286.xul) randomly times out on the tinderbox if the HTML5 parser is enabled

RESOLVED FIXED in mozilla1.9.3a5

Status

()

Toolkit
Find Toolbar
RESOLVED FIXED
7 years ago
5 years ago

People

(Reporter: hsivonen, Assigned: graememcc)

Tracking

({intermittent-failure})

Trunk
mozilla1.9.3a5
intermittent-failure
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

7 years ago
bug451286_window.xul (used by bug451286_window.xul) assumes data: URLs are parsed synchronously. As of the HTML5 parser, they aren't, so the test should wait for the load event for the iframes into which the data: URLs are loaded.
(Reporter)

Updated

7 years ago
Blocks: 373864
(Reporter)

Comment 1

7 years ago
Locally with the old parser this test fails for me on line
window[import] = window.opener.wrappedJSObject[import];
with null opener.
(Reporter)

Updated

7 years ago
Summary: bug451286_window.xul (used by bug451286_window.xul) assumes data: URLs are parsed synchronously → bug451286_window.xul (used by test_bug451286.xul) randomly fails on the tinderbox if the HTML5 parser is enabled
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
(Reporter)

Comment 4

7 years ago
Created attachment 443081 [details] [diff] [review]
Potential fix

This patch doesn't make the test fail for me locally. However, since I'm unable to reproduce the failure locally or on the tryserver, I can't tell if this fixes the problem without pushing this into m-c. :-(
Assignee: nobody → hsivonen
Status: NEW → ASSIGNED
Attachment #443081 - Flags: review?(bzbarsky)
(Reporter)

Comment 5

7 years ago
Created attachment 443082 [details] [diff] [review]
Potential fix, without debugging code
Attachment #443081 - Attachment is obsolete: true
Attachment #443082 - Flags: review?(bzbarsky)
Attachment #443081 - Flags: review?(bzbarsky)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment on attachment 443082 [details] [diff] [review]
Potential fix, without debugging code

Would just checking in onPageShow that event.target == gBrowser.contentDocument be good enough?  I would bet that in the failing cases it's not...
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Summary: bug451286_window.xul (used by test_bug451286.xul) randomly fails on the tinderbox if the HTML5 parser is enabled → bug451286_window.xul (used by test_bug451286.xul) randomly times out on the tinderbox if the HTML5 parser is enabled
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1273260986.1273262727.4727.gz
WINNT 5.2 mozilla-central debug test mochitest-other on 2010/05/07 12:36:26
s: win32-slave32
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1273572934.1273575061.11172.gz#err0
WINNT 5.2 mozilla-central debug test mochitest-other on 2010/05/11 03:15:34
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
(Assignee)

Comment 100

7 years ago
Apologies for not having been about recently, particularly given how noisy an orange this has turned out to be.

Left my box continually running the chrome test suite for over 10 hours, and didn't fail once locally.

Henri's patch in comment 5 seems the right approach, the delayed loading of the iframe's src tags do look like the obvious point of failure.

Boris, in comment 32, I guess you're thinking about the problem being the possibility of the test starting after receiving a pageshow event unrelated to the loadURI request for the test page? We would still then need to check each iframe's readystate is complete before the test could do anything useful.
Comment hidden (Treeherder Robot)
Comment 32 just says that the pageshow for the toplevel page should imply that the readyState for all subframes is complete.  If that's not the case, something is very wrong.
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
FWIW, the last few logs (the only ones I checked) all have this right before the timeout:
> JavaScript error: , line 0: uncaught exception: [Exception... "Parameter is not an object"  code: "1003" nsresult: "0x805303eb (NS_ERROR_DOM_NOT_OBJECT_ERR)"  location: "chrome://global/content/bindings/findbar.xml Line: 940"]
> ###!!! ASSERTION: stylesheet not found: 'Not Reached', file e:/builds/moz2_slave/mozilla-central-win32-debug/build/content/base/src/nsDocument.cpp, line 3392

with a total of 5 instances of the assertion-failure between the "JavaScript error" and the timeout.

(There appear to be many other instances of that assertion in the log, though, so maybe it's just noise)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
(Assignee)

Comment 145

7 years ago
(In reply to comment #133)
> FWIW, the last few logs (the only ones I checked) all have this right before
> the timeout:
> > JavaScript error: , line 0: uncaught exception: [Exception... "Parameter is not an object"  code: "1003" nsresult: "0x805303eb (NS_ERROR_DOM_NOT_OBJECT_ERR)"  location: "chrome://global/content/bindings/findbar.xml Line: 940"]

which is being thrown by the call 
  this._searchRange.selectNodeContents(doc.body);
so presumably body must be null/undefined at this point (code above this already checks doc is an instance of HTMLDocument). The _highlightDoc method this line comes from recurses through frames first, so doc could be the document of either of the frames or the top-level document.
Can we add logging to the test to log the URI of the event.target in that pageshow handler?  Or log whether it's == gBrowser.contentDocument?  Or both?

We could also add try/catch around the relevant calls into gFindBar to see which one this is happening in, right?
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
(Assignee)

Comment 168

7 years ago
(In reply to comment #146)
> Can we add logging to the test to log the URI of the event.target in that
> pageshow handler?  Or log whether it's == gBrowser.contentDocument?  Or both?
> 
> We could also add try/catch around the relevant calls into gFindBar to see
> which one this is happening in, right?

Pushed http://hg.mozilla.org/mozilla-central/rev/8e79b68f2d6c, and will back it out when I return home from work today - I'm sure by then we'll have more than enough failures.
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
(Assignee)

Comment 177

7 years ago
Created attachment 445413 [details] [diff] [review]
Wait for pageshow from top-level document

Yeah, so the test is indeed starting too early, responding to a pageshow event from an iframe...

7450 INFO TEST-PASS | chrome://mochikit/content/chrome/toolkit/content/tests/chrome/test_bug451286.xul | [Bug 562326] pageshow event received for data:text/html,text
7451 INFO TEST-PASS | chrome://mochikit/content/chrome/toolkit/content/tests/chrome/test_bug451286.xul | [Bug 562326] Event target gBrowser.contentDocument? false

and in the cases where it's failing the second iframe presumably hasn't been parsed yet...
NEXT ERROR 7507 ERROR TEST-UNEXPECTED-FAIL | chrome://mochikit/content/chrome/toolkit/content/tests/chrome/test_bug451286.xul | [Bug 562326] Mark this failure as Bug 526326...
7508 ERROR TEST-UNEXPECTED-FAIL | chrome://mochikit/content/chrome/toolkit/content/tests/chrome/test_bug451286.xul | [Bug 562326] First toggleHighlight call failed [Exception... "Parameter is not an object"  code: "1003" nsresult: "0x805303eb (NS_ERROR_DOM_NOT_OBJECT_ERR)"  location: "chrome://global/content/bindings/findbar.xml Line: 946"]
JavaScript error: chrome://mochikit/content/chrome/toolkit/content/tests/chrome/bug451286_window.xul, line 144: ifBody is null

I'd hope this'll fix the orange, but we should take it in any case, the test starting based on a subframe pageshow is bogus.
Attachment #445413 - Flags: review?(gavin.sharp)
Attachment #445413 - Flags: review?(gavin.sharp) → review+
(Assignee)

Comment 178

7 years ago
Backed out the temporary code:
http://hg.mozilla.org/mozilla-central/rev/984404851f87

and pushed the patch:
http://hg.mozilla.org/mozilla-central/rev/2c63457bc391

I'll close this out tomorrow morning - given the frequency of this failure, if it hasn't failed in ~12 hours we can assume it's fixed.

Gavin, thanks, was gambling (correctly) that you'd quickly give an r+ in time to push this with the debugging backout.
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
(Assignee)

Comment 181

7 years ago
I haven't seen any failures since. The two logs above were from builds from changesets before I pushed.

Please reopen if any more failures pop up.
Assignee: hsivonen → graememcc_firefox
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Flags: in-testsuite+
Target Milestone: --- → mozilla1.9.3a5
Version: unspecified → Trunk
Comment hidden (Treeherder Robot)
(Reporter)

Updated

7 years ago
Attachment #443082 - Attachment is obsolete: true
Attachment #443082 - Flags: review?(bzbarsky)
Keywords: intermittent-failure
Whiteboard: [orange]
You need to log in before you can comment on or make changes to this bug.