Closed Bug 1958438 Opened 5 months ago Closed 2 months ago

With ffvpx enabled, system freeze/crash/hang on scrolling through YT shorts for a long time

Categories

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

defect

Tracking

()

VERIFIED FIXED
143 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- unaffected
firefox-esr140 --- disabled
firefox137 --- disabled
firefox138 --- disabled
firefox139 --- disabled
firefox140 --- disabled
firefox141 --- disabled
firefox142 --- disabled
firefox143 --- fixed

People

(Reporter: mayankleoboy1, Assigned: alwu)

References

(Blocks 3 open bugs, Regression)

Details

(Keywords: regression)

Crash Data

Attachments

(4 files)

Attached file media.HTML

With ffvpx enabled, i was seeing some crashes/OOMs/system freezes. So i gave chatgpt some prompts which (i think) simulates that using a local VP9 file.
And I started getting crashes.

STR:

  1. Set media.ffvpx-hw.enabled = TRUE if not already enabled.
  2. download the VP9 big-buck-bunny video from here: https://test-videos.co.uk/vids/bigbuckbunny/webm/vp9/1080/Big_Buck_Bunny_1080_10s_30MB.webm
  3. Open the attached testcase.
  4. Browse to the VP9 video
  5. Let the testcase run for 1-2 minutes.

AR: crash/OOM/system freeze
ER: Not so

https://crash-stats.mozilla.org/report/index/d3c96719-77c8-479d-9177-aaa870250404
https://crash-stats.mozilla.org/report/index/94df6704-5d42-4730-b3ea-e9f220250404

Repros with media.wmf.zero-copy-nv12-textures enabled/disabled.
Repros with gfx.direct3d11.reuse-decoder-device enabled/disabled.


The other thing i noticed was that while the testcase is running, (with ffvpx enabled) Microsoft Defender is running at continuous full speed (i.e. using 1 core 100% for the full time).

Flags: needinfo?(alwu)
Attached file about:support

Set release status flags based on info from the regressing bug 1932772

Here is a system-wide Samply profile

Attached file gfx note error
Summary: With ffvpx enabled, Testcase simulating long period of scrolling YT shorts leads to crash on a VP9 video → With ffvpx enabled, system freeze/crash/hang on scrolling through YT shorts for a long time
Blocks: hw-ffvpx
Blocks: 1936128
See Also: → 1962032
Priority: -- → P3
Severity: -- → S3
Blocks: 1902569

Fwiw, i have manually disabled ffvpx on my nightly profile due to this issue. There is a reproducible testcase here to help with diagnosis.

Thanks! I should be able to get back to this shortly—I've been tied up with other tasks recently. I'm hoping the fix for bug 1952340 will also address this issue.

Assignee: nobody → alwu
Flags: needinfo?(alwu)

Here's a profile showing 9GB allocated and retained at d3d11va_frames_init: https://share.firefox.dev/40np7SB

Okay I finally found the leak, the memory is leaking due to this, an additional reference will be added via QueryInterface() everytime when creating an image, and those ref count would never be decreased.

Priority: P3 → P2

A successful QueryInterface call increments the reference count, and failure to
properly decrement it leads to memory leaks in the GPU process.

Pushed by alwu@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/d3927f017ee9 https://hg.mozilla.org/integration/autoland/rev/72725b93e3b9 Correctly manage the reference count of ID3D11Texture2D. r=media-playback-reviewers,karlt
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 143 Branch

Hi Mayank,
Would you mind helping me verify whether this issue is resolved on your end with the latest Nightly? Thanks!

Flags: needinfo?(mayankleoboy1)

yes, this is fixed. I tested and it is working great. Forgot to update here.

Flags: needinfo?(mayankleoboy1)
Status: RESOLVED → VERIFIED
Blocks: 1978183
No longer blocks: 1936128
QA Whiteboard: [qa-triage-done-c144/b143]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: