Non-idle, non-controlling, and unregistered Service Workers may not shutdown properly
Categories
(Core :: DOM: Service Workers, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox72 | --- | fixed |
People
(Reporter: perry, Assigned: perry)
References
(Blocks 1 open bug)
Details
Crash Data
Attachments
(2 files)
Service Worker registrations that are unregistered and have no remaining controlled clients are both removed from the ServiceWorkerManager's mRegistrationInfos map and the mControlledClients map. If such a registration's active worker isn't idle, we'll wait for it to become idle and then terminate it.
This is a problem if there's an ordering like:
- An unregistered registration stops controlling clients, but its active worker isn't idle yet.
- ServiceWorkerManager begins shutting down Service Workers. It'll miss the registration in 1) because that registration has been removed from ServiceWorkerManager's knowledge.
- ServiceWorkerShutdownBlocker won't have an accurate count of the pending workers that are shutting down.
- An assertion possibly fires when the registration from 1) tries to terminate too late.
Assignee | ||
Comment 1•5 years ago
|
||
Part of ServiceWorkerManager cleanup involves blocking shutdown until all
Service Workers are shutdown. The ServiceWorkerManager's data won't contain
non-idle Service Workers that are both unregistered and not controlling clients,
however, so it won't be able to shutdown these Service Workers. Fortunately,
such workers will always be scheduled to shutdown once they become idle, so
we can just make them shutdown blockers as soon as they transition into that
state.
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 4•5 years ago
|
||
bugherder |
Comment 5•5 years ago
|
||
bugherder landing |
Comment 6•5 years ago
|
||
I just hit a crash at this assertion when starting a local-built browser (from a m-c pull today, 11/13) in a debug build. I had just created a new profile and told it to start.
Comment 7•5 years ago
|
||
Comment 8•5 years ago
|
||
This is repeatable with -profilemanager (you don't have to create a new profile)
Comment 9•5 years ago
|
||
profile manager sadness is bug 1591353, I've cc'ed you.
Comment 10•5 years ago
|
||
Hi Perry, is qa needed here? If so, could you provide us with some steps? Thanks!
Assignee | ||
Comment 11•5 years ago
|
||
Hi Catalin, I don't think QA is needed for this one. Thanks!
Description
•