Bug 302068

Summary: [CoordinatedGraphics] Fix deadlock when media thread is trying to push a buffer while main thread is flushing layers
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: PlatformAssignee: Carlos Garcia Campos <cgarcia>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Carlos Garcia Campos
Reported 2025-11-06 00:30:37 PST
During the layer flush the CoordinatedPlatformLayer lock is held and CoordinatedPlatformLayerBufferProxy::setDisplayBuffer needs to take the lock to push the new buffer too. CoordinatedPlatformLayerBufferProxy::consumePendingBufferIfNeeded(), called during layer flush from main thread waits on the proxy lock that is held by CoordinatedPlatformLayerBufferProxy::setDisplayBuffer which is waiting for the CoordinatedPlatformLayer lock. We need to release the proxy lock before taking the layer's one.
Attachments
Carlos Garcia Campos
Comment 1 2025-11-06 00:33:25 PST
EWS
Comment 2 2025-11-06 05:06:58 PST
Committed 302647@main (c09f42b5726d): <https://commits.webkit.org/302647@main> Reviewed commits have been landed. Closing PR #53512 and removing active labels.
Radar WebKit Bug Importer
Comment 3 2025-11-06 05:07:11 PST
Note You need to log in before you can comment on or make changes to this bug.