Closed Bug 1866014 Opened 10 months ago Closed 10 months ago

Crash in [@ cubeb_coreaudio::backend::buffer_manager::BufferManager::new]

Categories

(Core :: Audio/Video: cubeb, defect, P1)

Unspecified
macOS
defect

Tracking

()

RESOLVED FIXED
122 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox120 --- unaffected
firefox121 --- unaffected
firefox122 + fixed

People

(Reporter: aryx, Assigned: pehrsons)

References

(Regression)

Details

(Keywords: crash, regression, topcrash)

Crash Data

Attachments

(5 files)

7 crashes on macOS from 2+ installations of Firefox 122.0a1 20231121183118

Crash report: https://crash-stats.mozilla.org/report/index/2f0f39ec-eb1f-452e-ab5c-34fee0231122

MOZ_CRASH Reason: assertion failed: input_channel_count >= input_channels_to_ignore + output_channel_count

Top 10 frames of crashing thread:

0  XUL  MOZ_Crash  mfbt/Assertions.h:281
0  XUL  RustMozCrash  mozglue/static/rust/wrappers.cpp:18
1  XUL  mozglue_static::panic_hook  mozglue/static/rust/lib.rs:96
2  XUL  core::ops::function::Fn::call  library/core/src/ops/function.rs:79
3  XUL  <alloc::boxed::Box<F, A> as core::ops::function::Fn<Args>>::call  library/alloc/src/boxed.rs:2021
3  XUL  std::panicking::rust_panic_with_hook  library/std/src/panicking.rs:735
4  XUL  std::panicking::begin_panic_handler::{{closure}}  library/std/src/panicking.rs:601
5  XUL  std::sys_common::backtrace::__rust_end_short_backtrace  library/std/src/sys_common/backtrace.rs:170
6  XUL  rust_begin_unwind  library/std/src/panicking.rs:597
7  XUL  core::panicking::panic_fmt  library/core/src/panicking.rs:72
Flags: needinfo?(padenot)

Taking as a P1 because this is a release assertion.

Assignee: nobody → apehrson
Severity: -- → S2
Status: NEW → ASSIGNED
Flags: needinfo?(padenot)
Priority: -- → P1
Regressed by: 1670633
No longer regressed by: 1864141
OS: Unspecified → macOS

This is triggered by creating a duplex cubeb stream with a stereo input.

:phersons do you think you'll have a patch for this today?
Else, we could backout the regressor until you have a fix and then you can land it again

Flags: needinfo?(apehrson)

I could reproduce this on macOS with Google Meet and https://www.onlinemictest.com/ when selecting an external microphone.

I should have a patch for this later today or early tomorrow. Feel free to back out if you find it appropriate.

(In reply to Simon Pieters [:zcorpan] from comment #4)

I could reproduce this on macOS with Google Meet and https://www.onlinemictest.com/ when selecting an external microphone.

Any multi-channel input device will do. Mono devices are fine. You can inspect the channel count of your devices with the Audio MIDI Setup app.
Somehow the BlackHole virtual device we use in CI doesn't trigger this. I haven't yet figured out why.

Flags: needinfo?(apehrson)

(In reply to Andreas Pehrson [:pehrsons] from comment #5)

I should have a patch for this later today or early tomorrow. Feel free to back out if you find it appropriate.

(In reply to Simon Pieters [:zcorpan] from comment #4)

I could reproduce this on macOS with Google Meet and https://www.onlinemictest.com/ when selecting an external microphone.

Any multi-channel input device will do. Mono devices are fine. You can inspect the channel count of your devices with the Audio MIDI Setup app.
Somehow the BlackHole virtual device we use in CI doesn't trigger this. I haven't yet figured out why.

Thanks for the update, I'll request a backout - the volume is low but there's no workaround for those impacted.
At least you'll have time to work on a fix without this impacting nightly users in the meantime.

To avoid blocking pending updates to cubeb-coreaudio-rs on bug 1866014, this
patch will avoid that assertion failure by requesting only mono input.

To ensure that a proper fix follows, this patch also includes a compiler #error
in non-nightly builds.

Keywords: leave-open
Attachment #9365273 - Attachment description: Bug 1866014 - Temporarily only request mono input. r?padenot! → Bug 1866014 - Temporarily only request mono input on MacOS. r?padenot!
Pushed by pehrsons@gmail.com: https://hg.mozilla.org/integration/autoland/rev/c0d256e9cde9 Temporarily only request mono input on MacOS. r=padenot

Backed out for causing build bustages in MediaEngineWebRTCAudio.cpp

Flags: needinfo?(apehrson)
Pushed by pehrsons@gmail.com: https://hg.mozilla.org/integration/autoland/rev/6c9f279516f2 Temporarily only request mono input on MacOS. r=padenot
Flags: needinfo?(apehrson)

:pehrsons for my understanding of tracking, a patch landed here but there are still crash reports.
The bug is marked leave-open, are you planning on creating another patch here?

Flags: needinfo?(apehrson)

Reproduced with Microsoft Teams meeting, on latest nightly Firefox 122.0a1 (2023.11.27) with macOS 12, when tried to join a meeting encountered a crash with the same signature: https://crash-stats.mozilla.org/report/index/4a419d92-7ccd-4592-8e0c-044210231127.
Encountered the same crash when tried to allowed the microphone prompt from link: https://jsfiddle.net/jib1/n7bmkjnf; camera and microphone prompt from link: https://mozilla.github.io/webrtc-landing/gum_test.html.
Tested with Firefox 121.0b3 following the same steps Firefox not crashed.

Flags: needinfo?(aryx.bugmail)

Leaving this to Andreas.

Flags: needinfo?(aryx.bugmail)

There appears to be a lingering issue which I'll take a look at ASAP. I intend to keep the bug open until I have landed a longer-term fix and removed the patches for the temporary fix(es). I intend to get this done in 122.

Flags: needinfo?(apehrson)

Setting media.getusermedia.channels to 1 is a workaround. I'll add a patch to change the default temporarily.

To avoid blocking pending updates to cubeb-coreaudio-rs on bug 1866014, this
patch will avoid that assertion failure by requesting only mono input.

Pushed by pehrsons@gmail.com: https://hg.mozilla.org/integration/autoland/rev/f95051b22c4a Undo previous patch that didn't cover all cases. r=padenot https://hg.mozilla.org/integration/autoland/rev/6aa54d6d7cbf Temporarily only request mono input on MacOS, take 2. r=padenot

The bug is linked to a topcrash signature, which matches the following criterion:

  • Top 10 desktop browser crashes on nightly

For more information, please visit BugBot documentation.

Keywords: topcrash

The crash is fixed so I'm downgrading the severity. Followup patches are coming soon.

Severity: S2 → S3
Keywords: leave-open

The bug is marked as tracked for firefox122 (nightly). However, the bug still has low severity.

:jimm, could you please increase the severity for this tracked bug? If you disagree with the tracking decision, please talk with the release managers.

For more information, please visit BugBot documentation.

Flags: needinfo?(jmathies)

(In reply to Andreas Pehrson [:pehrsons] from comment #22)

The crash is fixed so I'm downgrading the severity. Followup patches are coming soon.

:pehrsons Fx122 goes to beta on 2023-12-18, do you plan on landing a further fix before then? (asking for release tracking purposes)

Flags: needinfo?(apehrson)

(In reply to Donal Meehan [:dmeehan] from comment #24)

:pehrsons Fx122 goes to beta on 2023-12-18, do you plan on landing a further fix before then? (asking for release tracking purposes)

Yes.

Flags: needinfo?(apehrson)
Pushed by pehrsons@gmail.com: https://hg.mozilla.org/integration/autoland/rev/71b017d6aa59 Update cubeb-coreaudio-rs to 2a040b24. r=cubeb-reviewers,kinetik https://hg.mozilla.org/integration/autoland/rev/1ead6f3b5dc1 Remove temporary Mac-only mono input channel count limit. r=padenot
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 122 Branch
Regressions: 1869068
Flags: qe-verify+
Flags: needinfo?(jmathies)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: