Closed babsingh closed 2 years ago
This failure will only be seen once https://github.com/eclipse-openj9/openj9/issues/13998 is fixed via https://github.com/ibmruntimes/openj9-openjdk-jdk/pull/382.
For JDK18, jdk/internal/reflect/Reflection/GetCallerClassTest.java
is already excluded via https://github.com/adoptium/aqa-tests/pull/3154 due to https://github.com/eclipse-openj9/openj9/issues/13998.
Once #13998 is fixed via ibmruntimes/openj9-openjdk-jdk#382, ProblemList_openjdk18-openj9.txt
(in the aqa-tests
repo) should be updated to state that */Reflection/GetCallerClassTest.java
is excluded due to this PR.
Crash occurs in https://github.com/eclipse-openj9/openj9/blob/master/jcl/src/java.base/share/classes/java/lang/StackWalker.java#L210 at function.apply(frameStream)
at invokevirtualLogic
_sendMethod = *(J9Method**)((UDATA)receiverClass + methodIndex);
The function
is
private static Function<Stream<StackWalker.StackFrame>, String> toStackTrace() {
return frames -> frames
.takeWhile(
frame -> !frame.getClassName().equals("GetCallerClassTest") ||
!frame.getMethodName().equals("main"))
.map(Object::toString)
.collect(Collectors.joining("\n ", " ", "\n"));
}
I have tried variations e.g.
private static Function<Stream<StackWalker.StackFrame>, List<StackWalker.StackFrame>> toStackTrace() {
return s -> s.limit(10).collect(Collectors.toList());
}
but it fails at the same place.
@EricYangIBM How reproduceable is this failure?
I wasnt able to reproduce it, although I wasnt running with the test harness
I have been able to reproduce it in every run (with jtreg)
I was able to reproduce the problem
The crash is caused by an issue where we put the wrong object in the StackFrameImpl::frameModule
field
J9Module *module = ramClass->module;
if (NULL != module) {
J9VMJAVALANGSTACKWALKERSTACKFRAMEIMPL_SET_FRAMEMODULE(vmThread, frame, module->moduleObject);
}
In this case the j9module contains the wrong module object. When I run the test with -Xgcpolicy:nogc
we do not crash. My assumption is the the module is being collected while we are performing the stackwalk
We have a difference in the original reflection implementation which means we can not re-enable all the tests. This difference exists as far back as JDK11. However, the segfaults have been fixed.
The tests have been re-included
Removed the test excluded label and added perm excluded for the remaining tests that won't be fixed.
@tajila this can be closed now?
Yes we can close it
OpenJDK Test
Errors
Related: #13946