Closed Bug 929385 Opened 12 years ago Closed 11 years ago

Hang at shutdown in MediaDecoderStateMachine::StopDecodeThread

Categories

(Core :: Audio/Video, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: seth, Unassigned)

References

Details

Attachments

(1 file)

Just tried to quit FF Nightly and got a hang that included this backtrace: #0 0x00007fff8bbd66bb in __mtx_droplock () #1 0x00007fff8bbd7165 in pthread_mutex_unlock () #2 0x00000001011134ba in PR_ExitMonitor () #3 0x00000001029d3647 in nsEventQueue::GetEvent () #4 0x00000001029d58cd in nsThread::ProcessNextEvent () #5 0x000000010298b955 in NS_ProcessNextEvent () #6 0x00000001029d54be in nsThread::Shutdown () #7 0x0000000101b75bec in mozilla::MediaDecoderStateMachine::StopDecodeThread () #8 0x0000000101b76635 in mozilla::MediaDecoderStateMachine::RunStateMachine () #9 0x0000000101b774f3 in mozilla::MediaDecoderStateMachine::Run () #10 0x00000001029d58fd in nsThread::ProcessNextEvent () #11 0x000000010298b955 in NS_ProcessNextEvent () #12 0x00000001029d4bfd in nsThread::ThreadFunc () #13 0x000000010111536b in _pt_root () #14 0x00007fff8bbd1772 in _pthread_start () #15 0x00007fff8bbbe1a1 in thread_start ()
Depends on: 931388
I got a similar hang in bug 931388, but it might not be the same bug.
Attached file Stacks of all threads
I hit what looks like this same hang on Windows while restarting for updates yesterday. Attached is a full stack trace from all threads. Notably, the media decoder thread looks all kinds of weird, it seems to have multiple nested event loops.
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #2) > Created attachment 824597 [details] > Stacks of all threads > > I hit what looks like this same hang on Windows while restarting for updates > yesterday. Attached is a full stack trace from all threads. Notably, the > media decoder thread looks all kinds of weird, it seems to have multiple > nested event loops. Unfortunately the nested event loops are the consequence of the way media decode threads were refactored at some point. See bug 691096 comment 20 and onwards for a discussion of this and issues it causes.
I had an idea of an easy way to reduce the chance of getting these nested thread shutdowns clogging up the stack in bug 889139. Implementing that idea would certainly be a lot simpler than doing a large refactoring to switch to using a proper thread pool (though I would really like switch to using a thread pool/work queue at some stage).
Same here, after upgrade from Firefox 25 to Firefox 26. 100% reproducible (currently, at least): Open FF, Log in to Gmail. Quit -> Hangs. Fedora 14 x86_64, Firefox built from source.
The behavior has changed with Firefox 28. Now it does not consume CPU time anymore after "shutdown", but the process still hangs and does not terminate.
No longer happening with Firefox 32.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
(In reply to Stefan Ring from comment #7) > No longer happening with Firefox 32. This may have been a bit hasty. Surprisingly, it came back today. Unfortunately, I'll have to go back to Firefox 31, since Google Street View crashes the current one immediately. Also, the machine, on which I used to witness these hangs daily, will be retired soon, so I won't be able to track the status of this issue further.
> (In reply to Stefan Ring from comment #7) > Unfortunately, I'll have to go back to Firefox 31, since Google Street View > crashes the current one immediately. Also, the machine, on which I used to > witness these hangs daily, will be retired soon, so I won't be able to track > the status of this issue further. Never mind. Back at Firefox 32, as 31 crashes all the same. Seems that Google has changed something about Street View that makes it crash.
(In reply to Stefan Ring from comment #9) > > (In reply to Stefan Ring from comment #7) > > Unfortunately, I'll have to go back to Firefox 31, since Google Street View > > crashes the current one immediately. Also, the machine, on which I used to > > witness these hangs daily, will be retired soon, so I won't be able to track > > the status of this issue further. > > Never mind. Back at Firefox 32, as 31 crashes all the same. Seems that > Google has changed something about Street View that makes it crash. Please file a bug (and comment or See Also it here) for the StreetView crash. Thanks!
Flags: needinfo?(sring)
The shutdown hang does indeed still happen with Firefox 32, but only occasionally, not predictably each time, as was the case with Firefox 31.
Flags: needinfo?(sring)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: