Closed Bug 1838779 Opened 2 years ago Closed 2 years ago

Improve the stability of keepalive decisions based on the ThreadsafeContentParentHandle

Categories

(Core :: DOM: Content Processes, task)

task

Tracking

()

RESOLVED FIXED
116 Branch
Tracking Status
firefox116 --- fixed

People

(Reporter: jstutte, Assigned: jstutte)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

There is a time window between the first check in ContentParent::NotifyTabWillDestroy and the flagging of mThreadsafeHandle->mShutdownStarted in ContentParent::MaybeAsyncSendShutDownMessage during which a worker might have tried to register for our process. The entire sequence is happening in the same MT runnable processing, so the time window is small but exists.

This race would leave us with a process that is never told to shutdown and then killed directly by the ContentParent::ForceKillTimerCallback.

Assignee: nobody → jstutte
Status: NEW → ASSIGNED

As we closed the other bug, I lift this dependency up to the parent.

Actually there are still some cases of "GetRunnableForMTTask seems to be stuck on mMainThreadCV.Wait();" after bug 1837467 landed, this bug might be one way to cause them.

Blocks: 1789810
No longer blocks: 1837467
Pushed by jstutte@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cc655f99b353 Overhaul the thread safety and synchronization of our keepalive checks. r=dom-worker-reviewers,asuth,smaug
Pushed by jstutte@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/81e6aadf9911 Overhaul the thread safety and synchronization of our keepalive checks. r=dom-worker-reviewers,asuth,smaug
Pushed by jstutte@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1cdafcfe4665 Overhaul the thread safety and synchronization of our keepalive checks. r=dom-worker-reviewers,asuth,smaug
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
Flags: needinfo?(jstutte)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: