Files
Nika Layzell f960678c85 Bug 2041853 - Mitigate shutdown dispatch failure issue around macOS process launching, r=ipc-reviewers,mccr8
This mitigates the shutdown issue in 2 ways:

1. The unnecessary TaskQueue wrapper was removed. This means that
   dispatches which fail to the launch thread via. the MozPromise
   infrastructure will leak instead of being destroyed/crashing on
   error.

2. The bounce back from the IO thread to the launch thread after the
   mach bootstrap check-in code has been eliminated, by running the step
   to clear out mChildArgs on the IPC IO thread.

This doesn't make the code fully resillient to shutdown, as that is hard
to do quickly with the current design of the code. GeckoChildProcessHost
probably needs to be an async shutdown blocker while launches are
in-progress, but making that change is substantial and runs the risk of
introducing shutdown hangs etc. I made the choice to not make
substantial changes like that right now.

We also probably need some mechanism for signalling shutdown failure to
the code in mach_ipc_mac.cc - if the shutdown blocker was added, that
code could theoretically block shutdown up to 10 seconds in exceptional
failure conditions without more changes to interrupt waiting if we're
already in shutdown.

It's unclear why this only impacted devedition, though it's clear why it
impacted macOS.

Differential Revision: https://phabricator.services.mozilla.com/D306567
2026-06-13 03:54:14 +00:00
..