[Webkit-unassigned] [Bug 201492] New: [GTK] Keeps running obsolete WebProcess-es for too long

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 4 23:12:13 PDT 2019


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

            Bug ID: 201492
           Summary: [GTK] Keeps running obsolete WebProcess-es for too
                    long
           Product: WebKit
           Version: Other
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKitGTK
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mcrha at redhat.com
                CC: bugs-noreply at webkitgtk.org

I use webkit-2.26 branch at r249422. Compile the test application from bug #201033 comment #41. When it's run, only a single WebKitWebProcess is running, which makes perfect sense, because there's only single WebKitWebView. From `ps ax | grep WebKitWebProcess` I see:

>  3707 pts/1    SLl+   0:00 PREFIX/libexec/webkit2gtk-4.0/WebKitWebProcess 6 10

Click the 'Reload' button at the top of the test application. It shows "Loading...", then opens the previous content again. The 'ps' says:

>  3707 pts/1    SLl+   0:00 PREFIX/libexec/webkit2gtk-4.0/WebKitWebProcess 6 10
>  3767 pts/1    SLl+   0:00 PREFIX/libexec/webkit2gtk-4.0/WebKitWebProcess 11 15
>  3778 pts/1    SLl+   0:00 PREFIX/libexec/webkit2gtk-4.0/WebKitWebProcess 14 17

Click the 'Reload' button again.

>  3707 pts/1    SLl+   0:00 PREFIX/libexec/webkit2gtk-4.0/WebKitWebProcess 6 10
>  3767 pts/1    SLl+   0:00 PREFIX/libexec/webkit2gtk-4.0/WebKitWebProcess 11 15
>  3778 pts/1    SLl+   0:00 PREFIX/libexec/webkit2gtk-4.0/WebKitWebProcess 14 17
>  3798 pts/1    SLl+   0:00 PREFIX/libexec/webkit2gtk-4.0/WebKitWebProcess 17 19

and again

>  3767 pts/1    SLl+   0:00 PERFIX/libexec/webkit2gtk-4.0/WebKitWebProcess 11 15
>  3778 pts/1    SLl+   0:00 PERFIX/libexec/webkit2gtk-4.0/WebKitWebProcess 14 17
>  3798 pts/1    SLl+   0:00 PREFIX/libexec/webkit2gtk-4.0/WebKitWebProcess 17 19
>  3823 pts/1    SLl+   0:00 PREFIX/libexec/webkit2gtk-4.0/WebKitWebProcess 20 11

It stopped the first process only now. The processes do not seem to be reused.

I believe it's too late. Not only because of the used resources by obsolete WebProcess-es, but also if the page loaded there would do anything nasty, you just give it more time to do it, which can be considered a security issue from certain point of view. I checked and with this test application the WebProcess-es use around 70MB of resident memory, which is not that much, but it's 4 times, which is more that 1/4GB, which can count. And this is a very simple example, imagine that some applications create their own Web Extensions, which can add to the memory requirements, either directly or indirectly (by using DOM API, which caches the objects). I do not know whether you also discard the WebPage content as soon as the process gets obsolete, but I do not think it matters that much, we are still talking about wasted resources and if the page gets control of the process by executing its own code on the machine you'll not stop it doing it by clearing the page content, you'll stop it only by closing the parent process.

Trying the 'ps' again, all the processes from the last check are still there, after 5-10 minutes till I wrote this comment. Clicking the Reload four times (always waiting till the page fully loads) gives me this 'ps' output (all four processes are replaced):

>  3923 pts/1    SLl+   0:00 PREFIX/libexec/webkit2gtk-4.0/WebKitWebProcess 23 11
>  3934 pts/1    SLl+   0:00 PREFIX/libexec/webkit2gtk-4.0/WebKitWebProcess 26 16
>  3945 pts/1    SLl+   0:00 PREFIX/libexec/webkit2gtk-4.0/WebKitWebProcess 29 18
>  3956 pts/1    SLl+   0:00 PREFIX/libexec/webkit2gtk-4.0/WebKitWebProcess 32 10

Thus I'd prefer if you close the obsolete WebProcess-es as soon as they are obsolete.

-- 
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/20190905/4fd725dc/attachment-0001.html>


More information about the webkit-unassigned mailing list