Closed Bug 1784560 Opened 2 years ago Closed 2 years ago

Widevine plugin crashes in local build with GMP sandbox: "Required key not available"

Categories

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

Firefox 103
x86_64
Linux
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: dan76, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

529.73 KB, text/plain
Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0

Steps to reproduce:

I used any site streaming DRM content like Netflix, Tidal etc.

Actual results:

Firefox shows "The WidevineCmd plugin has crashed" [Reload Page]

In the log, it shows:
"Sandbox: failed to open plugin file /home/fraga/.mozilla/firefox/z9v4t3xf.default-default/gmp-widevinecdm/4.10.2449.0/libwidevinecdm.so: Required key not available"

Expected results:

The stream should've been played.

As a workaround I'm using MOZ_DISABLE_GMP_SANDBOX=1. Without this workaround, I have to disable DRM on Firefox, enable DRM again so it will install again the Widevine plugin and it works, but it's tiresome to do this evert time I restart the computer.

Component: Untriaged → Security
OS: Unspecified → Linux
Hardware: Unspecified → x86_64

I could not reproduce the crash on Ubuntu 20.4 using build 103.0 (2022071855818), all I had to do was to enable the DRM from browser on both Wayland and normal.
Can you still reproduce the crash using latest Beta 104.0 (https://archive.mozilla.org/pub/firefox/candidates/104.0-candidates/build2/) and use Firefox in Safe Mode? (Safe Mode disables add-ons, extensions and themes, hardware acceleration and some JavaScript stuff in order to exclude some possible reasons for problems.) See https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode. Thank you.

Flags: needinfo?(dan76)

I tested with the latest Beta 104.0 with --safe-mode and it shows the same error.

Flags: needinfo?(dan76)

On Linux Fedora36 I am getting "Key system configuration is not supported" after enabling DRM on Firefox 104.0.
Assigning component for developers to take a look. Thank you.

Component: Security → Top Sites

The severity field is not set for this bug.
:dao, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(dao+bmo)
Component: Top Sites → Audio/Video: GMP
Product: Firefox → Core

Are there any crashes in your about:crashes page?

(In reply to Jim Mathies [:jimm] from comment #5)

Are there any crashes in your about:crashes page?

Yes:

https://crash-stats.mozilla.org/report/index/583a0f1b-f1ff-44e9-b87b-1952a0220909

I also get the following in the syslog:

Sep 9 16:19:20 tux kernel: MainThread[27874]: segfault at 0 ip 00007f606b167384 sp 00007ffda95572b0 error 6 in libmozsandbox.so[7f606b15b000+1e000]
Sep 9 16:19:20 tux kernel: Code: ff 8b 38 e8 8e 40 ff ff 48 8d 35 78 88 01 00 48 8d 5c 24 10 48 89 df 4c 89 f2 48 89 c1 e8 24 00 00 00 48 89 df e8 5c ec ff ff <c7> 04 25 00 00 00 00 9f 02 00 00 e8 8c 41 ff ff e8 e7 3e ff ff 00

The crash report doesn't have any symbols (to tell us where the crash happened).
A crash report from a build downloaded from https://www.mozilla.org/firefox/download/thanks/ should be more helpful.

I also wonder whether running with MOZ_SANDBOX_LOGGING=1 in the environment provides any additional output?

Flags: needinfo?(dao+bmo) → needinfo?(dan76)
Attached file sandbox-log.txt (obsolete) —

Ok, with the official build (105.0.1) it doesn't crash, but it stalls when I try to play music from Tidal (it never starts the song). I attached the sandbox-log.txt file.

Flags: needinfo?(dan76)

Where did the crashing build come from?

The output from the Mozilla build shows failure to create an audio stream:

WARNING: 7fce1969bdc0 OpenCubeb() failed to init cubeb: file /builds/worker/checkouts/gecko/dom/media/AudioStream.cpp:281

Does paplay /usr/share/sounds/freedesktop/stereo/bell.oga (or use another audio file if that doesn't exist) produce sound?

Severity: -- → S4

(In reply to Karl Tomlinson (:karlt) from comment #10)

Where did the crashing build come from?
Does paplay /usr/share/sounds/freedesktop/stereo/bell.oga (or use another audio file if that doesn't exist) produce sound?

The crash comes from my own build. I always compile Firefox from scratch.

Regarding the error, I forgot to mention I don't use Pulseaudio, only ALSA. So I'm afraid I wouldn't be able to use the official build. Sorry about that.

I'll try to build it myself with:

export MOZ_DEBUG_SYMBOLS=1
ac_add_options --enable-debug

If I get the crash report with the symbols, I'll post here.

Crash reports use only server-side symbols AFAIK, so I guess won't be helpful with a local debug build.
You may be able to collect a stack trace with gdb, but due to the number of processes involved MOZ_DEBUG_CHILD_PROCESS=1 in the environment would be useful to attach to the correct process. rr is a better way to debug.
Or MOZ_SANDBOX_LOGGING=1 may provide some useful info for your local build.

Ok, sandbox log with local build attached. I tried with rr and I got the following:

$ rr /usr/lib/firefox/plugin-container 6932
rr: Saving execution to trace directory `/home/fraga/.local/share/rr/plugin-container-2'.
Hit MOZ_CRASH(aProcessTypeString is not valid.) at /usr/src/hg/mozilla/mozglue/misc/ProcessType.cpp:55
#01: mozilla::SetGeckoProcessType(char const*)[/usr/lib/firefox/plugin-container +0x68d76]
#02: ???[/usr/lib/firefox/plugin-container +0xdb00]
#03: ???[/lib/libc.so.6 +0x272b7]
#04: __libc_start_main[/lib/libc.so.6 +0x27375]
#05: _start[/usr/lib/firefox/plugin-container +0xd901]
#06: ??? (???:???)
Segmentation fault


If there's a better way to debug using rr, let me know. Thanks!

Attachment #9296998 - Attachment is obsolete: true

The log indicates that the crash occurs at https://searchfox.org/mozilla-central/rev/560b7b1b174ed36912b969eee0c1920f3c59bc56/security/sandbox/linux/Sandbox.cpp#667

This doesn't seem like the best mode of failure, but the intention of Widevine is that it will not let itself be run by unexpected binaries. That means it is not possible to use Widevine from a local build.

Summary: Widevine plugin crashes with GMP sandbox: "Required key not available" → Widevine plugin crashes in local build with GMP sandbox: "Required key not available"

(In reply to Karl Tomlinson (:karlt) from comment #14)

This doesn't seem like the best mode of failure, but the intention of Widevine is that it will not let itself be run by unexpected binaries. That means it is not possible to use Widevine from a local build.

I see, so I'll keep using MOZ_DISABLE_GMP_SANDBOX=1 as a workaround.

So I'm marking this as "invalid", since it's not a bug.

Thank you very much!

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: