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)

defect

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.
Assignee: nobody → padenot
Rank: 19
Priority: -- → P2
An optional small addition since the patches above make things more clear and well looking.
Attachment #8912229 - Flags: review?(kinetik) → 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+
Thanks for fixing this!
I'm trying to think of a strategy to prevent this from happening in the future.
(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
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: