WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
241666
ConnectionCocoa doesn't receive disconnect notifications before the client has finished initializing
https://bugs.webkit.org/show_bug.cgi?id=241666
Summary
ConnectionCocoa doesn't receive disconnect notifications before the client ha...
Matt Woodrow
Reported
2022-06-15 18:15:42 PDT
<
rdar://94628205
> Creating a server/client Connection requires a roundtrip from the server to the client. The server side allocates a port with receive rights, and sends this to the destination process (in the WebContent<->GPUP case, this goes via the UI process) as a port with send rights. Upon receiving this, the client also allocates a receive port, and sends the send right to the server via the send right it received upon initialisation. Once the server receives this, we have a fully initialised bi-directional connection. The handler for detecting disconnections (the client process crashing) is part of the send right that the server receives at the last stage of connection. This means that if the remote process crashes before we've finished the round-trip, then we never get notified, and the originating process can end up stuck waiting forever. We can fix this by temporarily adding a notifications request to the receive port, and listening for MACH_NOTIFY_NO_SENDERS, until we get a send port.
Bug 160806
handled a similar case, for process launch connections.
Attachments
Add attachment
proposed patch, testcase, etc.
Matt Woodrow
Comment 1
2022-06-15 18:32:35 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/1564
EWS
Comment 2
2022-06-21 18:06:20 PDT
Committed
r295707
(
251712@main
): <
https://commits.webkit.org/251712@main
> Reviewed commits have been landed. Closing PR #1564 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug