Closed Bug 1589931 Opened 3 months ago Closed 2 months ago

Crash in [@ mozilla::AudioCallbackDriver::PanOutputIfNeeded]

Categories

(Core :: DOM: Device Interfaces, defect, critical)

defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox-esr68 --- unaffected
firefox70 --- unaffected
firefox71 --- unaffected
firefox72 --- fixed

People

(Reporter: jseward, Assigned: chunmin)

Details

(Keywords: crash)

Crash Data

Attachments

(3 files)

This bug is for crash report bp-f521bff5-edfd-4b15-91cb-a0b5b0191018.

This crash appears in two different instances of the OSX build of 20191017215425.
Possibly it dereferences |out->output_name| without checking it is null?

Top 10 frames of crashing thread:

0  @0x7fff68f263f0 
1 XUL mozilla::AudioCallbackDriver::PanOutputIfNeeded dom/media/GraphDriver.cpp:1026
2 XUL mozilla::detail::RunnableFunction<mozilla::AudioCallbackDriver::DeviceChangedCallback xpcom/threads/nsThreadUtils.h:564
3 XUL nsThreadPool::Run xpcom/threads/nsThreadPool.cpp:256
4 XUL non-virtual thunk to nsThreadPool::Run xpcom/threads/nsThreadPool.cpp
5 XUL nsThread::ProcessNextEvent xpcom/threads/nsThread.cpp:1225
6 XUL NS_ProcessNextEvent xpcom/threads/nsThreadUtils.cpp:486
7 XUL mozilla::ipc::MessagePumpForNonMainThreads::Run ipc/glue/MessagePump.cpp:333
8 XUL nsThread::ThreadFunc xpcom/threads/nsThread.cpp:458
9 libnss3.dylib _pt_root nsprpub/pr/src/pthreads/ptthread.c:201

Flags: needinfo?(padenot)

This is best fixed by mandating valid strings here in cubeb.

Flags: needinfo?(padenot)

A few crashes showing up in the 11/11 nightly - adding 72 as affected.

Chunmin, do you have time to do this? Should I do it?

Flags: needinfo?(cchang)

Yeah, I could do this.

I think the first thing to decide if we allow cubeb_stream_get_current_device to return a device with NULL output_name or input_name. The AudioUnit Rust backend will return a NULL for output_name when failing getting the current device name. The PulseAudio C and Rust backend does the same thing as well. While the Jack backend will always return a null-terminated(\0) string. If cubeb_stream_get_current_device is disallowed to return a NULL string, we should update document and add a test for that.

Assignee: nobody → cchang
Flags: needinfo?(cchang)
Attached file GitHub Pull Request

Pick commits:
0920240 - Always return null-terminated strings from current_device (#25)

Attachment #9108244 - Attachment description: Bug 1589931 - Only check non-null current output device. r?padenot → Bug 1589931 - P1: Only check non-null current output device. r=padenot
Pushed by apavel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/51cd57a31ea7
P1: Only check non-null current output device. r=padenot
https://hg.mozilla.org/integration/autoland/rev/e6727b7a5391
P2: Update cubeb-audiounit-rs to 0920240. r=padenot
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
You need to log in before you can comment on or make changes to this bug.