Closed Bug 1567389 Opened 5 years ago Closed 5 years ago

cubeb-alsa causes sandbox violation in rdd

Categories

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

x86_64
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- wontfix
firefox68 --- wontfix
firefox69 --- wontfix
firefox70 --- fixed

People

(Reporter: heftig, Assigned: mjf)

References

(Regression, )

Details

(Keywords: regression)

Crash Data

Attachments

(1 file)

Since the addition of rdd-opus, my Nightly has not been able to play YouTube videos (e.g. https://www.youtube.com/watch?v=COU5T-Wafa4).

The rdd process is crashing. Here's one such crash: https://crash-stats.mozilla.org/report/index/d82dc155-74a3-40b3-9631-ae97a0190718

The Nightly has been built with --enable-alsa. It seems that cubeb-alsa is causing a sandbox violation. STDERR contains:

Sandbox: seccomp sandbox violation: pid 32218, tid 32226, syscall 72, args 6 3 524289 50 140085654716448 0.  Killing process.

To clarify, I'm actually using pulse. Simply having ALSA support built-in is enough.

No longer blocks: sb-audio
Regressed by: 1506291

If I understand correctly, the Opus decoder needs to know if its output is going to be downmixed from stereo to mono… so it connects directly to the default audio output device and, in the process, starts up every configured backend, even though I wouldn't expect any of them to actually work in this context. I think it would make more sense to send the expected channel count down with the other decoder parameters.

mjf: Any ideas about this? (Or pointers to who'd know more about Opus?)

Flags: needinfo?(mfroman)

(In reply to Jed Davis [:jld] ⟨⏰|UTC-6⟩ ⟦he/him⟧ from comment #2)

If I understand correctly, the Opus decoder needs to know if its output is going to be downmixed from stereo to mono… so it connects directly to the default audio output device and, in the process, starts up every configured backend, even though I wouldn't expect any of them to actually work in this context. I think it would make more sense to send the expected channel count down with the other decoder parameters.

mjf: Any ideas about this? (Or pointers to who'd know more about Opus?)

Tim, any thoughts here?

Flags: needinfo?(mfroman) → needinfo?(tterribe)

Changing component because there seems to be rough consensus that the media code should be doing something different here.

Component: Security: Process Sandboxing → Audio/Video
See Also: → 1568524
Assignee: nobody → mfroman
Priority: -- → P2

Pushing a patch to review soon.

Flags: needinfo?(tterribe)
Attachment #9083852 - Attachment description: Bug 1567389 - change OpusDecoder to check options for default device mono. r?bryce! → Bug 1567389 - change OpusDecoder to take default output device mono in constructor. r?bryce!
Attachment #9083852 - Attachment description: Bug 1567389 - change OpusDecoder to take default output device mono in constructor. r?bryce! → Bug 1567389 - change OpusDecoder to take defaultOutputDeviceMono in constructor. r?bryce!
Attachment #9083852 - Attachment description: Bug 1567389 - change OpusDecoder to take defaultOutputDeviceMono in constructor. r?bryce! → Bug 1567389 - change OpusDecoder to take defaultPlaybackDeviceMono in constructor. r?bryce!
Crash Signature: [@ tcp_connection_fallback_handle_change_on_queue]
Attachment #9083852 - Attachment description: Bug 1567389 - change OpusDecoder to take defaultPlaybackDeviceMono in constructor. r?bryce! → Bug 1567389 - change OpusDataDecoder to check for CreateDecoderParams::Option::DefaultPlaybackDeviceMono instead of calling IsDefaultPlaybackDeviceMono(). r?bryce!
Pushed by mfroman@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7236b5a4468f
change OpusDataDecoder to check for CreateDecoderParams::Option::DefaultPlaybackDeviceMono instead of calling IsDefaultPlaybackDeviceMono(). r=bryce
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70

I'm a bit confused by the different regressing bugs attached to this bug. Does this affect versions older than 70? If so, is this something we should consider for uplift?

Flags: needinfo?(mfroman)

(In reply to Ryan VanderMeulen [:RyanVM] from comment #10)

I'm a bit confused by the different regressing bugs attached to this bug. Does this affect versions older than 70? If so, is this something we should consider for uplift?

I don't think we need uplift. This bug is caused specifically by turning on decoding Opus on RDD which we turned on in 70. It just happens that decoding Opus on RDD can cause a sandbox crash because it was attempting to access audio hardware to determine whether the default playback device was mono.

Flags: needinfo?(mfroman)
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: