gecko-dev/ipc/chromium
Nika Layzell d6f93a4aa7 Bug 1879375 - Ensure IPDL actors are notified of peer node destruction, r=ipc-reviewers,mccr8
Suppose we have 3 nodes: A, B, and C. In this scenario A is the broker,
and there are two child-nodes B and C. A creates a port-pair (Ab <->
Ac), and sends one each to B (Ab => Bb) and C (Ac => Cc). Assuming both
directions of the proxy bypass occur concurrently, we'll send a number
of ObserveProxy messages between node A and nodes B/C, eventually
cleaning up the proxies in A, such that Bb's peer is Cc, and vice versa.
During this process, we never attempt to send a message directly between
nodes B and C.

In NodeController, direct connections between a pair of nodes are
established via the broker node when attempting to send a message
directly between nodes, but as we have not attempted to send any
messages directly, no such connection has been established. That means
that when one of these child nodes dies, the other node will not be
notified of the peer being lost, and the IPDL actor will appear to
remain open. Only once a message is sent will the death of the peer node
be discovered, and the corresponding actor destroyed.

To fix this, we modify the routing code, adding a couple of callbacks
when accepting ports over IPC and bypassing proxies which notify
NodeController, allowing it to attempt an introduction eagerly. This
helps ensure that actors will reliably be notified when their peer
processes die.

In addition, some tweaks to the introduction logic were made to both
make introductions happen reliably, and to ensure we clean up missing
peer nodes in error conditions.

Differential Revision: https://phabricator.services.mozilla.com/D201153
2024-04-22 16:27:38 +00:00
..
gtest Bug 1879375 - Ensure IPDL actors are notified of peer node destruction, r=ipc-reviewers,mccr8 2024-04-22 16:27:38 +00:00
src Bug 1879375 - Ensure IPDL actors are notified of peer node destruction, r=ipc-reviewers,mccr8 2024-04-22 16:27:38 +00:00
chromium-config.mozbuild Bug 1677775 - reformat .mozbuild files with Black r=linter-reviewers,geckoview-reviewers,firefox-build-system-reviewers,ahal,glandium,owlish,sylvestre 2023-12-08 04:26:45 +00:00
moz.build Bug 1883565 - Add a stub LaunchApp for iOS. r=ipc-reviewers,nika 2024-03-05 22:41:32 +00:00