Closed
Bug 1583659
Opened 5 years ago
Closed 5 years ago
Race between inheriting controller and client shutdown for Service-Worker-controlled Blob URI workers under SW-e10s
Categories
(Core :: DOM: Service Workers, defect, P2)
Core
DOM: Service Workers
Tracking
()
RESOLVED
DUPLICATE
of bug 1584007
People
(Reporter: perry, Assigned: perry)
References
Details
Attachments
(1 obsolete file)
This race condition is exposed by browser_storage_permission.js
The racy interleaving of events is as follows:
Inheriting a controller:
- Blob URI worker inherits controller on a content process worker thread
InheritController
IPC call received on parent process background thread- Runnable dispatch to inherit the controller on parent process main thread
- Attempt to link the
ClientHandle
that inherits the controller to aClientSourceParent
on the parent process background thread- If the
ClientSourceParent
hasn't been created and registered yet, wait for it to do so
- If the
Client shutdown (initiated by DedicatedWorkerGlobalScope.close
):
- Call to
close
on a content process worker thread - Call to
WorkerPrivate::Cancel
on the worker's owning thread WorkerPrivate
destructor releases the single owningClientSource
reference on its owning thread, which shuts down the clientClientSourceParent
unregisters with theClientManagerService
on the parent process background thread
It's possible that the ClientSourceParent
gets created and destroyed in the parent before the ClientHandle
tries to find the ClientSourceParent
(in this case it'll never be found). As a result, this keeps the controlling Service Worker alive because the controlled client counter is always non-zero.
Assignee | ||
Updated•5 years ago
|
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Comment 2•5 years ago
|
||
This avoids the race condition where a ClientHandle
tries to connect to its
ClientSource
(via their actors), but the ClientSource
's actor has already
unregistered itself from the ClientManagerService
.
Depends on D43170
Updated•5 years ago
|
Attachment #9095567 -
Attachment is obsolete: true
You need to log in
before you can comment on or make changes to this bug.
Description
•