Bug 257519 - RemoteGraphicsContextGLProxy::initializeIPC makes a copy of the StreamServerConnection::Handle
Summary: RemoteGraphicsContextGLProxy::initializeIPC makes a copy of the StreamServerC...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Matt Woodrow
URL:
Keywords: InRadar
: 257890 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-05-30 19:07 PDT by Matt Woodrow
Modified: 2023-06-20 10:24 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Woodrow 2023-05-30 19:07:01 PDT
The GPUConnectionToWebProcess::CreateGraphicsContextGL object's constructor doesn't actually move, so we end up making a copy for the IPC message.

The 'serverConnectionHandle' instance is then still alive, and holding on to a MachSendRight.

waitUntilInitialized can then block (for the 30 second timeout) if the GPUP crashes, since notification of the crash doesn't happen until all send rights are destroyed (including the one on the stack).
Comment 1 Matt Woodrow 2023-05-30 19:07:18 PDT
<rdar://109720377>
Comment 2 Matt Woodrow 2023-05-30 19:16:36 PDT
Pull request: https://github.com/WebKit/WebKit/pull/14519
Comment 3 EWS 2023-05-31 16:44:13 PDT
Committed 264766@main (50f865ffbe32): <https://commits.webkit.org/264766@main>

Reviewed commits have been landed. Closing PR #14519 and removing active labels.
Comment 4 Simon Fraser (smfr) 2023-06-20 10:24:17 PDT
*** Bug 257890 has been marked as a duplicate of this bug. ***