Closed Bug 1599799 Opened 5 years ago Closed 4 years ago

Mochitest crashes when Android H.264 support for WebRTC is turned on.

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla74
Tracking Status
firefox73 --- fixed
firefox74 --- fixed

People

(Reporter: jhlin, Assigned: jhlin)

References

Details

Attachments

(2 files)

Follow-up of bug 1592140 comment 9.
With the patch in bug 1592140, treeherder tests failed:
https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&selectedJob=277110101&resultStatus=testfailed%2Cbusted%2Cexception&revision=f4a9e675a33f01ce97adce2296b9b21ce5e3111f

After investigation, WebrtcMediaDataEncoder has two defects:

  1. ProcessEncode() can resolve after mCallback is cleared by RegisterEncodeCompleteCallback()
  2. ProcessEncode() can be preempted by Shutdown() and calls Java method with deleted mEnocoder.
Priority: -- → P2
Assignee: nobody → jolin
Blocks: 1581175
See Also: → 1592140

Java callback runs on Android binder thread and can be preempted by
encoder task queue so that ProcessOutput() is queued after
ProcessShutdown(). Discard the output when that happens.

Client of WebrtcMediaDataEncoder unregisters callback before calling
Shutdown(). When a pending encode promise gets resolved after that,
it will cause null pointer error.

Depends on D55759

Pushed by jolin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/51a360648ea2
p1: check Java encoder existence before processing output. r=jya
https://hg.mozilla.org/integration/autoland/rev/fc9ac6839a9e
p2: discard frame when callback is invalid. r=jya
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74

Please request Beta approval on these patches if they block bug 1592140.

Flags: needinfo?(jolin)

Comment on attachment 9113372 [details]
Bug 1599799 - p1: check Java encoder existence before processing output. r?jya

Beta/Release Uplift Approval Request

  • User impact if declined: Geckoview-based apps won't be able to communicate with WebRTC apps that support only H.264 video.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: Bug 1592140
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The patches include only minor code changes to address automation tests failures.
  • String changes made/needed: N/A
Flags: needinfo?(jolin)
Attachment #9113372 - Flags: approval-mozilla-beta?
Attachment #9113373 - Flags: approval-mozilla-beta?

Comment on attachment 9113372 [details]
Bug 1599799 - p1: check Java encoder existence before processing output. r?jya

Needed for bug 1592140 so platform decoder can be used for H264 WebRTC calls. Approved for GV73.

Attachment #9113372 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9113373 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Regressions: 1611938
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: