Bug 168604 - [GTK] Do something with processDidBecomeUnresponsive
Summary: [GTK] Do something with processDidBecomeUnresponsive
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-20 09:14 PST by Michael Catanzaro
Modified: 2017-03-13 12:13 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2017-02-20 09:14:52 PST
We have an issue in Epiphany where attempting to Stop or close an unresponsive web process takes a very long time (I think 30 seconds). It would be useful for us to have a way to detect this and kill the process immediately. I do think this should really be handled by WebKit, not the application, though: if the web process doesn't respond to Stop or close within a second or two, something's gone wrong and it surely needs to be killed.

The WebKit::NavigationClient and WebKit::LoaderClient classes expose processDidBecomeUnresponsive/processDidBecomeResponsive alongside processDidCrash. I don't know what the difference between the two clients is, but we implement WebKit::LoaderClient in WebKitLoaderClient.cpp. We should probably handle unresponsive notifications there, e.g. by manually killing the web process and then calling webkitWebViewWebProcessCrashed.
Comment 1 Michael Catanzaro 2017-02-20 15:08:43 PST
I think Evolution has had problems with this as well, though I've never noticed had any problems with it myself.
Comment 2 Michael Catanzaro 2017-02-20 15:09:41 PST
(In reply to comment #0)
> We
> should probably handle unresponsive notifications there, e.g. by manually
> killing the web process and then calling webkitWebViewWebProcessCrashed.

Or just expose a new signal for unresponsive process.
Comment 3 Milan Crha 2017-02-21 01:40:05 PST
It's not always stuck, it can sometimes do something with a large page in the main thread, which makes the WebProcess "unresponsive". Like the recent hyphenation issue. The 30 seconds can be about D-Bus timeouts, it is as such in the evolution side at least, when talking to its web extension.
Comment 4 Michael Catanzaro 2017-03-13 12:13:07 PDT
Separately, we ought to handle processes that exceed reasonable CPU usage. See bug #169456.