Closed Bug 1757998 Opened 2 years ago Closed 2 years ago

Firefox stutters and keeps spawning zombie RDD process after loading video

Categories

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

Firefox 98
defect

Tracking

()

RESOLVED DUPLICATE of bug 1761942

People

(Reporter: lars, Unassigned, NeedInfo)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

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

Steps to reproduce:

Watch a HTML5 video, e.g. on Reddit

Actual results:

After trying to load the video (even if the video does not actually load), the entire process stutters periodically (every half second or so). This is visible in the entire browser: in scrolling pages, video playback, and loading of pages.

In my process manager I can see that Firefox keeps spawning new RDD process with every stutter. These end up as zombie processes. There is one RDD process that is not a zombie, which is in disk sleep.

Expected results:

Firefox just loads the video and does not stutter or keep spawning RDD processes.

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

Would you mind to paste your about:support? Does this issue happen on a specific video? or all videos on Reddits? Would it also happen on other media sites, such like Youtube?

Is this issue a regression? (if so, you could use mozregrssion to find a cultprit)

Thanks.

Flags: needinfo?(lars)

It seems I'm affected too.
Loading youtube seems to immediatly spawn a couple of Zombie RDD Processes, that are bounf to increase during time
Youtube is affected strongly. When starting a video (or an AD), it can remain stuck with a loading circle with a fixed image or a white/black screen (sometimes switching between each other) can appear. After some time the video may start (sometime it doesn't, sometimes it do), however it seems that it's picking a lower resolution 480p instead of 7020p or 1080p (that ehy originally have selected). I need to check whetever low res videos are affected too. Also live streamings doesn't seem affected by themseves, but an AD playing can. (The zombie spawn seems still present however, would need to check starting a stream without opening other yt pages)
When a youtube page is loading/reloading or the video is stuck firefox is overall unresponsive for the first few seconds, then it remain stuttery
(For me this just happened with a recent video from Miracle of Sound the last Horizon song)
Twitch is affected too but has different symptoms: a live streaming can sometime crash with a decoding error. The button to reload the loader generally works, but it isn't stable, sometime it make me reload a lot of time in few seconds. Even here setting a 480p resolution seems better.

reddit and twitter seems affected youtube style.
There is one NSFW site that seems unaffected.
Loading firefox from a console give me a lot of:
libva info: VA-API version 1.13.0
libva info: Trying to open /usr/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_13
ATTENTION: default value of option mesa_glthread overridden by environment.
/usr/share/libdrm/amdgpu.ids: Permission denied

(not sure about the mesa warning, I didn't change any environment option)

and a lot of:
[Child 91263, MediaDecoderStateMachine #1] WARNING: Decoder=7f2ed36eb100 Decode error: NS_ERROR_OUT_OF_MEMORY (0x8007000e): file /builds/worker/checkouts/gecko/dom/media/MediaDecoderStateMachine.cpp:3577

(I still have plenty of memory, this was with a instance just loaded and with 1 youtube page loaded)

Using MOZ_DISABLE_RDD_SANDBOX=1 seems to resolve the issues. (at least consistently with youtube)

ArchLinux Firefox 99.0a1 (2022-03-03) Nightly. mesa 21.3.7-1 AMD RX 580 8G Ryzen 5 2600x, kernel linux-tkg-pds 5.16.12

Would disabling the pref media.ffmpeg.vaapi.enabled help?

Flags: needinfo?(lorenzofersteam)
Attached file about:support
(In reply to Alastor Wu [:alwu] from comment #2)
> Would you mind to paste your `about:support`? Does this issue happen on a specific video? or all videos on Reddits? Would it also happen on other media sites, such like Youtube?
> 
> Is this issue a regression? (if so, you could use [mozregrssion](https://mozilla.github.io/mozregression/) to find a cultprit)
> 
> Thanks.

Certainly:

```

(In reply to Alastor Wu [:alwu] from comment #2)

Would you mind to paste your about:support? Does this issue happen on a specific video? or all videos on Reddits? Would it also happen on other media sites, such like Youtube?

Is this issue a regression? (if so, you could use mozregrssion to find a cultprit)

Thanks.

It happens with any video on e.g. Reddit, Facebook, and LinkedIn, but not on YouTube.

It's a new issue for me (it didn't use to happen), so I guess it's a regression, although I'm not completely certain whether it's a Firefox update or something else that started it.

Flags: needinfo?(lars)

(In reply to Lorenzo Ferrillo from comment #3)

Loading firefox from a console give me a lot of:
libva info: VA-API version 1.13.0
libva info: Trying to open /usr/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_13
ATTENTION: default value of option mesa_glthread overridden by environment.
/usr/share/libdrm/amdgpu.ids: Permission denied

I can confirm: same error when I run Firefox in a terminal. The error appears with every stutter (and everytime a new RDD process is spawned).

(In reply to Alastor Wu [:alwu] from comment #4)

Would disabling the pref media.ffmpeg.vaapi.enabled help?

Yes, with this disabled, the issue doesn't occur.

Not a real solution of course because I'd like to have hardware-accelerated video decoding but it's a workaround for now and I hope it helps narrow down the issue.

From the comment 3 and comment 8, it's related with VAAPI. Martin, do you have any idea how to solve this?
Thank you.

Flags: needinfo?(stransky)

(In reply to Alastor Wu [:alwu] from comment #4)

Would disabling the pref media.ffmpeg.vaapi.enabled help?

Yes it did for me too.

Flags: needinfo?(lorenzofersteam)

(In reply to Laurențiu Nicola from comment #10)

Probably a duplicate of https://bugzilla.mozilla.org/show_bug.cgi?id=1757998.

That is this very bug. Did you mean to link another?

Yes, I can reproduce and I'm going to look at it.

Flags: needinfo?(stransky)
Severity: -- → S3
Priority: -- → P2
Status: UNCONFIRMED → NEW
Ever confirmed: true

As a temporary fix, I have set media.rdd-process.enabled to false. It seems to have fixed the problem, but is that okay?

I just upgraded to Firefox 98.0 on Ubuntu and immediately saw that YouTube video playback stopped working. Pressing play just shows the video loading circle (on top of the static pre-play image) while Network Devtools clearly show video being downloaded. I also noticed the humongous amount of zombie processes appearing (including a new one each time I tried to click play again).

Disabling media.rdd-process.enabled worked around the issue now, whatever the implications of that are...

It should be fixed by Bug 1752493.
Can you please test latest nightly? How-to is here:
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems#Testing_Mozilla_binaries
Thanks.

Flags: needinfo?(lars)
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE

Given that the fix was to limit the number of times the process is allowed to restart if it fails, does it mean that the actual underlying problem was not fixed? Is there another issue tracking that?

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

Attachment

General

Creator:
Created:
Updated:
Size: