Closed Bug 1067287 Opened 11 years ago Closed 11 years ago

Intermittent browser_timeline_overview-initial-selection-02.js | There are no markers available. - Got 3, expected 0

Categories

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

x86
Linux
defect
Not set
normal

Tracking

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

RESOLVED FIXED
Firefox 35
Tracking Status
firefox33 --- unaffected
firefox34 --- unaffected
firefox35 --- fixed
firefox-esr31 --- unaffected

People

(Reporter: cbook, Assigned: sjakthol)

References

()

Details

(Keywords: intermittent-failure)

Attachments

(1 file, 1 obsolete file)

Ubuntu VM 12.04 mozilla-inbound debug test mochitest-devtools-chrome-3 on 2014-09-15 01:44:35 PDT for push 7e47a9f5e048 slave: tst-linux32-spot-545 https://tbpl.mozilla.org/php/getParsedLog.php?id=48081485&tree=Mozilla-Inbound 02:04:13 INFO - 352 INFO TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/devtools/timeline/test/browser_timeline_overview-initial-selection-02.js | There are no markers available. - Got 3, expected 0
Attached patch timeline-intermittent.patch (obsolete) — Splinter Review
Looking at the code I think this is caused by following (highly unlikely) chain of events: 1) actor sends new markers to the front and yields execution 2) test calls TimelineController._stopRecordingAndDiscardData 3) TimelineController._markers is cleared 4) TimelineController._stopRecording yields on gFront.stop 5) waiting package from (1) is processed 6) TimelineController._onMarkers appends the markers to the cleared list 7) gFront.stop resolves 8) test asserts markers.length == 0 which fails due to step 6 inserting new items to the list If the failure is indeed caused by the above chain of events, here's a patch that ensures the list is still empty when TimelineController._stopRecordingAndDiscardData returns by clearing it again. Try run: https://tbpl.mozilla.org/?tree=Try&rev=4da7f5787bef
Assignee: nobody → sjakthol
Status: NEW → ASSIGNED
Attachment #8492727 - Flags: review?(paul)
Comment on attachment 8492727 [details] [diff] [review] timeline-intermittent.patch Don't we want to move the length=0 to the bottom instead of calling it again?
Attachment #8492727 - Flags: review?(paul) → review?(vporof)
That would also work but then _stopRecordingAndDiscardData would have to explicitly clear the UI from previously rendered markers instead of relying to _stopRecording to do it when an empty list of markers is given. However, _stopRecordingAndDiscardData is only ever called from the failing test so the UI inconsistency should not show up to users.
Comment on attachment 8492727 [details] [diff] [review] timeline-intermittent.patch Review of attachment 8492727 [details] [diff] [review]: ----------------------------------------------------------------- ::: browser/devtools/timeline/timeline.js @@ +131,5 @@ > * Used in tests. Stops the recording, discarding the accumulated markers and > * updating the UI as needed. > */ > _stopRecordingAndDiscardData: function*() { > this._markers.length = 0; Do we still need this then, before the yield?
Attachment #8492727 - Flags: review?(vporof) → review+
(In reply to Victor Porof [:vporof][:vp] from comment #6) > Comment on attachment 8492727 [details] [diff] [review] > timeline-intermittent.patch > > Review of attachment 8492727 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: browser/devtools/timeline/timeline.js > @@ +131,5 @@ > > * Used in tests. Stops the recording, discarding the accumulated markers and > > * updating the UI as needed. > > */ > > _stopRecordingAndDiscardData: function*() { > > this._markers.length = 0; > > Do we still need this then, before the yield? Currently nothing depends on it so it might as well be removed. Tests pass with or without it and results of the clearing doesn't show up to users. Here's a version with the duplicate operation removed that just moves the this._markers.length to after the yield. Try: https://tbpl.mozilla.org/?tree=Try&rev=14cc30f69ab2
Attachment #8492727 - Attachment is obsolete: true
Attachment #8495680 - Flags: review?(vporof)
Attachment #8495680 - Flags: review?(vporof) → review+
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 35
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.

Attachment

General

Creator:
Created:
Updated:
Size: