<?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>227455</bug_id>
          
          <creation_ts>2021-06-28 11:16:38 -0700</creation_ts>
          <short_desc>[webkitcorepy] Fix race condition in TaskPool unittests</short_desc>
          <delta_ts>2021-07-28 20:57:37 -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>Tools / Tests</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="Jonathan Bedard">jbedard</reporter>
          <assigned_to name="Jonathan Bedard">jbedard</assigned_to>
          <cc>aakash_jain</cc>
    
    <cc>darin</cc>
    
    <cc>dewei_zhu</cc>
    
    <cc>ryanhaddad</cc>
    
    <cc>slewis</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1773139</commentid>
    <comment_count>0</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2021-06-28 11:16:38 -0700</bug_when>
    <thetext>webkitcorepy.tests.task_pool_unittest.TaskPoolUnittest.test_invalid_shutdown is racey on EWS, because it relies on the parent process terminating it&apos;s children before the children have a chance to finish their computation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1773140</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-06-28 11:16:52 -0700</bug_when>
    <thetext>&lt;rdar://problem/79873003&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1773141</commentid>
    <comment_count>2</comment_count>
      <attachid>432410</attachid>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2021-06-28 11:21:42 -0700</bug_when>
    <thetext>Created attachment 432410
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1773142</commentid>
    <comment_count>3</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2021-06-28 11:22:05 -0700</bug_when>
    <thetext>Failures like this one https://ews-build.webkit.org/#/builders/5/builds/55039/steps/11/logs/stdio are the ones I&apos;m trying to address.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1773144</commentid>
    <comment_count>4</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2021-06-28 11:23:55 -0700</bug_when>
    <thetext>History of this test:
https://results.webkit.org/?suite=webkitpy-tests&amp;test=webkitcorepy.tests.task_pool_unittest.TaskPoolUnittest.test_invalid_shutdown</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1773147</commentid>
    <comment_count>5</comment_count>
      <attachid>432410</attachid>
    <who name="">dewei_zhu</who>
    <bug_when>2021-06-28 12:02:32 -0700</bug_when>
    <thetext>Comment on attachment 432410
Patch

r=me, this seems to be a mitigation,  but theoretically doesn&apos;t fix the race itself.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1773149</commentid>
    <comment_count>6</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2021-06-28 12:06:14 -0700</bug_when>
    <thetext>(In reply to dewei_zhu from comment #5)
&gt; Comment on attachment 432410 [details]
&gt; Patch
&gt; 
&gt; r=me, this seems to be a mitigation,  but theoretically doesn&apos;t fix the race
&gt; itself.

It doesn&apos;t fix the race, but it&apos;s hard to see how we could (and still retain the test). The test is basically verifying that the parent can and does terminate a child process if it&apos;s taking too long to complete. We clearly want some kind of limit on how long the child runs, in case the parent actually isn&apos;t terminating the child</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1773152</commentid>
    <comment_count>7</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2021-06-28 12:11:39 -0700</bug_when>
    <thetext>Committed r279345 (239213@main): &lt;https://commits.webkit.org/239213@main&gt;

All reviewed patches have been landed. Closing bug and clearing flags on attachment 432410.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1780065</commentid>
    <comment_count>8</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2021-07-28 08:39:48 -0700</bug_when>
    <thetext>Reopening to attach new patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1780066</commentid>
    <comment_count>9</comment_count>
      <attachid>434429</attachid>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2021-07-28 08:39:49 -0700</bug_when>
    <thetext>Created attachment 434429
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1780069</commentid>
    <comment_count>10</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2021-07-28 08:40:59 -0700</bug_when>
    <thetext>The original change didn&apos;t fix our flakiness. This test isn&apos;t super valuable in the first place, I think we should just delete it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1780093</commentid>
    <comment_count>11</comment_count>
      <attachid>434429</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2021-07-28 10:16:53 -0700</bug_when>
    <thetext>Comment on attachment 434429
Patch

How does deleting a function fix a race condition?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1780094</commentid>
    <comment_count>12</comment_count>
      <attachid>434429</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2021-07-28 10:17:26 -0700</bug_when>
    <thetext>Comment on attachment 434429
Patch

Oh, I get it, deleting a test (not just a function).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1780284</commentid>
    <comment_count>13</comment_count>
      <attachid>434429</attachid>
    <who name="">dewei_zhu</who>
    <bug_when>2021-07-28 17:57:48 -0700</bug_when>
    <thetext>Comment on attachment 434429
Patch

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1780289</commentid>
    <comment_count>14</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2021-07-28 18:48:53 -0700</bug_when>
    <thetext>Committed r280412 (240052@main): &lt;https://commits.webkit.org/240052@main&gt;

All reviewed patches have been landed. Closing bug and clearing flags on attachment 434429.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>432410</attachid>
            <date>2021-06-28 11:21:42 -0700</date>
            <delta_ts>2021-07-28 08:39:46 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-227455-20210628112141.patch</filename>
            <type>text/plain</type>
            <size>1474</size>
            <attacher name="Jonathan Bedard">jbedard</attacher>
            
              <data encoding="base64">SW5kZXg6IFRvb2xzL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBUb29scy9DaGFuZ2VMb2cJKHJl
dmlzaW9uIDI3OTM0MykKKysrIFRvb2xzL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwz
ICsxLDE0IEBACisyMDIxLTA2LTI4ICBKb25hdGhhbiBCZWRhcmQgIDxqYmVkYXJkQGFwcGxlLmNv
bT4KKworICAgICAgICBbd2Via2l0Y29yZXB5XSBGaXggcmFjZSBjb25kaXRpb24gaW4gVGFza1Bv
b2wgdW5pdHRlc3RzIAorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5j
Z2k/aWQ9MjI3NDU1CisgICAgICAgIDxyZGFyOi8vcHJvYmxlbS83OTg3MzAwMz4KKworICAgICAg
ICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFM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yZSgpOgogICAgICAgICAgICAgd2l0
aCBzZWxmLmFzc2VydFJhaXNlcyhUYXNrUG9vbC5FeGNlcHRpb24pOgogICAgICAgICAgICAgICAg
IHdpdGggVGFza1Bvb2wod29ya2Vycz0xLCB0ZWFyZG93bj10ZWFyZG93biwgZ3JhY2VfcGVyaW9k
PTEsIGZvcmNlX2Zvcms9VHJ1ZSkgYXMgcG9vbDoKLSAgICAgICAgICAgICAgICAgICAgcG9vbC5k
byh3YWl0LCAyKQorICAgICAgICAgICAgICAgICAgICBwb29sLmRvKHdhaXQsIDUpCg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>434429</attachid>
            <date>2021-07-28 08:39:49 -0700</date>
            <delta_ts>2021-07-28 20:57:37 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-227455-20210728083949.patch</filename>
            <type>text/plain</type>
            <size>1558</size>
            <attacher name="Jonathan Bedard">jbedard</attacher>
            
              <data encoding="base64">SW5kZXg6IFRvb2xzL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBUb29scy9DaGFuZ2VMb2cJKHJl
dmlzaW9uIDI4MDM4MikKKysrIFRvb2xzL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwz
ICsxLDE0IEBACisyMDIxLTA3LTI3ICBKb25hdGhhbiBCZWRhcmQgIDxqYmVkYXJkQGFwcGxlLmNv
bT4KKworICAgICAgICBbd2Via2l0Y29yZXB5XSBGaXggcmFjZSBjb25kaXRpb24gaW4gVGFza1Bv
b2wgdW5pdHRlc3RzIChmb2xsb3ctdXAgZml4KQorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0
Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MjI3NDU1CisgICAgICAgIDxyZGFyOi8vcHJvYmxlbS83OTg3
MzAwMz4KKworICAgICAgICBSZ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ZWFyZG93biBhcmd1bWVudCcuZm9ybWF0
KHgpIGZvciB4IGluIHJhbmdlKDQpXSwKICAgICAgICAgKQotCi0gICAgZGVmIHRlc3RfaW52YWxp
ZF9zaHV0ZG93bihzZWxmKToKLSAgICAgICAgd2l0aCBPdXRwdXRDYXB0dXJlKCk6Ci0gICAgICAg
ICAgICB3aXRoIHNlbGYuYXNzZXJ0UmFpc2VzKFRhc2tQb29sLkV4Y2VwdGlvbik6Ci0gICAgICAg
ICAgICAgICAgd2l0aCBUYXNrUG9vbCh3b3JrZXJzPTEsIHRlYXJkb3duPXRlYXJkb3duLCBncmFj
ZV9wZXJpb2Q9MSwgZm9yY2VfZm9yaz1UcnVlKSBhcyBwb29sOgotICAgICAgICAgICAgICAgICAg
ICBwb29sLmRvKHdhaXQsIDUpCg==
</data>
<flag name="commit-queue"
          id="457005"
          type_id="3"
          status="-"
          setter="ews-feeder"
    />
          </attachment>
      

    </bug>

</bugzilla>