<?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>253868</bug_id>
          
          <creation_ts>2023-03-13 19:26:54 -0700</creation_ts>
          <short_desc>REGRESSION(261559@main) [Win] js/ShadowRealm-iframe-detach.html is randomly timing out</short_desc>
          <delta_ts>2023-03-28 14:34:14 -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>WebCore JavaScript</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>REOPENED</bug_status>
          <resolution></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>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1941100</commentid>
    <comment_count>0</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2023-03-13 19:26:54 -0700</bug_when>
    <thetext>REGRESSION(261559@main) [Win] js/ShadowRealm-iframe-detach.html is randomly timing out

After 261559@main (bug#175336) disabled USE_CF for WinCairo, the following tests are randomly timing out.

js/ShadowRealm-iframe-detach.html
js/ShadowRealm-importValue.html

The timeout is more likely happening in the first time. --run-singly switch is useful to reproduce the timeout.
  
&gt; python.exe ./Tools/Scripts/run-webkit-tests --wincairo --debug js/ShadowRealm-iframe-detach.html --iterations=30 -v --no-retry-failures --run-singly

The reproduction rate is 8/30.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1941101</commentid>
    <comment_count>1</comment_count>
      <attachid>465428</attachid>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2023-03-13 19:28:07 -0700</bug_when>
    <thetext>Created attachment 465428
WIP patch

This patch resolves the problem. I don&apos;t understand reportAbandonedObjectGraph at all.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1941428</commentid>
    <comment_count>2</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2023-03-14 19:20:13 -0700</bug_when>
    <thetext>Test gardening by 261667@main.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1941748</commentid>
    <comment_count>3</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2023-03-15 19:21:36 -0700</bug_when>
    <thetext>If I keep &apos;realm&apos; in the &apos;window&apos; object, the timeout problem doesn&apos;t happen. The realm is garbage collected!?

diff --git a/LayoutTests/js/ShadowRealm-iframe-detach.html b/LayoutTests/js/ShadowRealm-iframe-detach.html
index d4651f0897d2..1c0e3721705b 100644
--- a/LayoutTests/js/ShadowRealm-iframe-detach.html
+++ b/LayoutTests/js/ShadowRealm-iframe-detach.html
@@ -22,6 +22,7 @@
  frame.onload = async () =&gt; {
      debug(frame);
      let realm = frame.realm;
+     window.xxx = realm;
      debug(&quot;detaching iframe&quot;);
      document.getElementsByTagName(&quot;iframe&quot;)[0].remove()
      $vm.gc();</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1942026</commentid>
    <comment_count>4</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2023-03-16 21:34:33 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/11639</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1942471</commentid>
    <comment_count>5</comment_count>
      <attachid>465511</attachid>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2023-03-19 20:51:35 -0700</bug_when>
    <thetext>Created attachment 465511
patch to reproduce the timeout for Mac port

This timeout is reproducible with Mac port if I apply this patch to take the garbageCollectOnNextRunLoop code path.

&gt; Tools/Scripts/run-webkit-tests --debug js/ShadowRealm-iframe-detach.html --iterations=30 --no-retry-failures --run-singly

The reproduction rate is 25/30.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1942756</commentid>
    <comment_count>6</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-03-20 19:27:25 -0700</bug_when>
    <thetext>&lt;rdar://problem/106974546&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1944114</commentid>
    <comment_count>7</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-03-26 21:22:16 -0700</bug_when>
    <thetext>Committed 262136@main (6c72fadf79d3): &lt;https://commits.webkit.org/262136@main&gt;

Reviewed commits have been landed. Closing PR #11639 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1944752</commentid>
    <comment_count>8</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2023-03-28 14:27:45 -0700</bug_when>
    <thetext>The test is still timing out on a Buildbot tester even after 262136@main. Reopened.

https://results.webkit.org/?suite=layout-tests&amp;test=js%2FShadowRealm-importValue.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1944753</commentid>
    <comment_count>9</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2023-03-28 14:34:14 -0700</bug_when>
    <thetext>It&apos;s a wrong URL.

js/ShadowRealm-iframe-detach.html is still timing out.
https://results.webkit.org/?platform=wincairo&amp;suite=layout-tests&amp;test=js%2FShadowRealm-iframe-detach.html

js/ShadowRealm-importValue.html and http/tests/misc/iframe-shadow-realm.html doesn&apos;t seem to time out after the change.
https://results.webkit.org/?platform=wincairo&amp;suite=layout-tests&amp;suite=layout-tests&amp;test=js%2FShadowRealm-importValue.html&amp;test=http%2Ftests%2Fmisc%2Fiframe-shadow-realm.html</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>465428</attachid>
            <date>2023-03-13 19:28:07 -0700</date>
            <delta_ts>2023-03-16 21:41:02 -0700</delta_ts>
            <desc>WIP patch</desc>
            <filename>wip.patch</filename>
            <type>text/plain</type>
            <size>1254</size>
            <attacher name="Fujii Hironori">fujii</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJDb3JlL2JpbmRpbmdzL2pzL0dDQ29udHJvbGxlci5jcHAg
Yi9Tb3VyY2UvV2ViQ29yZS9iaW5kaW5ncy9qcy9HQ0NvbnRyb2xsZXIuY3BwCmluZGV4IDVmOTM0
OTE3NTZmMi4uNmI2YWU0NTM0NTQzIDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViQ29yZS9iaW5kaW5n
cy9qcy9HQ0NvbnRyb2xsZXIuY3BwCisrKyBiL1NvdXJjZS9XZWJDb3JlL2JpbmRpbmdzL2pzL0dD
Q29udHJvbGxlci5jcHAKQEAgLTcwLDcgKzcwLDcgQEAgdm9pZCBHQ0NvbnRyb2xsZXI6OmdhcmJh
Z2VDb2xsZWN0U29vbigpCiAgICAgLy8gV2Ugb25seSB1c2UgcmVwb3J0QWJhbmRvbmVkT2JqZWN0
R3JhcGggZm9yIHN5c3RlbXMgZm9yIHdoaWNoIHRoZXJlJ3MgYW4gaW1wbGVtZW50YXRpb24KICAg
ICAvLyBvZiB0aGUgZ2FyYmFnZSBjb2xsZWN0b3IgdGltZXJzIGluIEphdmFTY3JpcHRDb3JlLiBX
ZSB3b3VsZG4ndCBuZWVkIHRoaXMgaWYgSmF2YVNjcmlwdENvcmUKICAgICAvLyB1c2VkIGEgdGlt
ZXIgaW1wbGVtZW50YXRpb24gZnJvbSBXVEYgbGlrZSBSdW5Mb29wOjpUaW1lci4KLSNpZiBVU0Uo
Q0YpIHx8IFVTRShHTElCKQorI2lmIFVTRShDRikgfHwgVVNFKEdMSUIpIHx8IDEKICAgICBKU0xv
Y2tIb2xkZXIgbG9jayhjb21tb25WTSgpKTsKICAgICBjb21tb25WTSgpLmhlYXAucmVwb3J0QWJh
bmRvbmVkT2JqZWN0R3JhcGgoKTsKICNlbHNlCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS93
b3JrZXJzL1dvcmtlckdsb2JhbFNjb3BlLmNwcCBiL1NvdXJjZS9XZWJDb3JlL3dvcmtlcnMvV29y
a2VyR2xvYmFsU2NvcGUuY3BwCmluZGV4IDM0NzQ4NWEyODQ4YS4uMjU3ODE3NmM3MWUxIDEwMDY0
NAotLS0gYS9Tb3VyY2UvV2ViQ29yZS93b3JrZXJzL1dvcmtlckdsb2JhbFNjb3BlLmNwcAorKysg
Yi9Tb3VyY2UvV2ViQ29yZS93b3JrZXJzL1dvcmtlckdsb2JhbFNjb3BlLmNwcApAQCAtNjA3LDcg
KzYwNyw3IEBAIHZvaWQgV29ya2VyR2xvYmFsU2NvcGU6OmRlbGV0ZUpTQ29kZUFuZEdDKFN5bmNo
cm9ub3VzIHN5bmNocm9ub3VzKQogICAgICAgICByZXR1cm47CiAgICAgfQogI2VuZGlmCi0jaWYg
VVNFKENGKSB8fCBVU0UoR0xJQikKKyNpZiBVU0UoQ0YpIHx8IFVTRShHTElCKSB8fCAxCiAgICAg
dm0oKS5oZWFwLnJlcG9ydEFiYW5kb25lZE9iamVjdEdyYXBoKCk7CiAjZWxzZQogICAgIHZtKCku
aGVhcC5jb2xsZWN0Tm93KEpTQzo6QXN5bmMsIEpTQzo6Q29sbGVjdGlvblNjb3BlOjpGdWxsKTsK
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>465511</attachid>
            <date>2023-03-19 20:51:35 -0700</date>
            <delta_ts>2023-03-19 20:51:46 -0700</delta_ts>
            <desc>patch to reproduce the timeout for Mac port</desc>
            <filename>debug-patch-for-mac.patch</filename>
            <type>text/plain</type>
            <size>999</size>
            <att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