Closed Bug 1851056 Opened 9 months ago Closed 8 months ago

Crash in [@ mozilla::gmp::GMPContentParent::ChromiumCDMDestroyed]

Categories

(Core :: Audio/Video: GMP, defect)

Unspecified
Windows 11
defect

Tracking

()

RESOLVED FIXED
120 Branch
Tracking Status
firefox-esr115 --- wontfix
firefox118 --- wontfix
firefox119 --- fixed
firefox120 --- fixed

People

(Reporter: mccr8, Assigned: aosmond)

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

Crash report: https://crash-stats.mozilla.org/report/index/c8029370-0ea5-4010-b700-630290230831

MOZ_CRASH Reason: MOZ_DIAGNOSTIC_ASSERT(false) (mChromiumCDMs.RemoveElement(aCDM))

Top 10 frames of crashing thread:

0  xul.dll  mozilla::gmp::GMPContentParent::ChromiumCDMDestroyed  dom/media/gmp/GMPContentParent.cpp:61
1  xul.dll  mozilla::gmp::ChromiumCDMParent::ActorDestroy  dom/media/gmp/ChromiumCDMParent.cpp:1038
2  xul.dll  mozilla::ipc::IProtocol::DestroySubtree  ipc/glue/ProtocolUtils.cpp:598
3  xul.dll  mozilla::gmp::PGMPContentParent::SendPChromiumCDMConstructor  ipc/ipdl/PGMPContentParent.cpp:352
4  xul.dll  mozilla::gmp::GMPContentParent::GetChromiumCDM  dom/media/gmp/GMPContentParent.cpp:158
5  xul.dll  mozilla::gmp::GeckoMediaPluginService::GetCDM::<lambda_1>::operator const  dom/media/gmp/GMPService.cpp:270
5  xul.dll  mozilla::MozPromise<RefPtr<mozilla::gmp::GMPContentParentCloseBlocker>, mozilla::MediaResult, 1>::InvokeMethod  xpcom/threads/MozPromise.h:654
5  xul.dll  mozilla::MozPromise<RefPtr<mozilla::gmp::GMPContentParentCloseBlocker>, mozilla::MediaResult, 1>::InvokeCallbackMethod  xpcom/threads/MozPromise.h:685
5  xul.dll  mozilla::MozPromise<RefPtr<mozilla::gmp::GMPContentParentCloseBlocker>, mozilla::MediaResult, 1>::ThenValue<`lambda at /builds/worker/checkouts/gecko/dom/media/gmp/GMPService.cpp:263:11', `lambda at /builds/worker/checkouts/gecko/dom/media/gmp/GMPService.cpp:284:11'>::DoResolveOrRejectInternal  xpcom/threads/MozPromise.h:870
6  xul.dll  mozilla::MozPromise<mozilla::net::RemoteStreamInfo, nsresult, 0>::ThenValueBase::ResolveOrRejectRunnable::Run  xpcom/threads/MozPromise.h:490

The volume seems low, but it is a diagnostic assert so I figured I'd file it.

The bug is linked to a topcrash signature, which matches the following criterion:

  • Top 10 content process crashes on beta

For more information, please visit BugBot documentation.

Keywords: topcrash

The severity field is not set for this bug.
:jimm, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(jmathies)
Severity: -- → S3
Flags: needinfo?(jmathies)

I'm not sure why it spiked but they appear to be a race condition where our IPC fails to send during the SendPChromiumCDMConstructor call:
https://searchfox.org/mozilla-central/rev/48b6992e03fa66f77ac9688ba61c95d31a451bc1/dom/media/gmp/GMPContentParent.cpp#165

If the call returns nullptr we obviously don't add it to the array. But if we destroy before we return, then it is also missing:
https://searchfox.org/mozilla-central/rev/48b6992e03fa66f77ac9688ba61c95d31a451bc1/dom/media/gmp/GMPContentParent.cpp#61

Assignee: nobody → aosmond
Status: NEW → ASSIGNED

If SendChromiumCDMConstructor fails, then the diagnostic assert in
ChromiumCDMDestroyed will fail because we have yet to add the
ChromiumCDMParent to the array. Now in this patch we just add the parent
right away, and rely upon the ActorDestroy machinery to remove it as in
all other cases.

Based on the topcrash criteria, the crash signature linked to this bug is not a topcrash signature anymore.

For more information, please visit BugBot documentation.

Keywords: topcrash

:aosmond do you plan on uplifting this to 119 or is this going to ride the 120 trains when it lands?

Flags: needinfo?(aosmond)
Pushed by aosmond@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d57c8b63407e
Fix assert when GMPContentParent::SendChromiumCDMConstructor fails. r=media-playback-reviewers,padenot
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch

Comment on attachment 9354558 [details]
Bug 1851056 - Fix assert when GMPContentParent::SendChromiumCDMConstructor fails.

Beta/Release Uplift Approval Request

  • User impact if declined: Low volume crash
  • 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: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Simple, easily understood patch
  • String changes made/needed:
  • Is Android affected?: No
Flags: needinfo?(aosmond)
Attachment #9354558 - Flags: approval-mozilla-beta?

Comment on attachment 9354558 [details]
Bug 1851056 - Fix assert when GMPContentParent::SendChromiumCDMConstructor fails.

Approved for 119.0b7

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

Attachment

General

Created:
Updated:
Size: