openj9
openj9 copied to clipboard
Failing jtreg:test/hotspot/jtreg/serviceability/jvmti/GetLocalVariable
The failing test is available for JDK17 and JDK19:
- JDK17: https://github.com/ibmruntimes/openj9-openjdk-jdk17/blob/openj9/test/hotspot/jtreg/serviceability/jvmti/GetLocalVariable/GetLocalVars.java
- JDK19: https://github.com/ibmruntimes/openj9-openjdk-jdk19/blob/openj9/test/hotspot/jtreg/serviceability/jvmti/GetLocalVariable/GetLocalVars.java
Failure found in https://github.com/eclipse-openj9/openj9/pull/15857
Command to run the test:
make test TEST="jtreg:test/hotspot/jtreg/serviceability/jvmti/GetLocalVariable/GetLocalVars.java" JTREG="JAVA_OPTIONS=-Xgcpolicy:nogc -Xint"
Version info:
openjdk version "17.0.5-internal" 2022-10-18
OpenJDK Runtime Environment (build 17.0.5-internal+0-adhoc.root.openj9-openjdk-jdk17)
Eclipse OpenJ9 VM (build master-31686b82a, JRE 17 Linux amd64-64-Bit Compressed References 20220920_000000 (JIT enabled, AOT enabled)
OpenJ9 - 31686b82a
OMR - b1be89cf5
JCL - d1d66770f25 based on jdk-17.0.5+5)
openjdk version "19-internal" 2022-09-20
OpenJDK Runtime Environment (build 19-internal-adhoc..openj9-openjdk-jdk19)
Eclipse OpenJ9 VM (build master-96fd6f9fa, JRE 19 Linux amd64-64-Bit Compressed References 20220919_000000 (JIT enabled, AOT enabled)
OpenJ9 - ff2bf47e5
OMR - decd4ea8c
JCL - d7a125aae56 based on jdk-19+36)
Console output:
STDOUT:
test_local_byte: BEGIN
GetLocalInt: JVMTI error (0)
GetLocalInt got value from a local byte as expected
GetLocalLong: JVMTI error (0)
FAIL: GetLocalLong failed to return JVMTI_ERROR_INVALID_SLOT for local byte
GetLocalFloat: JVMTI error (0)
GetLocalFloat got value from a local byte as expected
GetLocalDouble: JVMTI error (0)
FAIL: GetLocalDouble failed to return JVMTI_ERROR_INVALID_SLOT for local byte
GetLocalObject: JVMTI error (0)
FAIL: GetLocalObject failed to return JVMTI_ERROR_TYPE_MISMATCH for local byte
test_local_byte: END
test_local_object: BEGIN
GetLocalInt: JVMTI error (0)
FAIL: GetLocalInt failed to return JVMTI_ERROR_TYPE_MISMATCH for local object
GetLocalLong: JVMTI error (0)
FAIL: GetLocalLong failed to return JVMTI_ERROR_TYPE_MISMATCH for local object
GetLocalFloat: JVMTI error (0)
FAIL: GetLocalFloat failed to return JVMTI_ERROR_TYPE_MISMATCH for local object
GetLocalDouble: JVMTI error (0)
FAIL: GetLocalDouble failed to return JVMTI_ERROR_TYPE_MISMATCH for local object
GetLocalObject: JVMTI error (0)
GetLocalObject got value from a local object as expected
test_local_object: END
test_local_double: BEGIN
GetLocalInt: JVMTI error (0)
GetLocalInt got value from a local double as expected
GetLocalLong: JVMTI error (0)
GetLocalLong got value from a local double as expected
GetLocalFloat: JVMTI error (0)
GetLocalFloat got value from a local double as expected
GetLocalDouble: JVMTI error (0)
GetLocalDouble got value from a local double as expected
GetLocalObject: JVMTI error (0)
FAIL: GetLocalObject failed to return JVMTI_ERROR_TYPE_MISMATCH for local double
test_local_double: END
test_local_integer: BEGIN
GetLocalInt: JVMTI error (0)
GetLocalInt got value from a local int as expected
GetLocalFloat: JVMTI error (0)
GetLocalFloat got value from a local int as expected
GetLocalObject: JVMTI error (0)
FAIL: GetLocalObject failed to return JVMTI_ERROR_TYPE_MISMATCH for local double
test_local_integer: END
test_local_invalid: BEGIN
GetLocalInt: JVMTI error (0)
FAIL: GetLocalInt failed to return JVMTI_ERROR_INVALID_SLOT for local invalid
GetLocalLong: JVMTI error (35)
GetLocalLong returned JVMTI_ERROR_INVALID_SLOT for local invalid as expected
GetLocalFloat: JVMTI error (0)
FAIL: GetLocalFloat failed to return JVMTI_ERROR_INVALID_SLOT for local invalid
GetLocalDouble: JVMTI error (35)
GetLocalDouble returned JVMTI_ERROR_INVALID_SLOT for local invalid as expected
test_local_invalid: END
STDERR:
java.lang.RuntimeException: Test GetLocalVars failed with a bad status: 2
at GetLocalVars.main(GetLocalVars.java:52)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125)
at java.base/java.lang.Thread.run(Thread.java:1573)
JavaTest Message: Test threw exception: java.lang.RuntimeException: Test GetLocalVars failed with a bad status: 2
JavaTest Message: shutting down test
STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Test GetLocalVars failed with a bad status: 2
You can provide the -version output of the JVM being used.
You can provide the -version output of the JVM being used.
Added but this should also fail on other versions.
Added but this should also fail on other versions.
If I understand correctly, we're currently only building the serviceability test native code for jdk19 so I'll keep the current tagging. Unless you think this is a regression from previous releases affecting other versions.
The failing test also exists in JDK17: https://github.com/ibmruntimes/openj9-openjdk-jdk17/blob/openj9/test/hotspot/jtreg/serviceability/jvmti/GetLocalVariable/GetLocalVars.java. I didn't find it in JDK8 and JDK11.
Using pre-built native test libraries, the test can also be run with JDK17. It fails with the same errors. The OpenJ9 source code being tested has not been modified since 2018. This failure affects other versions. The affects may be seen as far as JDK8.
test_local_byte: BEGIN
GetLocalInt: JVMTI error (0)
GetLocalInt got value from a local byte as expected
GetLocalLong: JVMTI error (0)
FAIL: GetLocalLong failed to return JVMTI_ERROR_INVALID_SLOT for local byte
GetLocalFloat: JVMTI error (0)
GetLocalFloat got value from a local byte as expected
GetLocalDouble: JVMTI error (0)
FAIL: GetLocalDouble failed to return JVMTI_ERROR_INVALID_SLOT for local byte
GetLocalObject: JVMTI error (0)
FAIL: GetLocalObject failed to return JVMTI_ERROR_TYPE_MISMATCH for local byte
test_local_byte: END
test_local_object: BEGIN
GetLocalInt: JVMTI error (0)
FAIL: GetLocalInt failed to return JVMTI_ERROR_TYPE_MISMATCH for local object
GetLocalLong: JVMTI error (0)
FAIL: GetLocalLong failed to return JVMTI_ERROR_TYPE_MISMATCH for local object
GetLocalFloat: JVMTI error (0)
FAIL: GetLocalFloat failed to return JVMTI_ERROR_TYPE_MISMATCH for local object
GetLocalDouble: JVMTI error (0)
FAIL: GetLocalDouble failed to return JVMTI_ERROR_TYPE_MISMATCH for local object
GetLocalObject: JVMTI error (0)
GetLocalObject got value from a local object as expected
test_local_object: END
test_local_double: BEGIN
GetLocalInt: JVMTI error (0)
GetLocalInt got value from a local double as expected
GetLocalLong: JVMTI error (0)
GetLocalLong got value from a local double as expected
GetLocalFloat: JVMTI error (0)
GetLocalFloat got value from a local double as expected
GetLocalDouble: JVMTI error (0)
GetLocalDouble got value from a local double as expected
GetLocalObject: JVMTI error (0)
FAIL: GetLocalObject failed to return JVMTI_ERROR_TYPE_MISMATCH for local double
test_local_double: END
test_local_integer: BEGIN
GetLocalInt: JVMTI error (0)
GetLocalInt got value from a local int as expected
GetLocalFloat: JVMTI error (0)
GetLocalFloat got value from a local int as expected
GetLocalObject: JVMTI error (0)
FAIL: GetLocalObject failed to return JVMTI_ERROR_TYPE_MISMATCH for local double
test_local_integer: END
test_local_invalid: BEGIN
GetLocalInt: JVMTI error (0)
FAIL: GetLocalInt failed to return JVMTI_ERROR_INVALID_SLOT for local invalid
GetLocalLong: JVMTI error (35)
GetLocalLong returned JVMTI_ERROR_INVALID_SLOT for local invalid as expected
GetLocalFloat: JVMTI error (0)
FAIL: GetLocalFloat failed to return JVMTI_ERROR_INVALID_SLOT for local invalid
GetLocalDouble: JVMTI error (35)
GetLocalDouble returned JVMTI_ERROR_INVALID_SLOT for local invalid as expected
test_local_invalid: END
STDERR:
java.lang.RuntimeException: Test GetLocalVars failed with a bad status: 2
at GetLocalVars.main(GetLocalVars.java:52)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
at java.base/java.lang.Thread.run(Thread.java:857)
Similar failure seen in jtreg/serviceability/jvmti/vthread/VThreadTest/libVThreadTest.cpp#L416-L421.
Test:
Test JVMTI GetLocalObject function with unaligned slot 3
Error:
JVMTI GetLocalObject with unaligned slot 3 failed, return JVMTI_ERROR_INVALID_SLOT or JVMTI_ERROR_TYPE_MISMATCH
~Now, this failure is also seen in a certification test. So, it will need to be fixed for Java 21.~
I misinterpreted the behaviour highlighted in https://github.com/eclipse-openj9/openj9/pull/17938 with the failure reported in this issue; apparently both are different; this issue does not need to be resolved for Java 21; thus, moving this issue back to backlog
.