Closed Bug 895378 Opened 7 years ago Closed 7 years ago

Hang on shutdown with media thread in MediaDecoderStateMachine::StopAudioThread

Categories

(Core :: Audio/Video, defect)

22 Branch
x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: ted, Assigned: padenot)

Details

Attachments

(2 files)

Attached file Stacks of all threads
I got a shutdown hang on Windows. The stacks from all threads are attached. padenot says the cause is obvious and he's working on a patch.
So, this is because we are trying to shutdown the thread when it is draining.

Here [1], if we receive a shutdown event when we are draining, we will never call the state callback to tell the BufferedAudioStream that it can consider the stream is drained, so it will keep waiting on the monitor ad vitam eternam.

[1]: http://mxr.mozilla.org/mozilla-central/source/media/libcubeb/src/cubeb_wasapi.cpp#290
Reproducing the problem would be pretty hard, but I'm convinced this would fix it.
Attachment #777823 - Flags: review?(kinetik)
Right, I can't tell you exactly what happened, except that I think I had a YouTube video (using <video>) queued up to play in a background tab, and I restarted for an update.
Attachment #777823 - Flags: review?(kinetik) → review+
https://hg.mozilla.org/mozilla-central/rev/8ea7c73c9834
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in before you can comment on or make changes to this bug.