openj9
openj9 copied to clipboard
jdk22 OpenJDK StackWalker/CallerSensitiveMethod - Expected class jdk.test.CallerSensitiveTest but got [class java.util.CSM]
https://openj9-jenkins.osuosl.org/job/Test_openjdk22_j9_sanity.openjdk_aarch64_mac_Personal_testList_0/1/ jdk_lang java/lang/StackWalker/CallerSensitiveMethod/Main.java
16:04:08 ERROR: Expected class jdk.test.CallerSensitiveTest but got [class java.util.CSM]
16:04:08 java.lang.UnsupportedOperationException: Stack walker configured with DROP_METHOD_INFO
16:04:08 at java.base/java.lang.StackWalker$StackFrameImpl.ensureMethodInfo(StackWalker.java:431)
16:04:08 at java.base/java.lang.StackWalker$StackFrameImpl.toStackTraceElement(StackWalker.java:482)
16:04:08 at java.base/java.lang.StackWalker$StackFrameImpl.toString(StackWalker.java:512)
16:04:08 at java.base/java.lang.String.valueOf(String.java:5285)
16:04:08 at csm/jdk.test.CallerSensitiveTest.lambda$checkNonCSMCaller$0(CallerSensitiveTest.java:147)
16:04:08 at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1709)
16:04:08 at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:782)
16:04:08 at csm/jdk.test.CallerSensitiveTest.checkNonCSMCaller(CallerSensitiveTest.java:147)
16:04:08 at csm/jdk.test.CallerSensitiveTest.invokeMethod(CallerSensitiveTest.java:111)
16:04:08 at csm/jdk.test.CallerSensitiveTest.main(CallerSensitiveTest.java:73)
Perhaps related to https://github.com/eclipse-openj9/openj9/issues/18697
@keithc-ca
the cause of this is due to missing update to the walkState pointer allocated https://github.com/eclipse-openj9/openj9/blob/master/runtime/jcl/common/java_lang_StackWalker.cpp#L106
which allowed flags/data from previous walkState to be used during stack walking. I will open a PR to fix this shortly.
Tests to be unexcluded via https://github.com/adoptium/aqa-tests/pull/5066.
Reopen since https://github.com/eclipse-openj9/openj9/pull/18926 was reverted.
@pshipton Do you think we should re-exclude the test, i.e. revert https://github.com/adoptium/aqa-tests/pull/5066?
Yes, it would be nice to have clean jdk22 builds again.
See https://github.com/adoptium/aqa-tests/pull/5072.