Closed Bug 1936675 Opened 2 months ago Closed 1 month ago

Crash in [@ AAudioStream_getFramesWritten.cfi]

Categories

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

Unspecified
Android
defect

Tracking

()

RESOLVED FIXED
136 Branch
Tracking Status
firefox-esr128 --- unaffected
firefox134 --- wontfix
firefox135 --- fixed
firefox136 --- fixed

People

(Reporter: aryx, Assigned: pehrsons)

References

(Regression)

Details

(Keywords: crash, regression)

Crash Data

Attachments

(4 files)

60 crashes from 40 installs per release cycle, only crash reports for Android 12 and 15, Google Pixel devices and HTC Desire 22 pro stand out.

Crash report: https://crash-stats.mozilla.org/report/index/b699b487-744f-4599-b1bb-d3a0d0241208

Reason:

SIGSEGV / SEGV_MAPERR

Top 8 frames:

0  libaaudio.so  AAudioStream_getFramesWritten.cfi
1  libxul.so  reinitialize_stream(cubeb_stream*)::$_0::operator()() const  media/libcubeb/src/cubeb_aaudio.cpp:1045
1  libxul.so  std::__ndk1::__invoke[abi:nn180000]<reinitialize_stream(cubeb_stream*)::$_0, ...  /builds/worker/fetches/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/__type_traits/invoke.h:344
1  libxul.so  _ZNSt6__ndk116__thread_executeB8nn180000INS_10unique_ptrINS_15__thread_struct...  /builds/worker/fetches/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/__thread/thread.h:190
1  libxul.so  std::__ndk1::__thread_proxy[abi:nn180000]<std::__ndk1::tuple<std::__ndk1::uni...  /builds/worker/fetches/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/__thread/thread.h:199
2  libmozglue.so  set_alt_signal_stack_and_start(PthreadCreateParams*)  mozglue/interposers/pthread_create_interposer.cpp:81
3  libc.so  __pthread_start(void*)
4  libc.so  __start_thread

Would you have any thoughts here :kinetik?

Flags: needinfo?(kinetik)
Severity: -- → S3

AAudioStream_getFramesWritten is called with nullptr, we should handle this. Andreas, do you want to fold that in your buffering work or do you want me to take this?

Flags: needinfo?(kinetik) → needinfo?(apehrson)
Assignee: nobody → apehrson
Status: NEW → ASSIGNED
Flags: needinfo?(apehrson)
Priority: -- → P2
Keywords: regression
Regressed by: 1902263

I haven't worked out how to reproduce this. In my mind, reinit without an output stream means reinit on an input-only stream. But on Android we shouldn't get an input-only stream since we only expose one input device. Input-only streams are used only when we open multiple input devices.

So perhaps these crashes are hitting a different mode, where, say, the output stream is removed before the async reinit function runs.

I have a patch that should fix the immediate crash regardless. But per the above I am not sure whether there may be still be a lingering failure mode once landed.

Set release status flags based on info from the regressing bug 1902263

The fewer lines added the better, and narrow down the use of
DisableCrashReporter in the parent process to a minimum.

Pushed by pehrsons@gmail.com: https://hg.mozilla.org/integration/autoland/rev/cc717fd675d9 Improve diff in libcubeb/0002 patch. r=cubeb-reviewers,padenot https://hg.mozilla.org/integration/autoland/rev/65f1f60bc400 Update libcubeb to 292f7564. r=cubeb-reviewers,padenot
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch

The fewer lines added the better, and narrow down the use of
DisableCrashReporter in the parent process to a minimum.

Original Revision: https://phabricator.services.mozilla.com/D233658

Attachment #9446663 - Flags: approval-mozilla-beta?
Attachment #9446664 - Flags: approval-mozilla-beta?

beta Uplift Approval Request

  • User impact if declined: Crashes on Android when capturing a microphone, exact trigger unclear
  • Code covered by automated testing: no
  • Fix verified in Nightly: no
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: No steps, we'll have to monitor crash-stats.
  • Risk associated with taking this patch: low
  • Explanation of risk level: trivial fix for android, riding along is a trivial assert fix for opensl (older android) and a simple fix for a narrow default device selection case on windows
  • String changes made/needed: none
  • Is Android affected?: yes
Attachment #9446663 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9446664 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: