Bug 224778 - MotionMark's Canvas-Arcs subtest is broken if the GPUProcess is not yet running
Summary: MotionMark's Canvas-Arcs subtest is broken if the GPUProcess is not yet running
Status: RESOLVED DUPLICATE of bug 224798
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks: 224781
  Show dependency treegraph
 
Reported: 2021-04-19 12:12 PDT by Chris Dumez
Modified: 2021-04-20 11:24 PDT (History)
6 users (show)

See Also:


Attachments
Patch (6.31 KB, patch)
2021-04-19 12:18 PDT, Chris Dumez
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2021-04-19 12:12:56 PDT
MotionMark's Canvas-Arcs subtest is broken if the GPUProcess is not yet running.
Comment 1 Chris Dumez 2021-04-19 12:18:56 PDT
Created attachment 426458 [details]
Patch
Comment 2 Simon Fraser (smfr) 2021-04-19 13:30:47 PDT
Comment on attachment 426458 [details]
Patch

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

> Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:78
> +        // FIXME: This message shouldn't need to be synchronous. However, we seem to get in a bad state when this message is asynchronous and the GPUProcess has just launched.

Would be good to have a bug link here.
Comment 3 Chris Dumez 2021-04-19 13:36:06 PDT
Committed r276271 (236753@main): <https://commits.webkit.org/236753@main>
Comment 4 Chris Dumez 2021-04-19 20:21:55 PDT
It doesn't look like this helped on the bots :/ I may need some help here. I suspect the display list logic either gets into a bad state or is dropping some initial work.

It is fairly easy to get in that bad state if constructing the RemoteRenderingBackendProxy launches the GPUProcess (which I made a lot more common since the GPUProcess is now only launched when needed).

I spent quite some time trying to understand the DisplayList IPC logic but it is fairly complicated.

When running MotionMark's Canvas-Arcs, in the success case, I see RemoteRenderingBackend::didCreateSharedDisplayListHandle() getting called at least 4 times. However, in the failure case, it seems RemoteRenderingBackend::didCreateSharedDisplayListHandle() is only called once. I have no idea why this could be happening. Wenson, do you have any idea?

In both failure and success cases, I see many calls to RemoteRenderingBackend::wakeUpAndApplyDisplayList() and the initialization stage (GPUConnectionToWebProcess::createRenderingBackend & RemoteRenderingBackend::createImageBuffer) looks the same.
Comment 5 Ryan Haddad 2021-04-19 22:14:49 PDT
rdar://76860669
Comment 6 Chris Dumez 2021-04-20 07:52:05 PDT
Reverted r276271 for reason:

It did not fix the Canvas-Arcs subtest on the bots

Committed r276304 (236786@main): <https://commits.webkit.org/236786@main>
Comment 7 Chris Dumez 2021-04-20 10:27:07 PDT
Oh, what I was reproducing had nothing to do with the GPUProcess and was actually flakily reproducing with the GPUProcess disabled.

I tried on another iPad and I finally have reproduced what I think the bots are experiencing. The GPUProcess exits very shortly after launch due to memory pressure, repeatedly. I think https://commits.webkit.org/236787@main will fix this.
Comment 8 Chris Dumez 2021-04-20 11:24:00 PDT

*** This bug has been marked as a duplicate of bug 224798 ***