Bug 260690 - GPU process crashes don't interrupt waiting Semaphores
Summary: GPU process crashes don't interrupt waiting Semaphores
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Matt Woodrow
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-08-24 18:29 PDT by Matt Woodrow
Modified: 2023-09-18 14:54 PDT (History)
6 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-08-24 18:29:33 PDT
IPC::Semaphore doesn't get interrupted if it's waiting on a signal from a remote process that crashes.

RemoteImageBufferProxy uses a 15 second timeout, per buffer, so we can end up waiting many minutes if we crash during a transaction with lots of layer changes.
Comment 1 Matt Woodrow 2023-08-24 19:52:25 PDT
For the case where we're waiting on the Semaphore on a background thread (normal painting), we could forward the 'GPU disconnected' message to each RemoteImageBufferProxy and manually notify the Semaphores.

We might need a way to get notifications on a background thread (register with IPC::Connection for a notification from the IPC thread?), which we then use to invalidate Semaphore (by notifying them, and marking them as invalid).
Comment 2 Radar WebKit Bug Importer 2023-08-28 15:39:05 PDT
<rdar://problem/114591255>
Comment 3 Matt Woodrow 2023-09-06 19:45:50 PDT
Pull request: https://github.com/WebKit/WebKit/pull/17526
Comment 4 EWS 2023-09-18 14:54:16 PDT
Committed 268093@main (f2796edab116): <https://commits.webkit.org/268093@main>

Reviewed commits have been landed. Closing PR #17526 and removing active labels.