Closed Bug 1091463 Opened 10 years ago Closed 10 years ago

Intermittent browser_timelineMarkers-04.js | Got 5 markers - Got 2, expected 5

Categories

(DevTools :: Performance Tools (Profiler/Timeline), defect)

x86
Linux
defect
Not set
normal

Tracking

(firefox34 unaffected, firefox35 unaffected, firefox36 fixed, firefox-esr31 unaffected)

RESOLVED FIXED
Firefox 36
Tracking Status
firefox34 --- unaffected
firefox35 --- unaffected
firefox36 --- fixed
firefox-esr31 --- unaffected

People

(Reporter: cbook, Assigned: tromey)

References

()

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

Ubuntu VM 12.04 x64 mozilla-inbound debug test mochitest-browser-chrome-2

https://treeherder.mozilla.org/ui/logviewer.html#?job_id=3428377&repo=mozilla-inbound

01:16:52 INFO - 98 INFO TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/docshell/test/browser/browser_timelineMarkers-04.js | Got 5 markers - Got 2, expected 5
Component: DOM → Developer Tools: Timeline
Flags: needinfo?(vporof)
Product: Core → Firefox
Tom, this is extremely frequent. Can you please take a look ASAP or disable the test?
Flags: needinfo?(vporof) → needinfo?(ttromey)
(In reply to Ryan VanderMeulen [:RyanVM UTC-4] from comment #18)
> Tom, this is extremely frequent. Can you please take a look ASAP or disable
> the test?

I'll look now.  Sorry about that.
Flags: needinfo?(ttromey)
After some fiddling around, and learning about chaos mode, I managed to
reproduce this locally.  I added some more logging to more easily see what is
going wrong:

3 INFO Start recording
4 INFO Running test: Event dispatch from XMLHttpRequest
5 INFO Flushing the previous markers if any
6 INFO Running the test setup function
ReadyState = 1
7 INFO Waiting for new markers on the docShell
8 INFO Running the test check function
9 INFO TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/docshell/test/browser/browser_timelineMarkers-04.js | Got 5 markers - Got 2, expected 5


I think it is probably safest to just wait for all 5 expected markers
and dispense with the timeout.

Unfortunately, despite a large number of runs, I've only managed to reproduce
this locally the one time.  So, it will be hard to be confident in the fix.
Here's the patch, but first some analysis.

This test checks that the timeline gets DOM Event markers from XHR.
This is asynchronous.

The waitForMarkers function in the test assumes that a single call to
popProfileTimelineMarkers will yield all the interesting markers.
However, I think in the async case there is no reason to expect this
to be true.  The events may be interleaved with calls to
popProfileTimelineMarkers and so the test can end up failing.

This patch changes the code to wait for a certain number of DOM Event
markers, and to keep looking (still with a timeout) until those have
been read.

I will send this through "try".  However if the theory and the patch
are correct, this will not actually tell us anything.
Attachment #8523086 - Flags: review?(paul)
Assignee: nobody → ttromey
Comment on attachment 8523086 [details] [diff] [review]
wait for all expected markers from docshell

I retriggered Linux x64 Debug BC2 a bunch of times. Let's see how that goes.
https://tbpl.mozilla.org/?tree=Try&rev=82b3485c1db4
Attachment #8523086 - Flags: review?(paul) → review+
(In reply to Paul Rouget [:paul] (slow to respond. Ping me on IRC) from comment #44)
> Comment on attachment 8523086 [details] [diff] [review]
> wait for all expected markers from docshell
> 
> I retriggered Linux x64 Debug BC2 a bunch of times. Let's see how that goes.
> https://tbpl.mozilla.org/?tree=Try&rev=82b3485c1db4

All green.
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/20c042de59ee
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 36
Sorry for the spam. Moving bugs to Firefox :: Developer Tools: Performance Tools (Profiler/Timeline).

dkl
Component: Developer Tools: Timeline → Developer Tools: Performance Tools (Profiler/Timeline)
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.