Closed Bug 1752106 Opened 3 years ago Closed 3 years ago

VAAPI dmabuf allocation error

Categories

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

Firefox 98
defect

Tracking

()

RESOLVED DUPLICATE of bug 1752097

People

(Reporter: pmenzel+bugzilla.mozilla.org, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(5 files)

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

Steps to reproduce:

Start Nightly 98.0a1 (20220126034745) with

 MOZ_LOG="PlatformDecoderModule:1" nightly &

and restore a lot of windows with a lot of tabs.

Actual results:

After closing Nightly, reviewing the logs I see

[Child 366581, MediaDecoderStateMachine #1] WARNING: Decoder=7fe80caa6a00 Decode error: NS_ERROR_DOM_MEDIA_DECODE_ERR (0x806e0004) - mozilla::MediaResult mozilla::FFmpegVideoDecoder<58>::CreateImageVAAPI(int64_t, int64_t, int64_t, MediaDataDecoder::DecodedData &): VAAPI dmabuf allocation error: file /builds/worker/checkouts/gecko/dom/media/MediaDecoderStateMachine.cpp:3568
[Child 366581, MediaDecoderStateMachine #1] WARNING: Decoder=7fe80caa6a00 Decode error: NS_ERROR_DOM_MEDIA_DECODE_ERR (0x806e0004) - mozilla::MediaResult mozilla::FFmpegVideoDecoder<58>::CreateImageVAAPI(int64_t, int64_t, int64_t, MediaDataDecoder::DecodedData &): VAAPI dmabuf allocation error: file /builds/worker/checkouts/gecko/dom/media/MediaDecoderStateMachine.cpp:3568
[Child 366581, MediaDecoderStateMachine #1] WARNING: Decoder=7fe80caa6a00 Decode error: NS_ERROR_DOM_MEDIA_DECODE_ERR (0x806e0004) - mozilla::MediaResult mozilla::FFmpegVideoDecoder<58>::CreateImageVAAPI(int64_t, int64_t, int64_t, MediaDataDecoder::DecodedData &): VAAPI dmabuf allocation error: file /builds/worker/checkouts/gecko/dom/media/MediaDecoderStateMachine.cpp:3568
[Child 366581, MediaDecoderStateMachine #1] WARNING: Decoder=7fe80caa6a00 Decode error: NS_ERROR_DOM_MEDIA_DECODE_ERR (0x806e0004) - mozilla::MediaResult mozilla::FFmpegVideoDecoder<58>::CreateImageVAAPI(int64_t, int64_t, int64_t, MediaDataDecoder::DecodedData &): VAAPI dmabuf allocation error: file /builds/worker/checkouts/gecko/dom/media/MediaDecoderStateMachine.cpp:3568

I have no idea, what Web page this is from.

Expected results:

No warnings should be printed.

The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core

I think it's dupe of Bug 1751709. Please try to run with MOZ_SANDBOX_LOGGING=1 env variable.

Flags: needinfo?(pmenzel+bugzilla.mozilla.org)

Thank you for quickly looking at this. Unfortunately, I do not know how to reproduce this – neither by playing a VP8 test video not H264 from YouTube. Do you have a reproducer for me?

Flags: needinfo?(pmenzel+bugzilla.mozilla.org)

Please find the log from a normal start without doing much besides restoring the previous session.

Also, I neither saw crashes in <about:crashes> or coredumpctl.

So, I think that I've encountered the same bug, since I only noticed a day or two ago that my APU's video ASIC wasn't being utilized; it worked just fine at the beginning of the month at least. As far as I can tell, according to the terminal messages when verbose logging is in place, there is no crash in the RDD process, but there is an issue with sandboxing.

My operating system is Ubuntu Impish Indri, my Desktop session is GNOME Wayland version 40.4.0, my APU is an Intel i5-1035G1, my version of Mesa is 21.3.4~kisak1~i, my version of the Intel media drivers is intel-media-va-driver/impish,now 21.3.3+dfsg1-1, and my version of Firefox is the latest Nightly build at the time of writing. After noticing that hardware decoding did not work, I tried disabling FFvpx as I recalled that it did not support VA-API for the longest time. After that failed to yield any results, I tried disabling the RDD process, since I recalled that that was another workaround for getting VA-API to work in the past. As that did not yield any results either, I reenabled both and then turned to Bugzilla, where I came across this report.

I've created a fresh new profile for the purposes of this comment. After creating the profile, I enabled media.ffmpeg.vaapi.enabled and installed enhanced-h264ify so as to force YouTube to serve me VP9 videos. After quickly verifying that hardware decoding still did not work, I ran MOZ_LOG=MediaDecoder:5,PlatformDecoderModule:5 MOZ_SANDBOX_LOGGING=5 firefox-nightly > firefox_log.txt 2>&1, opened a YouTube video that I had set aside beforehand, played the video for five seconds, paused video playback, and closed the browser. The log file will follow shortly after this comment.


I would like to take a moment to say that the logging system is practically undocumented from a regular user's point of view, because this is atrocious and this is so obscure that I was just plain lucky that I ran into a bug report earlier today that linked to it. I literally had to scrape together the environment variables used above from other bug reports that I remembered having them as well as this one before running into the latter piece of documentation.

Also, using MOZ_LOG_FILE=[filename] resulted in several ${MOZ_LOG_FILE}.child-[1-9].moz_log files, seven of them empty and two incomplete, and one ${MOZ_LOG_FILE}.moz_log file, empty as well.

Attached file firefox_log.txt

Search for DMABuf or going to line 5012 to see the DMA-BUF error in the sea of sandboxing errors.

Okay. Dmabuf support will be removed and we're going to use decode to shm so that will be fixed by Bug 1752097.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE

Also to avoid that bug until it's removed set media.ffmpeg.dmabuf-textures.disabled to true at about:config.

(In reply to Martin Stránský [:stransky] (ni? me) from comment #11)

Also to avoid that bug until it's removed set media.ffmpeg.dmabuf-textures.disabled to true at about:config.

That results in YouTube videos not playing at all.

Attached file firefox_log_two.txt

I tried playing two videos, but they never started playing, even after buffering for more than enough time. The same DMA-BUF error message is present, but this time Firefox deletes and releases the DMA-BUF surface immediately after the DMA-BUF error message.

Attached image image.png

Eventually, this happens.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: