<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>228147</bug_id>
          
          <creation_ts>2021-07-21 07:39:59 -0700</creation_ts>
          <short_desc>[WPE][GTK] WebKitWebView:is-web-process-responsive seems to become FALSE too aggressively?</short_desc>
          <delta_ts>2021-07-21 09:17:24 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>aperez</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>cgarcia</cc>
    
    <cc>magomez</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1778419</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-07-21 07:39:59 -0700</bug_when>
    <thetext>I&apos;ve attached a screenshot showing . Epiphany watches the new WebKitWebView:is-web-process-responsive property and terminates the web process immediately if it changes to TRUE. This only makes sense to do if the process responsiveness check is relatively conservative. I thought it would only fire if the web process did not respond to a ping from the UI process for 10 seconds. However, it seems to be firing more often than I would expect. I noticed it fired today about two seconds after I started loading a page, which seems much too fast. We should investigate to see if there might be any logic errors, perhaps involving PSON or other tricky edge cases, for example.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1778420</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-07-21 07:40:46 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #0)
&gt; I&apos;ve attached a screenshot showing .

Oops, there&apos;s really no point in a screenshot since it doesn&apos;t prove anything.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1778421</commentid>
    <comment_count>2</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2021-07-21 07:51:31 -0700</bug_when>
    <thetext>WebProcesses are also considered unresponsive when the system is
under heavy load (e.g. building WebKit) and for example launching
Epiphany with a saved session that has many tabs. The WebProcesses
which need to be spawned all at once will do progress slowly, and
most will be considered unresponsive.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1778423</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-07-21 08:03:33 -0700</bug_when>
    <thetext>See also:

https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/965

https://gitlab.gnome.org/GNOME/epiphany/-/issues/1561</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1778424</commentid>
    <comment_count>4</comment_count>
    <who name="Miguel Gomez">magomez</who>
    <bug_when>2021-07-21 08:06:37 -0700</bug_when>
    <thetext>I&apos;m afraid WebKit only waits 3 seconds for an answer from the web process before marking it as unresponsive. This is not a lot and, as Adrian mentions, if the system is loaded some views can be marked as unresponsive despite they are just slow.

Those 3 seconds are the default value used by Apple as well. We could increase the value for our ports if we think it&apos;s too small, or the browser could wait some extra time once the flag is activated to ensure that the process stays unresponsive for a while. Not sure what&apos;s the best option here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1778432</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-07-21 09:00:41 -0700</bug_when>
    <thetext>Ah OK, that&apos;s a much simpler explanation.

Both options seem fine to me: either increase our timeout, or make the browser responsible for implementing its own longer timeout. That&apos;s hardly difficult. Probably Epiphany should not assume it&apos;s reasonable to immediately kill the unresponsive process.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1778437</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-07-21 09:17:24 -0700</bug_when>
    <thetext>Let&apos;s close this since it&apos;s based on an invalid premise (I assumed, without checking, that the timeout was much longer than it actually is). The existing API is sufficient for browsers to implement smarter logic.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>