[webkit-reviews] review canceled: [Bug 238558] GPU Process crash under GPUProcess::canExitUnderMemoryPressure() : [Attachment 457131] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 11 13:50:55 PDT 2022


Said Abou-Hallawa <sabouhallawa at apple.com> has canceled Said Abou-Hallawa
<sabouhallawa at apple.com>'s request for review:
Bug 238558: GPU Process crash under GPUProcess::canExitUnderMemoryPressure()
https://bugs.webkit.org/show_bug.cgi?id=238558

Attachment 457131: Patch

https://bugs.webkit.org/attachment.cgi?id=457131&action=review




--- Comment #8 from Said Abou-Hallawa <sabouhallawa at apple.com> ---
Comment on attachment 457131
  --> https://bugs.webkit.org/attachment.cgi?id=457131
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=457131&action=review

>> Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp:535
>> +	});
> 
> A better thread safe implementation of this would be to have the dispatched
function capture a normal binarysemaphore, see the implementation at
WorkQueue::dispatchSync.
> (for your interest, it probably isn't good to do this sync call)

It seems this sync call might lead to deadlock. For instance
RemoteDisplayListRecorder::paintFrameForMedia(), which runs on the
"RemoteRenderingBackend work queue", makes a media call using
callOnMainRunLoopAndWait(). So if
RemoteRenderingBackend::allowsExitUnderMemoryPressure() blocks the execution on
the main run loop till the "RemoteRenderingBackend work queue" executes the
call to RemoteResourceCache::hasActiveDrawables() and there is a
PaintFrameForMedia message which was dispatched to the
StreamConnectionWorkQueue but has not been processed yet, a deadlock will
happen. The main run loop and the "RemoteRenderingBackend work queue" will both
be blocked; each is waiting for the other to finish.


More information about the webkit-reviews mailing list