Closed Bug 1729902 Opened 3 years ago Closed 3 years ago

[vaapi] Anti-harassment course video gets corrupted - vaExportSurfaceHandle() failure

Categories

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

defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: emilio, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Profile with screenshots here: https://share.firefox.dev/3tt78bA

Crash report is bp-b73764dd-fd33-41e4-8e74-1c63c0210909, though I'm not sure where the drawWindow call comes from.

I've confirmed that media.ffmpeg.vaapi.enabled=false fixes it, but I'm not sure what the next steps are since I suspect I can't give you access to the page... Would some logs be useful? When the video pauses the following is in the devtools console:

Object { error: "mediasource", event: "MEDIA_ERR_DECODE (NS_ERROR_OUT_OF_MEMORY (0x8007000e) - mozilla::MediaResult mozilla::FFmpegVideoDecoder<58>::CreateImageVAAPI(int64_t, int64_t, int64_t, MediaDataDecoder::DecodedData &): Unable to get frame by vaExportSurfaceHandle())", type: "error" }
Flags: needinfo?(stransky)

Yes, the log of MOZ_LOG="Dmabuf:5, PlatformDecoderModule:5" will help here.

Flags: needinfo?(stransky)
Attached file vaapi.log (deleted) —

Have you tried to set a bookmark or opened another widget while the video was playing?

Nope

But perhaps the newtab screenshots code was running or something.

Yes, you're running out of free vaapi dmabuf surfaces. We should handle that situation by caching frames and free vaapi dmabuf surfaces early.

Summary: [vaapi] Anti-harassment course video gets corrupted, OOMs and sometimes crashes the tab → [vaapi] Anti-harassment course video gets corrupted - vaExportSurfaceHandle() failure

Triaging -- p5 as Media don't currently handle vaapi in house. Please set severity as you see fit.

Priority: -- → P5

Actually, let me set that to appease some more triage tooling. S3 since we can pref this off. I could see this being S2 also, if folks feel strongly.

Severity: -- → S3

Emilio, do you still see that? Looks like DMABUFSurfaceImage::GetAsSourceSurface() is called to create a shapshot of the video. I guess something is playing video on background while a video thumbnail is displayed or so. Do you have any reproducer?
I think we should fallback to SW decode or stop HW decode when we're running out of free HW surfaces (we know how free HW surfaces is available). Especially h264 may be affected by this one.

Flags: needinfo?(emilio)

Would be great to see platform decode log of this case, please run with MOZ_LOG="Dmabuf:5, PlatformDecoderModule:5" and attach the log here.
Thanks.

I managed to log in back into that course and videos play fine now, so let's call this fixed. If I see it again I'll re-file. Thanks!

Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(emilio)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: