Closed
Bug 1124411
Opened 9 years ago
Closed 9 years ago
Deadlock in cubeb_wasapi backend
Categories
(Core :: Audio/Video, defect)
Tracking
()
RESOLVED
FIXED
mozilla38
Tracking | Status | |
---|---|---|
firefox38 | --- | fixed |
People
(Reporter: khuey, Assigned: padenot)
Details
Attachments
(2 files)
5.52 KB,
text/plain
|
Details | |
1.94 KB,
patch
|
kinetik
:
review+
|
Details | Diff | Splinter Review |
See the attachment for stacks. The audio backend appears to have deadlocked itself during shutdown (see the two wasapi threads) and one of them was holding the decoder monitor so that eventually deadlocks the main thread.
Comment 1•9 years ago
|
||
Which wasapi thread was holding the decoder monitor? I can't see it from the stack.
Reporter | ||
Comment 2•9 years ago
|
||
The one calling wasapi_stream_stop. http://hg.mozilla.org/mozilla-central/annotate/34e2d2bd7ec4/dom/media/AudioSink.cpp#l200
Comment 3•9 years ago
|
||
wasapi_stream_render_loop() stuck in WaitForMultipleObjects while wasapi_stream_stop() stuck in |WaitForSingleObject(stm->thread, INFINITE);| which happened after |SetEvent(stm->shutdown_event);| which should notify wasapi_stream_render_loop()... this is weird.
Reporter | ||
Comment 4•9 years ago
|
||
Yeah, I didn't really understand why the render_loop didn't quit.
Assignee | ||
Comment 6•9 years ago
|
||
I've been re-reading this code, but it looks correct. We could add a (rather high, like 1000ms) timeout to the WaitForMultipleObject (which is guaranteed to unblock at least every 30ms, and is on a very high priority thread), to see what happens. And maybe adding a assert somewhere where we could get the state of the stream in crash stats or something.
Flags: needinfo?(padenot)
Assignee | ||
Comment 8•9 years ago
|
||
Attachment #8565052 -
Flags: review?(kinetik)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → padenot
Status: NEW → ASSIGNED
Updated•9 years ago
|
Attachment #8565052 -
Flags: review?(kinetik) → review+
Comment 11•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/c841c87a7791
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox38:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in
before you can comment on or make changes to this bug.
Description
•