CanvasManagerChild on DOM worker not freed if GPU process crashes
Categories
(Core :: Graphics: Canvas2D, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox120 | --- | fixed |
People
(Reporter: aosmond, Assigned: aosmond)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
If there is an IPDL protocol failure and we call CanvasManagerChild::ActorDestroy:
https://searchfox.org/mozilla-central/rev/e9b338c2d597067f99e96d5f20769f41f312fa8f/gfx/ipc/CanvasManagerChild.cpp#33
Then we expect it to get freed. On workers however, we have an additional reference to ourselves for the purposes of destroying ourselves when the worker shutdowns:
https://searchfox.org/mozilla-central/rev/e9b338c2d597067f99e96d5f20769f41f312fa8f/gfx/ipc/CanvasManagerChild.cpp#112
But the only place we ever clear the reference is in Destroy, which isn't called if only the IPDL actor died:
https://searchfox.org/mozilla-central/rev/e9b338c2d597067f99e96d5f20769f41f312fa8f/gfx/ipc/CanvasManagerChild.cpp#47
So it stays alive forever. I suspect this may be related to bug 1808820. This can only happen if there is a GPU process crash, or if either the content or compositor process decided to close the protocol actor down for some reason without crashing (memory alloc failure, pipe write failure, etc).
Assignee | ||
Comment 1•1 year ago
|
||
This patch ensures that we destroy CanvasManagerChild::mWorkerRef if our
IPDL actor is destroyed without the DOM worker having been destroyed.
This can occur when the GPU process crashes, or IPDL itself encountered
an internal error. Since mWorkerRef keeps a reference to
CanvasManagerChild for its shutdown callback, this means the object
won't get freed until the DOM worker itself shuts down.
Depends on D190830
Comment 3•1 year ago
|
||
bugherder |
Assignee | ||
Updated•1 year ago
|
Description
•