<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Hi<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I’ve sent fix out for review:
<a href="https://github.com/openjdk/jdk/pull/13058">https://github.com/openjdk/jdk/pull/13058</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Leonid<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">Tobias Hartmann <tobias.hartmann@oracle.com><br>
<b>Date: </b>Thursday, March 16, 2023 at 12:20 AM<br>
<b>To: </b>Kosta Stojiljkovic <kostasto@proton.me>, core-libs-dev@openjdk.org <core-libs-dev@openjdk.org><br>
<b>Cc: </b>Leonid Mesnik <leonid.mesnik@oracle.com><br>
<b>Subject: </b>Re: jtreg test test/jdk/java/lang/StackWalker/StackWalkTest.java fails after jtreg commit 7903373<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">Hi Kosta,<br>
<br>
Thanks again for the report! This test is owned by core-libs/java.lang, I'm forwarding to<br>
core-libs-dev and CC'ing Leonid, the author of </span><a href="https://bugs.openjdk.org/browse/CODETOOLS-7903373"><span style="font-size:11.0pt">https://bugs.openjdk.org/browse/CODETOOLS-7903373</span></a><span style="font-size:11.0pt">.<br>
<br>
I can see these failures in our testing as well but no one filed a bug yet. I filed:<br>
</span><a href="https://bugs.openjdk.org/browse/JDK-8304314"><span style="font-size:11.0pt">https://bugs.openjdk.org/browse/JDK-8304314</span></a><span style="font-size:11.0pt"><br>
<br>
Best regards,<br>
Tobias<br>
<br>
<br>
On 15.03.23 22:40, Kosta Stojiljkovic wrote:<br>
> Dear all,<br>
> <br>
> The test in ..test/jdk/java/lang/StackWalker/StackWalkTest.java fails with the latest jtreg build, with the following error:
<br>
> <br>
> ...<br>
> recursion chain<br>
> ...<br>
> ...<br>
> ...<br>
>         at StackWalkTest$Test.call(StackWalkTest.java:223)<br>
>        at StackWalkTest.runTest(StackWalkTest.java:270)<br>
>        at StackWalkTest.main(StackWalkTest.java:325)<br>
>        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)<br>
>        at java.base/java.lang.reflect.Method.invoke(Method.java:578)<br>
>        at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)<br>
>        at java.base/java.lang.Thread.run(Thread.java:1623)<br>
> Caused by: java.lang.IndexOutOfBoundsException: Index: 1004, Size: 1004<br>
>        at java.base/java.util.LinkedList.checkElementIndex(LinkedList.java:559)<br>
>        at java.base/java.util.LinkedList.get(LinkedList.java:480)<br>
>        at StackRecorderUtil.compareFrame(StackRecorderUtil.java:64)<br>
>        at StackWalkTest.consume(StackWalkTest.java:145)<br>
>        ... 1018 more<br>
> <br>
> JavaTest Message: Test threw exception: java.lang.RuntimeException: extra non-infra stack frame at count 1004: <com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)><br>
> <br>
> ---------------------------<br>
> <br>
> In essence, the test detects an extra non-infra stack frame for the MainWrapper$MainTask's frame. The test should disregard MainTask's stack frame, since it's coming from an infrastructure class - com.sun.javatest.regtest.agent.MainWrapper. The code correctly
 checks if the stack frame belongs to the mentioned infrastructure class, but it also looks for the inner class - com.sun.javatest.regtest.agent.MainWrapper$MainThread.<br>
> <br>
> I believe the problem comes from the following commit (7903373) to the jtreg repository:
</span><a href="https://github.com/openjdk/jtreg/commit/5b9e661eb6ee9dd9a9d2690986bbf9ce303a8f03"><span style="font-size:11.0pt">https://github.com/openjdk/jtreg/commit/5b9e661eb6ee9dd9a9d2690986bbf9ce303a8f03</span></a><span style="font-size:11.0pt"><br>
> <br>
> This commit changed the name of the class MainThread to MainTask, thus making the hardcoded check in the StackWalkTest fail to recognize this extra stack frame as an infra frame.<br>
> <br>
> Could you please try to reproduce and let me know if I am missing or misunderstanding something.<br>
> <br>
> Best,<br>
> Kosta Stojiljkovic<o:p></o:p></span></p>
</div>
</div>
</body>
</html>