RESOLVED FIXED 185225
Load hangs if the WebProcess fails to launch
https://bugs.webkit.org/show_bug.cgi?id=185225
Summary Load hangs if the WebProcess fails to launch
Chris Dumez
Reported 2018-05-02 15:50:21 PDT
Load hangs if the WebProcess fails to launch because we do not attempt to relaunch, nor do we notify the client that we failed to launch the WebProcess. Also, since WebPageProxy::isValid() returns true while in this state, follow-up loads / reloads do not work and do not relaunch the WebProcess.
Attachments
Patch (21.33 KB, patch)
2018-05-02 16:08 PDT, Chris Dumez
no flags
Patch (21.37 KB, patch)
2018-05-03 12:08 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2018-05-02 15:50:41 PDT
Chris Dumez
Comment 2 2018-05-02 16:08:10 PDT
Geoffrey Garen
Comment 3 2018-05-02 19:45:16 PDT
/Volumes/Data/EWS/WebKit/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm:37:8: error: unknown type name '_WKProcessTerminationReason'; did you mean 'WKProcessTerminationReason'? static _WKProcessTerminationReason expectedCrashReason;
Geoffrey Garen
Comment 4 2018-05-02 19:48:32 PDT
Comment on attachment 339362 [details] Patch r=me Please fix the 32bit build before landing. Seems bad that one can get into the state where a web process never launches. Why do we believe that a re-launch would succeed in this case, when the original launch failed? Do we need to investigate or log more to learn why the original launch failed?
Ryosuke Niwa
Comment 5 2018-05-02 20:38:12 PDT
Comment on attachment 339362 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=339362&action=review > Source/WebKit/UIProcess/Launcher/mac/ProcessLauncherMac.mm:234 > + xpc_connection_set_event_handler(m_xpcConnection.get(), errorHandler); xpc_connection_set_event_handler adds the event handler asynchronously so there might be a race here. See https://trac.webkit.org/changeset/230314
Chris Dumez
Comment 6 2018-05-03 08:57:50 PDT
Comment on attachment 339362 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=339362&action=review >> Source/WebKit/UIProcess/Launcher/mac/ProcessLauncherMac.mm:234 >> + xpc_connection_set_event_handler(m_xpcConnection.get(), errorHandler); > > xpc_connection_set_event_handler adds the event handler asynchronously so there might be a race here. > See https://trac.webkit.org/changeset/230314 The commit you refer to is about dispatch_source_set_event_handler in IPC code. This is xpc_connection_set_event_handler() in process launching code, which we use only to listen for errors. Could you please clarify what the issue is here? Do you believe my patch introduced a race? As far as I can tell, I am not not changing the ordering of things here, I merely moved the lambda into its own variable so that I could call it to simulate an error.
Chris Dumez
Comment 7 2018-05-03 12:08:03 PDT
WebKit Commit Bot
Comment 8 2018-05-03 12:59:11 PDT
Comment on attachment 339436 [details] Patch Clearing flags on attachment: 339436 Committed r231321: <https://trac.webkit.org/changeset/231321>
WebKit Commit Bot
Comment 9 2018-05-03 12:59:12 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.