<?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>219321</bug_id>
          
          <creation_ts>2020-11-27 13:09:33 -0800</creation_ts>
          <short_desc>GPU process remains alive even after UI process exited</short_desc>
          <delta_ts>2020-11-30 19:23:15 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit2</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Fujii Hironori">fujii</reporter>
          <assigned_to name="Fujii Hironori">fujii</assigned_to>
          <cc>cdumez</cc>
    
    <cc>darin</cc>
    
    <cc>don.olmstead</cc>
    
    <cc>thorton</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1710378</commentid>
    <comment_count>0</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2020-11-27 13:09:33 -0800</bug_when>
    <thetext>[WinCairo?] GPU process remains alive even after web process exited

GPUProcess overrides AuxiliaryProcess::didClose but it does nothing.
Is this a WinCairo specific issue?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1710379</commentid>
    <comment_count>1</comment_count>
      <attachid>414969</attachid>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2020-11-27 13:17:06 -0800</bug_when>
    <thetext>Created attachment 414969
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1710397</commentid>
    <comment_count>2</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2020-11-27 20:29:43 -0800</bug_when>
    <thetext>Committed r270213: &lt;https://trac.webkit.org/changeset/270213&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1710398</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2020-11-27 20:30:17 -0800</bug_when>
    <thetext>&lt;rdar://problem/71770347&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1710400</commentid>
    <comment_count>4</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2020-11-27 20:30:40 -0800</bug_when>
    <thetext>Landed in r270210, and reverted in r270213.
It broke TestWebKitAPI.GPUProcess.CrashWhilePlayingVideo on iOS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1710401</commentid>
    <comment_count>5</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2020-11-27 20:31:17 -0800</bug_when>
    <thetext>Reopened.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1710404</commentid>
    <comment_count>6</comment_count>
    <who name="Wenson Hsieh">wenson_hsieh</who>
    <bug_when>2020-11-27 20:34:49 -0800</bug_when>
    <thetext>Hmm...would this mean that if there are two web content processes (and therefore two connections) and one of the web processes die, then the GPU process will also terminate? If so, I think we&apos;d still need the GPU process to stay alive in this scenario, since it&apos;s still required to service the other web content process that is still alive.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1710452</commentid>
    <comment_count>7</comment_count>
    <who name="Tim Horton">thorton</who>
    <bug_when>2020-11-28 17:24:45 -0800</bug_when>
    <thetext>(In reply to Wenson Hsieh from comment #6)
&gt; Hmm...would this mean that if there are two web content processes (and
&gt; therefore two connections) and one of the web processes die, then the GPU
&gt; process will also terminate? If so, I think we&apos;d still need the GPU process
&gt; to stay alive in this scenario, since it&apos;s still required to service the
&gt; other web content process that is still alive.

No, the connection this is referring to /should/ be the UI-&gt;GPU connection, right?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1710485</commentid>
    <comment_count>8</comment_count>
    <who name="Wenson Hsieh">wenson_hsieh</who>
    <bug_when>2020-11-29 11:17:28 -0800</bug_when>
    <thetext>(In reply to Tim Horton from comment #7)
&gt; (In reply to Wenson Hsieh from comment #6)
&gt; &gt; Hmm...would this mean that if there are two web content processes (and
&gt; &gt; therefore two connections) and one of the web processes die, then the GPU
&gt; &gt; process will also terminate? If so, I think we&apos;d still need the GPU process
&gt; &gt; to stay alive in this scenario, since it&apos;s still required to service the
&gt; &gt; other web content process that is still alive.
&gt; 
&gt; No, the connection this is referring to /should/ be the UI-&gt;GPU connection,
&gt; right?

Ah, if that&apos;s the case then this makes a lot more sense. I was unclear on which process the `IPC::Connection` was referring to.

I suppose this doesn&apos;t affect Cocoa platforms because the GPU process is a child process of the UI (application) process, so if the app dies then the GPU process goes along with it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1710743</commentid>
    <comment_count>9</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2020-11-30 13:35:36 -0800</bug_when>
    <thetext>Thank you for clarifying. I didn&apos;t understand GPU process model.

I confirmed GPUConnectionToWebProcess::didClose is called when Web process exits, and GPUProcess::didClose is called when UI process exits on WinCairo.

Why does TestWebKitAPI.GPUProcess.CrashWhilePlayingVideo fail on iOS with my patch?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1710758</commentid>
    <comment_count>10</comment_count>
    <who name="Tim Horton">thorton</who>
    <bug_when>2020-11-30 13:57:19 -0800</bug_when>
    <thetext>(In reply to Fujii Hironori from comment #9)
&gt; Thank you for clarifying. I didn&apos;t understand GPU process model.
&gt; 
&gt; I confirmed GPUConnectionToWebProcess::didClose is called when Web process
&gt; exits, and GPUProcess::didClose is called when UI process exits on WinCairo.
&gt; 
&gt; Why does TestWebKitAPI.GPUProcess.CrashWhilePlayingVideo fail on iOS with my
&gt; patch?

Do you have a link to the test output? Also, +cdumez</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1710764</commentid>
    <comment_count>11</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2020-11-30 14:09:56 -0800</bug_when>
    <thetext>(In reply to Tim Horton from comment #10)
&gt; Do you have a link to the test output? Also, +cdumez

I&apos;m sorry. It did misunderstand. TestWebKitAPI.GPUProcess.CrashWhilePlayingVideo is flaky without my patch.

https://results.webkit.org/?suite=api-tests&amp;test=TestWebKitAPI.GPUProcess.CrashWhilePlayingVideo&amp;platform=ios

I&apos;m going to land it again.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1710781</commentid>
    <comment_count>12</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2020-11-30 14:23:53 -0800</bug_when>
    <thetext>(In reply to Fujii Hironori from comment #11)
&gt; (In reply to Tim Horton from comment #10)
&gt; &gt; Do you have a link to the test output? Also, +cdumez
&gt; 
&gt; I&apos;m sorry. It did misunderstand.
&gt; TestWebKitAPI.GPUProcess.CrashWhilePlayingVideo is flaky without my patch.
&gt; 
&gt; https://results.webkit.org/?suite=api-tests&amp;test=TestWebKitAPI.GPUProcess.
&gt; CrashWhilePlayingVideo&amp;platform=ios
&gt; 
&gt; I&apos;m going to land it again.

Yes, I noticed GPUProcess.CrashWhilePlayingVideo is flaky on the iOS bots too. I have not been able to reproduce this flakiness though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1710892</commentid>
    <comment_count>13</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2020-11-30 18:10:15 -0800</bug_when>
    <thetext>Committed r270279: &lt;https://trac.webkit.org/changeset/270279&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1710896</commentid>
    <comment_count>14</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2020-11-30 18:28:04 -0800</bug_when>
    <thetext>For future reference: A bug like this should *not* have the [WinCairo?] prefix.

Platform-independent fix to cross-platform issue!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1710904</commentid>
    <comment_count>15</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2020-11-30 19:23:15 -0800</bug_when>
    <thetext>I got it.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>414969</attachid>
            <date>2020-11-27 13:17:06 -0800</date>
            <delta_ts>2020-11-30 13:36:23 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-219321-20201128061705.patch</filename>
            <type>text/plain</type>
            <size>2054</size>
            <attacher name="Fujii Hironori">fujii</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjcwMjA2CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViS2l0L0No
YW5nZUxvZyBiL1NvdXJjZS9XZWJLaXQvQ2hhbmdlTG9nCmluZGV4IDNlMzA2YTBiNDQzMDdlYzU2
OWU0OGUzN2FjMzE3N2RmYWQ0YjJkZGIuLjIwYjQ0NjlhMDgzODE3ODMxYTA3ZGUyODcxY2M4NDk4
Nzk2MDk4NWEgMTAwNjQ0Ci0tLSBhL1NvdXJjZS9XZWJLaXQvQ2hhbmdlTG9nCisrKyBiL1NvdXJj
ZS9XZWJLaXQvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTggQEAKKzIwMjAtMTEtMjcgIEZ1amlpIEhp
cm9ub3JpICA8SGlyb25vcmkuRnVqaWlAc29ueS5jb20+CisKKyAgICAgICAgW1dpbkNhaXJvP10g
R1BVIHByb2Nlc3MgcmVtYWlucyBhbGl2ZSBldmVuIGFmdGVyIHdlYiBwcm9jZXNzIGV4aXRlZAor
ICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MjE5MzIxCis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