Closed Bug 1372719 Opened 8 years ago Closed 8 years ago

Intermittent TEST-UNEXPECTED-TIMEOUT | dom/media/test/test_background_video_no_suspend_disabled.html | application timed out after 330 seconds with no output

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: intermittent-bug-filer, Unassigned)

Details

(Keywords: bulk-close-intermittents, intermittent-failure)

https://treeherder.mozilla.org/logviewer.html#?job_id=106798382&repo=autoland&lineNumber=1972 20:22:30 INFO - GECKO(3956) | firstTimeStamp 8.000000, mTimers[0]->Timeout() 1.000000, initialFirstTimer 07DD1040, current first 0AA07F80 20:22:30 INFO - GECKO(3956) | Assertion failure: firstTimeStamp == mTimers[0]->Timeout(), at z:/build/build/src/xpcom/threads/TimerThread.cpp:659 20:22:42 INFO - GECKO(3956) | #01: NS_GetTimerDeadlineHintOnCurrentThread(mozilla::TimeStamp,unsigned int) [xpcom/threads/nsTimerImpl.cpp:50] 20:22:42 INFO - GECKO(3956) | #02: mozilla::MainThreadIdlePeriod::GetIdlePeriodHint(mozilla::TimeStamp *) [xpcom/threads/MainThreadIdlePeriod.cpp:33] 20:22:42 INFO - GECKO(3956) | #03: nsThread::GetIdleDeadline() [xpcom/threads/nsThread.cpp:1062] 20:22:42 INFO - GECKO(3956) | #04: nsThread::HasPendingEvents(bool *) [xpcom/threads/nsThread.cpp:1106] 20:22:42 INFO - GECKO(3956) | #05: hasPendingEvents(nsIThread *) [xpcom/threads/nsThreadUtils.cpp:430] 20:22:42 INFO - GECKO(3956) | #06: NS_HasPendingEvents(nsIThread *) [xpcom/threads/nsThreadUtils.cpp:448] 20:22:42 INFO - GECKO(3956) | #07: nsBaseAppShell::OnProcessNextEvent(nsIThreadInternal *,bool) [widget/nsBaseAppShell.cpp:281] 20:22:42 INFO - GECKO(3956) | #08: nsThread::ProcessNextEvent(bool,bool *) [xpcom/threads/nsThread.cpp:1357] 20:22:42 INFO - GECKO(3956) | #09: NS_ProcessNextEvent(nsIThread *,bool) [xpcom/threads/nsThreadUtils.cpp:472] A timer thread bug?
Component: Audio/Video: Playback → XPCOM
Flags: needinfo?(bkelly)
Olli, the debugging information here seems pretty concerning. It seems to indicate the first timeout is really wrong. Perhaps instead of the loop doing std::push_heap() we should just do a single call to std::make_heap() on the entire list.
Flags: needinfo?(bkelly) → needinfo?(bugs)
I wonder how much slower make_heap is. maybe not at all.
Flags: needinfo?(bugs)
(In reply to Olli Pettay [:smaug] from comment #3) > I wonder how much slower make_heap is. maybe not at all. This: http://en.cppreference.com/w/cpp/algorithm/make_heap Says the complexity is: "At most 3*std::distance(first, last) comparisons. " While std::push_heap complexity is: "At most log(N) comparisons where N=std::distance(first, last)" So it would be a bit slower. Looking at the debug, though, this suggests that the original first timestamp is wrong. It says 8 milliseconds from "now", while the resulting timestamp is 1 millisecond from now. The final result seems more correct to me. Maybe we should instead be adding some kind of validation in other places to verify the heap is not corrupt.
Windows VM again, though. This could still be a problem with TimeStamp on that platform.
Honza, is there any instrumentation on windows we could add to see if TimeStamp is switching between different modes or otherwise going backwards, etc?
Flags: needinfo?(honzab.moz)
(In reply to Ben Kelly [reviewing, but slowly][:bkelly] from comment #6) > Honza, is there any instrumentation on windows we could add to see if > TimeStamp is switching between different modes or otherwise going backwards, > etc? "is there any instrumentation on windows we could add" - what exactly do you mean?
Flags: needinfo?(honzab.moz)
(In reply to Honza Bambas (:mayhemer) from comment #7) > "is there any instrumentation on windows we could add" - what exactly do you > mean? The internal of the windows TimeStamp is a bit opaque to me. Is there a way to printf_stderr() if its switched from using cpu counters to the tick approach? Is that recorded somewhere?
Flags: needinfo?(honzab.moz)
Ah! Now it's clear what you mean. You need to impl logging at https://dxr.mozilla.org/mozilla-central/source/mozglue/misc/TimeStamp_windows.cpp#17 You can use mozlog usually as in other code or printf. There are plenty of LOG()s around the win timestamp code already placed, including the "switch to GTC" signal.
Flags: needinfo?(honzab.moz)
Maybe we should try to printing the value of sUseQPC on windows here: https://dxr.mozilla.org/mozilla-central/source/mozglue/misc/TimeStamp_windows.cpp#129 If it only fails when sUseQPC is false, then maybe we could disable this assertion in that case.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.