Closed Bug 589445 Opened 11 years ago Closed 9 years ago

Intermittent timeout or uncaught exception @nsIDOMLocation.hash in browser_463205.js followed by unexpected tab warnings

Categories

(Firefox :: Session Restore, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 18
Tracking Status
firefox17 --- fixed

People

(Reporter: khuey, Assigned: ttaubert)

References

Details

(Keywords: intermittent-failure)

Attachments

(1 file, 1 obsolete file)

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1282388651.1282389417.11633.gz

s: talos-r3-fed-047
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/browser/components/sessionstore/test/browser/browser_463205.js | Timed out
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/browser/components/sessionstore/test/browser/browser_463205.js | Found a tab after previous test timed out: chrome://mochikit/content/browser/browser/components/sessionstore/test/browser/browser_463205_sample.html
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/browser/components/sessionstore/test/browser/browser_463205.js | Found a tab after previous test timed out: chrome://mochikit/content/browser/browser/components/sessionstore/test/browser/browser_463205_sample.html
Blocks: 438871
OS: Linux → All
Hardware: x86 → All
Version: unspecified → Trunk
Summary: Intermittent timeout in browser_463205.js followed by unexpected tab warnings → Intermittent timeout or uncaught exception @nsIDOMLocation.hash in browser_463205.js followed by unexpected tab warnings
the patch in 769764 reliably turns this from a random orange to a perma orange only on OSX opt builds.
Blocks: 769764
It wasn't actually only on OS X opt, it was on !Linux opt, it's just that Windows takes so much longer than the other two, and we coalesce it so much, that something which is everything-but-Linux looks a lot like something that's only-Mac.
adding a slew of printfs makes this happen for me once in a while on linux debug and then only when using xvfb.. I've gotten it once under gdb. race condition ahoy! that's my primary dev so that's still easier than round tripping everything through opt-try.

WARNING: NS_ENSURE_TRUE(mMutable) failed: file ../../../../scratch/netwerk/base/src/nsSimpleURI.cpp, line 400

from nsLocation::SetHash(const nsAString& aHash)
[..]
rv = uri->SetRef(hash);

from browser_463205_sample.html
[..]
      frames[1].document.location.hash = "#original";

the non-mutable URI is an nsNestedAboutURI with the value "about:blank"..

when the test fails frames[1].document.location is about:blank, when it succeeds it is "http://mochi.test:8888/browser/browser/components/sessionstore/test/browser_463205_helper.html"

I'm not a wizard in the ways of the DOM, but the test seems to be driven off of frames[2].DOMContentLoaded which then goes on to manipulate frames[1] and frames[0] .. there is no reason those have to be loaded yet, just because [2] is, right?

in particular frames 2 and 0 come from data urls and frame [1] comes from http so it isn't surprising that it takes a heartbeat longer.
I've sent a rather trivial change that makes sure all the frames are loaded before setting their locations to try https://hg.mozilla.org/try/rev/9c8074562515

that fixes things up for me as far as I can tell locally (which only reproduced spotilly, admittedly.)
I was able to reproduce this on my machine locally (Linux) and wrote a smaller fix that does the same and it's not failing for me anymore.
I was on a plane while I wrote this patch so I didn't see yours until now. I thought I'll just post mine anyway. Definitely good that we came to the same conclusion :)
Tim - awesome. Thanks for the help. Mine is green on try with 769764 also pushed, and yours does basically the same thing so lets go with yours. Too bad its not a gecko bug.

Can we get a r? on yours and I'll push it along with 769764 (which I'm eager to land for various reasons).
tims version is also green on try in conjunction with 769764

https://tbpl.mozilla.org/?tree=Try&rev=2af91c665619
Attachment #661270 - Flags: review?(ehsan)
Attachment #661270 - Flags: review?(ehsan) → review+
Thank you Ehsan for the quick review!

Patrick, here's the patch that you can just push along with bug 769764. Glad to see another orange fixed :)
Assignee: nobody → ttaubert
Attachment #661270 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #661341 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/ece7fb2526fb
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 18
Whiteboard: [orange]
You need to log in before you can comment on or make changes to this bug.