jtreg test test/jdk/java/lang/StackWalker/StackWalkTest.java fails after jtreg commit 7903373

Kosta Stojiljkovic kostasto at proton.me
Thu Mar 16 14:14:17 UTC 2023


Thanks Leonid!

Kosta

------- Original Message -------
On Thursday, March 16th, 2023 at 2:29 PM, Leonid Mesnik <leonid.mesnik at oracle.com> wrote:


> Hi
> 
> I’ve sent fix out for review: https://github.com/openjdk/jdk/pull/13058
> 
> Leonid
> 
> From: Tobias Hartmann <tobias.hartmann at oracle.com>
> Date: Thursday, March 16, 2023 at 12:20 AM
> To: Kosta Stojiljkovic <kostasto at proton.me>, core-libs-dev at openjdk.org <core-libs-dev at openjdk.org>
> Cc: Leonid Mesnik <leonid.mesnik at oracle.com>
> Subject: Re: jtreg test test/jdk/java/lang/StackWalker/StackWalkTest.java fails after jtreg commit 7903373
> 
> Hi Kosta,
> 
> Thanks again for the report! This test is owned by core-libs/java.lang, I'm forwarding to
> core-libs-dev and CC'ing Leonid, the author of https://bugs.openjdk.org/browse/CODETOOLS-7903373.
> 
> I can see these failures in our testing as well but no one filed a bug yet. I filed:
> https://bugs.openjdk.org/browse/JDK-8304314
> 
> Best regards,
> Tobias
> 
> 
> On 15.03.23 22:40, Kosta Stojiljkovic wrote:
> > Dear all,
> >
> > The test in ..test/jdk/java/lang/StackWalker/StackWalkTest.java fails with the latest jtreg build, with the following error:
> >
> > ...
> > recursion chain
> > ...
> > ...
> > ...
> >         at StackWalkTest$Test.call(StackWalkTest.java:223)
> >        at StackWalkTest.runTest(StackWalkTest.java:270)
> >        at StackWalkTest.main(StackWalkTest.java:325)
> >        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
> >        at java.base/java.lang.reflect.Method.invoke(Method.java:578)
> >        at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
> >        at java.base/java.lang.Thread.run(Thread.java:1623)
> > Caused by: java.lang.IndexOutOfBoundsException: Index: 1004, Size: 1004
> >        at java.base/java.util.LinkedList.checkElementIndex(LinkedList.java:559)
> >        at java.base/java.util.LinkedList.get(LinkedList.java:480)
> >        at StackRecorderUtil.compareFrame(StackRecorderUtil.java:64)
> >        at StackWalkTest.consume(StackWalkTest.java:145)
> >        ... 1018 more
> >
> > 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)>
> >
> > ---------------------------
> >
> > 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.
> >
> > I believe the problem comes from the following commit (7903373) to the jtreg repository: https://github.com/openjdk/jtreg/commit/5b9e661eb6ee9dd9a9d2690986bbf9ce303a8f03
> >
> > 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.
> >
> > Could you please try to reproduce and let me know if I am missing or misunderstanding something.
> >
> > Best,
> > Kosta Stojiljkovic


More information about the core-libs-dev mailing list