jtreg test test/jdk/java/lang/StackWalker/StackWalkTest.java fails after jtreg commit 7903373
Kosta Stojiljkovic
kostasto at proton.me
Wed Mar 15 21:40:35 UTC 2023
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 hotspot-compiler-dev
mailing list