WARNING: 7f42da7d7dc0 OpenCubeb() failed to init cubeb: file /build/firefox-RH6krf/firefox-115.0+build2/dom/media/AudioStream.cpp:281
Categories
(Core :: Security: Process Sandboxing, defect)
Tracking
()
People
(Reporter: marietto2008, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0
Steps to reproduce:
ziomario@Z390-AORUS-PRO-DEST:~$ firefox
[GFX1-]: More than 1 GPU from same vendor detected via PCI, cannot deduce device
[Parent 8662, Main Thread] WARNING: Unable to connect to ibus: Could not connect: Connection refused: 'glib warning', file /build/firefox-RH6krf/firefox-115.0+build2/toolkit/xre/nsSigHandlers.cpp:167
(firefox:8662): IBUS-WARNING **: 14:25:21.696: Unable to connect to ibus: Could not connect: Connection refused
[Child 11787, MediaDecoderStateMachine #1] WARNING: 7f42da7d7dc0 OpenCubeb() failed to init cubeb: file /build/firefox-RH6krf/firefox-115.0+build2/dom/media/AudioStream.cpp:281
[Child 11787, MediaDecoderStateMachine #1] WARNING: Decoder=7f42e8205800 [OnMediaSinkAudioError]: file /build/firefox-RH6krf/firefox-115.0+build2/dom/media/MediaDecoderStateMachine.cpp:4604
[Child 11787, MediaDecoderStateMachine #1] WARNING: 7f42f902d4c0 OpenCubeb() failed to init cubeb: file /build/firefox-RH6krf/firefox-115.0+build2/dom/media/AudioStream.cpp:281
[Child 11787, MediaDecoderStateMachine #1] WARNING: Decoder=7f42f50efd00 [OnMediaSinkAudioError]: file /build/firefox-RH6krf/firefox-115.0+build2/dom/media/MediaDecoderStateMachine.cpp:4604
[Child 11787, MediaDecoderStateMachine #1] WARNING: 7f42e076b820 OpenCubeb() failed to init cubeb: file /build/firefox-RH6krf/firefox-115.0+build2/dom/media/AudioStream.cpp:281
[Child 11787, MediaDecoderStateMachine #1] WARNING: Decoder=7f42f50efd00 [OnMediaSinkAudioError]: file /build/firefox-RH6krf/firefox-115.0+build2/dom/media/MediaDecoderStateMachine.cpp:4604
[Child 11787, MediaDecoderStateMachine #1] WARNING: 7f42d8cab280 OpenCubeb() failed to init cubeb: file /build/firefox-RH6krf/firefox-115.0+build2/dom/media/AudioStream.cpp:281
[Child 11787, MediaDecoderStateMachine #1] WARNING: Decoder=7f42f50efd00 [OnMediaSinkAudioError]: file /build/firefox-RH6krf/firefox-115.0+build2/dom/media/MediaDecoderStateMachine.cpp:4604
Actual results:
I don't hear any audio.
Expected results:
I should hear audio from videos on line and offline.
| Reporter | ||
Comment 1•3 years ago
|
||
(I'm running ubuntu 23.04 - lunar).
Comment 2•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 3•3 years ago
|
||
Maybe a media format issue, or some sort of device specific problem in cubeb. Mathew what are the potential causes of a failed call to CubebUtils::CubebStreamInit?
Updated•3 years ago
|
I can also confirm this bug in 115.4.0esr (64-bit), as shipped in Debian 12. This did not occur with 102.15.1esr, to the best of my knowledge.
I had seemingly identical symptoms, no sound and
[MediaDecoderStateMachine #1] WARNING: OpenCubeb() failed to init cubeb: file ./dom/media/AudioStream.cpp:281
would appear each time a page tried to play audio. about:support correctly listed my audio device along with the expected backend.
Quick disclaimer, which may not be true for the reporter: My system is an ALSA-only system, no Pipewire or PulseAudio.
In my case, about:support was full of "Rejected System Calls" for syscall 220, which was a hint.
Running with MOZ_LOG=cubeb:5, I also saw seccomp warnings repeated quite frequently.
Sandbox: seccomp sandbox violation: pid 89629, tid 89805, syscall 220, args 65543 139974933195068 2 0 8 0.
I was able to workaround this by adding 220 to about:config's security.sandbox.content.syscall_whitelist. Sound immediately worked after doing so. Removing it from a running session did not seem to have an impact, so it's possible that syscall is only needed on sound initialization.
Comment 5•5 months ago
|
||
amppotato's comment 4 is the real diagnosis here: seccomp sandbox violation: ... syscall 220 is clone3, which is denied in the content
sandbox (security/sandbox/linux/SandboxFilter.cpp — added by bug
1715254 in Firefox 91). The denial is intentional: glibc's clone3
wrapper is supposed to fall back to clone() on ENOSYS, and that
fallback is what Firefox's pthreads rely on to spawn threads inside
the sandbox.
If a glibc/toolchain combination doesn't honour the fallback
(amppotato's Debian 12 ALSA-only system in 115.4.0esr), thread
creation fails in the content process and every cubeb stream init
downstream of it fails — surfacing as OpenCubeb() failed to init.
Not a cubeb bug: the "audio init fails" message is just the first
visible symptom of the thread-spawn being denied.
Marietto (comment 0) — to work out whether you're hitting the same
thing as amppotato or something different: what audio backend is
your Ubuntu 23.04 using (PipeWire, PulseAudio, or ALSA)? pactl info
will report if PulseAudio/PipeWire is in use; if neither is running
you're on ALSA. And does your about:support show any "Rejected
System Calls"? If it's the same clone3 denial you'd see syscall 220
listed there.
Moving the component to Core :: Security: Process Sandboxing for the
clone3-fallback investigation; bug 1715254 is the relevant landmark.
Clearing ni on me.
Comment 6•5 months ago
|
||
clone3 would fail with ENOSYS without logging since bug 1715254 (landed in 91, so 115esr would be covered); logging is for otherwise unhandled syscalls. Also, if pthread_create were broken in sandboxed processes, basically nothing would work.
More importantly, syscall 220 on x86_64 isn't clone3; it's semtimedop, for SysV IPC, which ALSA is known to use for the dmix plugin and possibly others. (The other hint it's not clone3 is that clone3 takes a pointer and size, in that order, and the args aren't reasonable for that.)
So what I'd ask is, if it's still possible to reproduce this: In about:config, is the pref media.cubeb.sandbox set to false? As far as I know that hasn't been supported for some time; the pref flip seems to have been bug 1434156 which was in Firefox 60. If that's the case, reset the pref to its default value, restart the browser, and try again.
Comment 7•5 months ago
|
||
Redirect a needinfo that is pending on an inactive user to the triage owner.
:jstutte, since the bug has recent activity, could you have a look please?
For more information, please visit BugBot documentation.
Comment 8•5 months ago
|
||
Seems we did not get an answer to your pref question. If that is our theory, there is probably nothing left to do here?
Comment 9•4 months ago
|
||
(In reply to Jens Stutte [:jstutte] from comment #8)
Seems we did not get an answer to your pref question. If that is our theory, there is probably nothing left to do here?
At this point I'll assume my guess about the pref is correct, which makes this WONTFIX, unless I'm told otherwise.
Description
•