Closed Bug 2004850 Opened 5 months ago Closed 5 months ago

WebRTC simulcast video stops sending after running for a while

Categories

(Core :: WebRTC, defect, P1)

Firefox 147
defect

Tracking

()

VERIFIED FIXED
148 Branch
Tracking Status
firefox-esr140 --- fixed
firefox146 --- unaffected
firefox147 + fixed
firefox148 --- verified

People

(Reporter: vshaqi, Assigned: pehrsons)

References

(Regression)

Details

(Keywords: regression)

Attachments

(4 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36

Steps to reproduce:

Send H.264 simulcast video with a single active layer.

I couldn’t reproduce the issue with the simulcast sample. I’ve uploaded the logs, let me know if you need more. For now, I’m unable to share a test link to my environment.

Actual results:

Video stopped sending after a while.

Expected results:

Video should have kept sending.

The Bugbug bot thinks this bug should belong to the 'Core::WebRTC' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → WebRTC
Product: Firefox → Core

Which version of Firefox was this on? I landed another fix to GMP/OpenH264 recently in bug 1992567 that could possibly be related. Latest Nightly and Beta 147 (later today) should have it.

I'll check the log later, adding ni.

Flags: needinfo?(vshaqi)
Flags: needinfo?(apehrson)

Tested this 147 nightly https://ftp.mozilla.org/pub/firefox/nightly/2025/12/2025-12-07-21-28-32-mozilla-central/
and this beta https://ftp.mozilla.org/pub/firefox/releases/147.0b1/, same issue. Logs constantly display W/GMP GMP Encode: Max number of frames already in flight. Dropping this one.

Flags: needinfo?(vshaqi)

Thanks, that log statement likely means it's a regression from bug 1992567. I'll take a look.

Assignee: nobody → apehrson
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(apehrson)
Keywords: regression
Regressed by: 1992567

It seems from the log that we release an encoder with a frame in flight, and therefore miss the notification that the input frame was encoded or released. Not a biggie per se, but I then assume libwebrtc re-uses the encoder, because it's only after this encoder release that all encode tasks are dropped. Thanks for filing this so early, should be an easy fix.

Severity: -- → S3
Status: NEW → ASSIGNED
Priority: -- → P1

This covers some corner cases, for instance when libwebrtc releases the encoder
with a frame in flight, then re-uses it.

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

Pushed by pehrsons@gmail.com: https://github.com/mozilla-firefox/firefox/commit/b6938aa4847b https://hg.mozilla.org/integration/autoland/rev/409971c463d8 Clear WebRTC GMP encoder input image map on Release (from libwebrtc) and termination (from IPC). r=bwc
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 148 Branch

This looks like a regression in version 147, will 147 include the fix? This issue is easily reproducible in our product and makes it effectively unusable.

[Tracking Requested - why for this release]:
Sending H264 video over WebRTC is broken in some circumstances.

I'll make sure to get it uplifted to 147, adding tracking to that effect.
Have you had a chance to verify the fix in latest Nightly?

Flags: needinfo?(vshaqi)

Thanks, Andreas. I tested the latest nightly build (https://archive.mozilla.org/pub/firefox/nightly/2025/12/2025-12-10-06-43-34-mozilla-central/) and couldn’t reproduce the issue. Looks good on my end.

Flags: needinfo?(vshaqi)

Thanks for confirming!

Status: RESOLVED → VERIFIED

This covers some corner cases, for instance when libwebrtc releases the encoder
with a frame in flight, then re-uses it.

Original Revision: https://phabricator.services.mozilla.com/D275605

Attachment #9531981 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined: Video-conferencing sites using the H264 video codec with the OpenH264 encoder (i.e. all desktop platforms) may stop sending video mid-call
  • Code covered by automated testing: no
  • Fix verified in Nightly: yes
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing:
  • Risk associated with taking this patch: low
  • Explanation of risk level: Trivial change
  • String changes made/needed: None
  • Is Android affected?: no

Is there any chance we could add a test for this?

Flags: needinfo?(apehrson)
Attachment #9531981 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

(In reply to Ryan VanderMeulen [:RyanVM] from comment #17)

Is there any chance we could add a test for this?

With the right amount of manipulation of the fakeopenh264 plugin we use in CI, we could. I'm not sure how easy that is though. I'll ask around.

Flags: needinfo?(apehrson)
Blocks: 2005729

This covers some corner cases, for instance when libwebrtc releases the encoder
with a frame in flight, then re-uses it.

Original Revision: https://phabricator.services.mozilla.com/D275605

Attachment #9532692 - Flags: approval-mozilla-esr140?
Attachment #9532692 - Flags: approval-mozilla-esr140?
Attachment #9532692 - Flags: approval-mozilla-esr140+
Regressions: 2020685
No longer regressions: 2020685
QA Whiteboard: [qa-triage-done-c150/b149]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: