[VA-API] The RDD process needs to use dma-buf ioctls
Categories
(Core :: Security: Process Sandboxing, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr91 | --- | unaffected |
firefox94 | --- | unaffected |
firefox95 | --- | unaffected |
firefox96 | --- | disabled |
firefox97 | --- | fixed |
People
(Reporter: jld, Assigned: jld)
References
(Blocks 1 open bug)
Details
(Keywords: crash)
Crash Data
Attachments
(1 file)
Found in crash-stats: a lot of crashes while trying to use DMA_BUF_IOCTL_SYNC
, in the RDD process, with references to FFmpeg in the stack. I didn't observe that while testing RDD VA-API locally, and when I asked for feedback from volunteers with newer Intel GPUs I don't think any of them ran into it, but it's happening somehow. Maybe this only happens in the case of using dma-buf with a CPU-side codec?
In any case, it seems fairly obvious that we should allow the 'b'
ioctls in processes that use dma-buf.
Comment 1•3 years ago
|
||
(I am not a developer, but I can mention some aspects I remember.)
bug 1629788 comment 24 implemented media.ffmpeg.dmabuf-textures as alternative upload path for software decoded video.
media.ffmpeg.dmabuf-textures.disabled is false by default (=enabled), but since some patch it has only effect when media.ffmpeg.vaapi.enabled is true.
Non-VAAPI codecs might be uploaded via dmabuf-textures then.
bug 1713276 comment 16 has an overview of decoding paths. There is an open question whether dmabuf-textures are still useful at all. It might be useful when using the operating systems' compositor (gfx.webrender.compositor.force-enabled=true disables WebRender's internal draw compositor), but I don't know.
Comment 2•3 years ago
|
||
(In reply to Darkspirit from comment #1)
(I am not a developer, but I can mention some aspects I remember.)
bug 1629788 comment 24 implemented media.ffmpeg.dmabuf-textures as alternative upload path for software decoded video.
media.ffmpeg.dmabuf-textures.disabled is false by default (=enabled), but since some patch it has only effect when media.ffmpeg.vaapi.enabled is true.
Non-VAAPI codecs might be uploaded via dmabuf-textures then.
bug 1713276 comment 16 has an overview of decoding paths. There is an open question whether dmabuf-textures are still useful at all. It might be useful when using the operating systems' compositor (gfx.webrender.compositor.force-enabled=true disables WebRender's internal draw compositor), but I don't know.
That's correct. When VA-API decode path is enabled we use VA-API directly for supported formats and SW decode + dmabuf texture upload for unsupported formats. This does not apply to AV1 which is decoded by DAV1DDecoder. So you will see SW decode + dmabuf texture upload on hardware which does not support VP8/9 like AMD gpu.
To test dmabuf without VA-API you need to set mUseDMABufSurfaces to true at:
https://searchfox.org/mozilla-central/rev/3d03a3ca09f03f06ef46a511446537563f62a0c6/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp#342
Updated•3 years ago
|
Comment 3•3 years ago
|
||
Alternative STR:
- Enable media.ffmpeg.vaapi.enabled
- Uninstall the VAAPI driver:
$ ls /usr/lib/x86_64-linux-gnu/dri/*drv*
$ sudo apt remove intel-media-va-driver i965-va-driver mesa-va-drivers
- Restart Nightly and watch a video
$ firefox/firefox
libva info: VA-API version 1.13.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: va_openDriver() returns -1
Sandbox: seccomp sandbox violation: pid 28914, tid 29017, syscall 16, args 6 1074291200 140478228689592 140478720195120 0 0. Killing process.
libva info: VA-API version 1.13.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: va_openDriver() returns -1
Sandbox: seccomp sandbox violation: pid 29036, tid 29054, syscall 16, args 8 1074291200 140490616283832 140491108079664 0 0. Killing process.
libva info: VA-API version 1.13.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: va_openDriver() returns -1
[Child 28786, MediaDecoderStateMachine #1] WARNING: Decoder=7fdd5321c200 Decode error: NS_ERROR_OUT_OF_MEMORY (0x8007000e): file /builds/worker/checkouts/gecko/dom/media/MediaDecoderStateMachine.cpp:3568
[Child 28786, MediaDecoderStateMachine #1] WARNING: Decoder=7fdd5321c200 Decode error: NS_ERROR_OUT_OF_MEMORY (0x8007000e): file /builds/worker/checkouts/gecko/dom/media/MediaDecoderStateMachine.cpp:3568
[Child 28786, MediaDecoderStateMachine #1] WARNING: Decoder=7fdd5321c200 Decode error: NS_ERROR_OUT_OF_MEMORY (0x8007000e): file /builds/worker/checkouts/gecko/dom/media/MediaDecoderStateMachine.cpp:3568
Updated•3 years ago
|
Updated•3 years ago
|
Comment 4•3 years ago
|
||
This signature is 95% of all Linux crashes in the December 8th Nightlies.
Assignee | ||
Comment 5•3 years ago
|
||
In some cases (doing video decode on the CPU and uploading the result
with dmabuf) we'll need to use DMA_BUF_IOCTL_SYNC
in the RDD process.
This patch allows that ioctl type ('b', used only by dmabuf and Android
binder; the latter doesn't apply on Desktop), for forward compatibility
with any future usage of dmabuf ioctls.
Comment 6•3 years ago
|
||
The severity field is not set for this bug.
:gcp, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•3 years ago
|
Updated•3 years ago
|
Comment 8•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Comment 9•3 years ago
|
||
:stransky, the crash with signature mozilla::PRDDChild::OtherPid
has reappeared recently.
Comment 10•3 years ago
|
||
(In reply to Calixte Denizet (:calixte) from comment #9)
:stransky, the crash with signature
mozilla::PRDDChild::OtherPid
has reappeared recently.
Dupe of Bug 1751709?
Description
•