Closed
Bug 1403041
Opened 8 years ago
Closed 8 years ago
MSG reenters libcubeb from within data_callback, resulting in potential deadlocks
Categories
(Core :: Audio/Video: MediaStreamGraph, defect, P2)
Core
Audio/Video: MediaStreamGraph
Tracking
()
RESOLVED
FIXED
mozilla58
| Tracking | Status | |
|---|---|---|
| firefox58 | --- | fixed |
People
(Reporter: kinetik, Assigned: padenot)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
MediaStreamGraphImpl::CloseAudioInputImpl creates a new AudioCallbackDriver which calls MediaStreamGraphImpl::AudioChannelCount from it's constructor., which results in a call to cubeb_get_max_channel_count.
While this happens to work with at least some of the current backends, it's not safe to do in general and the libcubeb API is not intended to be called reentrantly from within callbacks.
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Assignee | ||
Updated•8 years ago
|
Assignee: nobody → padenot
| Assignee | ||
Updated•8 years ago
|
Rank: 19
Priority: -- → P2
Comment 3•8 years ago
|
||
An optional small addition since the patches above make things more clear and well looking.
| Reporter | ||
Comment 4•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8912229 [details]
Bug 1403041 - Fix typo in AudioCallbackDriver member.
https://reviewboard.mozilla.org/r/183598/#review188926
Attachment #8912229 -
Flags: review?(kinetik) → review+
| Reporter | ||
Comment 5•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8912230 [details]
Bug 1403041 - Don't re-enter libcubeb from the audio thread.
https://reviewboard.mozilla.org/r/183600/#review188976
Attachment #8912230 -
Flags: review?(kinetik) → review+
| Reporter | ||
Comment 6•8 years ago
|
||
Thanks for fixing this!
| Assignee | ||
Comment 7•8 years ago
|
||
I'm trying to think of a strategy to prevent this from happening in the future.
| Reporter | ||
Comment 8•8 years ago
|
||
(In reply to Paul Adenot (:padenot) from comment #7)
> I'm trying to think of a strategy to prevent this from happening in the
> future.
I added asserts to the remoting to stop this issue being reintroduced. We could do the same thing in regular libcubeb at some point.
Pushed by paul@paul.cx:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b1962479ed96
Fix typo in AudioCallbackDriver member. r=kinetik
https://hg.mozilla.org/integration/mozilla-inbound/rev/65ff7c0adadc
Don't re-enter libcubeb from the audio thread. r=kinetik
Comment 10•8 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/b1962479ed96
https://hg.mozilla.org/mozilla-central/rev/65ff7c0adadc
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in
before you can comment on or make changes to this bug.
Description
•