Closed Bug 1937908 Opened 8 months ago Closed 7 months ago

Assertion failure: !mProcess in GMPParent::~GMPParent during shutdown

Categories

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

defect

Tracking

()

RESOLVED FIXED
136 Branch
Tracking Status
firefox136 --- fixed

People

(Reporter: pehrsons, Assigned: pehrsons)

References

Details

Attachments

(6 files)

My STR was to send a high-res screen capture over WebRTC using OpenH264, then observe the encoder latency going up and shut down Firefox when the encoder latency is >1s. Intermittently it would trip this assertion.

I'll note I reproduced this with only the fix for bug 1937731 applied, as well as with the fixes for both bug 1937731 and bug 1936275 applied. The attached log was captured with both bugs applied.

Blocks: 1210175
Depends on: 1937731, 1936275
No longer depends on: 1210175
Summary: Assertion failure: !mProcess in GMPParent::~GMPParent → Assertion failure: !mProcess in GMPParent::~GMPParent during shutdown

I see this comment "Normal Shutdown() will delete the process on unwind", but fail to see how that could work with the dtor assert, or what exactly is meant by "unwind".

It only partially wallpapered over a problem.
Subsequent commits will fix it better.

Assignee: nobody → apehrson
Status: NEW → ASSIGNED

There is a shutdown race that can happen in GMPParent.
On ActorDestroy(NormalShutdown), if the GMP process is backlogged with work, it
may not yet have shut down. At the same time, ActorDestroy(NormalShutdown)
happens after xpcom-shutdown-threads, which has made sure to shut down the GMP
event target in GMPService. The graceful shutdown of the GMP process requires
dispatching tasks to the GMP event target (see GMPParent::DeleteProcess), which,
if the target has been shut down, will result in the GMP process leaking because
the SendShutdown Then handler could not be dispatched. If it even gets that far.

Pushed by pehrsons@gmail.com: https://hg.mozilla.org/integration/autoland/rev/866fa8510165 Revert changeset d75ea9fa6cda. r=aosmond,media-playback-reviewers https://hg.mozilla.org/integration/autoland/rev/1cf5ffd4299a Remove undefined function GMPParent::AbortAsyncShutdown. r=aosmond,media-playback-reviewers https://hg.mozilla.org/integration/autoland/rev/f0b7d22731bc Move GMPServiceChild to ShutdownBlockingTicket. r=aosmond,media-playback-reviewers https://hg.mozilla.org/integration/autoland/rev/4723190b3ae4 Move GMPServiceParent to ShutdownBlockingTicket and make members const. r=aosmond,media-playback-reviewers https://hg.mozilla.org/integration/autoland/rev/de6301e43b81 Block shutdown in GMPProcessParent. r=aosmond,media-playback-reviewers

Backed out for causing build bustages @ GMPParent.cpp

/builds/worker/checkouts/gecko/dom/media/gmp/GMPParent.cpp:63:17: error: format '%u' expects argument of type 'unsigned int', but argument 8 has type 'mozilla::gmp::GMPState' [-Werror=format=]
Flags: needinfo?(apehrson)
Component: WebRTC: Audio/Video → Audio/Video: GMP
Flags: needinfo?(apehrson)
Pushed by pehrsons@gmail.com: https://hg.mozilla.org/integration/autoland/rev/a798ca03e4bd Revert changeset d75ea9fa6cda. r=aosmond,media-playback-reviewers https://hg.mozilla.org/integration/autoland/rev/c96513264f3d Remove undefined function GMPParent::AbortAsyncShutdown. r=aosmond,media-playback-reviewers https://hg.mozilla.org/integration/autoland/rev/fbd159562f11 Move GMPServiceChild to ShutdownBlockingTicket. r=aosmond,media-playback-reviewers https://hg.mozilla.org/integration/autoland/rev/cb89d984064e Move GMPServiceParent to ShutdownBlockingTicket and make members const. r=aosmond,media-playback-reviewers https://hg.mozilla.org/integration/autoland/rev/ade69911a87b Block shutdown in GMPProcessParent. r=aosmond,media-playback-reviewers
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: