[Webkit-unassigned] [Bug 253791] `RemoteRenderingBackendProxy` should send all requests asynchronously instead of synchronously

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 13 15:54:18 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=253791

--- Comment #2 from Darren Mo <darrenmo at google.com> ---
> Thanks for the report and especially of the repro case. I'll take a look in
> the near future.

Thanks for looking into this, Kimmo!

> > `RemoteRenderingBackendProxy` sends requests to the GPU process. At the time of writing, there are 19 requests, 5 of which are synchronous. If possible, those 5 requests should be made asynchronous to avoid deadlock.
> 
> I think in general this is not the intention. Some GPU related operations
> are synchronous, like GL calls and such. For the time being these are
> intended to be synchronous, so the solution needs to account for these.

Hmm I guess that makes sense. One idea that came to my mind: could we establish the connection to the GPU process at the start of the Web process before any rendering happens?

> The design intention is that GPU process doesn't send synchronously to Web
> process.

Great!

> The intention of the linked bug was to mostly address these. It may well be
> that it did not catch all cases, I'll check your repro case.

Thanks! Some comments regarding the attached sample project:
- It deadlocks only on iOS 16+ because the “GPU Process: DOM Rendering” feature flag is enabled by default on iOS 16.
- It uses an anti-pattern to trigger the deadlock: it synchronously waits for `evaluateJavaScript:completionHandler:` to complete. This is just for reproduction purposes; I’m sure one can imagine other possible synchronous calls that would have a similar effect. (That being said, this anti-pattern was found in a popular app owned by a very big company. ����)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230313/d825d47c/attachment.htm>


More information about the webkit-unassigned mailing list