Bug 239905 - Connecting to GPU process may hang if UI process sends sync message simultaneously
Summary: Connecting to GPU process may hang if UI process sends sync message simultane...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kimmo Kinnunen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-04-29 11:03 PDT by Kimmo Kinnunen
Modified: 2022-05-05 06:43 PDT (History)
5 users (show)

See Also:


Attachments
WIP (41.52 KB, patch)
2022-04-29 11:07 PDT, Kimmo Kinnunen
no flags Details | Formatted Diff | Diff
Patch (48.72 KB, patch)
2022-05-04 08:35 PDT, Kimmo Kinnunen
no flags Details | Formatted Diff | Diff
Patch (48.74 KB, patch)
2022-05-04 08:46 PDT, Kimmo Kinnunen
no flags Details | Formatted Diff | Diff
For landing (48.64 KB, patch)
2022-05-05 01:32 PDT, Kimmo Kinnunen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kimmo Kinnunen 2022-04-29 11:03:41 PDT
Connecting to GPU process may hang if UI process sends sync message simultaneously
Comment 1 Kimmo Kinnunen 2022-04-29 11:07:37 PDT
Created attachment 458598 [details]
WIP
Comment 2 Kimmo Kinnunen 2022-04-29 11:09:20 PDT
<rdar://91713027>
Comment 3 Kimmo Kinnunen 2022-05-04 08:35:07 PDT
Created attachment 458799 [details]
Patch
Comment 4 Kimmo Kinnunen 2022-05-04 08:46:42 PDT
Created attachment 458801 [details]
Patch
Comment 5 Chris Dumez 2022-05-04 16:17:26 PDT
Comment on attachment 458801 [details]
Patch

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

r=me with fixes. We may want to do the same for the network process?

> Source/WebKit/ChangeLog:23
> +        connection initialization. Send the GPUPg connection initialization result, audit token and

Typo: GPUPg

> Source/WebKit/GPUProcess/GPUProcess.cpp:134
> +    WTFLogAlways("GOT Create gpu process connection");

Should drop.

> Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp:374
> +    WTFLogAlways("Create gpu process connection");

Should drop

> Source/WebKit/WebProcess/GPU/GPUProcessConnection.cpp:132
> +        if (parentConnection.ignoreInvalidMessageForTesting())

indentation is wrong

> Source/WebKit/WebProcess/GPU/GPUProcessConnection.cpp:133
> +            instance->connection().setIgnoreInvalidMessageForTesting();

ditto.

> Source/WebKit/WebProcess/GPU/GPUProcessConnection.cpp:306
> +    WTFLogAlways("Got didinitialize");

Should drop.
Comment 6 Kimmo Kinnunen 2022-05-05 01:32:23 PDT
Created attachment 458858 [details]
For landing
Comment 7 Kimmo Kinnunen 2022-05-05 02:42:51 PDT
(In reply to Chris Dumez from comment #5)
> Comment on attachment 458801 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=458801&action=review
> 
> r=me with fixes. We may want to do the same for the network process?

Thanks!

I think network process, authn process and plugin process could all use this pattern.

However, I see the network process startup seems to be a bit intricate too, given the retries (?) and all. Maybe if there's no immediate need we should do it a bit later? Maybe after it is apparent that this change didn't cause any unforeseen issues.
Comment 8 EWS 2022-05-05 06:43:49 PDT
Committed r293829 (250302@main): <https://commits.webkit.org/250302@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 458858 [details].