Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing jtreg:test/hotspot/jtreg/serviceability/jvmti/GetLocalVariable #15920

Open
thallium opened this issue Sep 19, 2022 · 6 comments
Open

Comments

@thallium
Copy link
Contributor

thallium commented Sep 19, 2022

The failing test is available for JDK17 and JDK19:

Failure found in #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
@pshipton pshipton added the jdk19 label Sep 19, 2022
@pshipton pshipton added this to the Java 19 milestone Sep 19, 2022
@pshipton
Copy link
Member

You can provide the -version output of the JVM being used.

@thallium
Copy link
Contributor Author

You can provide the -version output of the JVM being used.

Added but this should also fail on other versions.

@pshipton
Copy link
Member

pshipton commented Sep 19, 2022

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.

@babsingh
Copy link
Contributor

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)

@dipak-bagadiya
Copy link
Contributor

dipak-bagadiya commented Jan 12, 2023

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

babsingh added a commit to babsingh/aqa-tests that referenced this issue May 2, 2023
- NotSuspended/GetStackTraceNotSuspendedStressTest has been fixed.
- SuspendThread/suspendthrd03 has been removed in JDK20.
- Now, VThreadTest fails because of eclipse-openj9/openj9#15920.

Related:
- eclipse-openj9/openj9#16688
- eclipse-openj9/openj9#16242
- eclipse-openj9/openj9#17307

Depends on eclipse-openj9/openj9#17318

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/aqa-tests that referenced this issue May 2, 2023
- NotSuspended/GetStackTraceNotSuspendedStressTest has been fixed.
- SuspendThread/suspendthrd03 has been removed in JDK20.
- Now, VThreadTest fails because of eclipse-openj9/openj9#15920.
- eclipse-openj9/openj9#16185 and eclipse-openj9/openj9#16279 are
permanently excluded. Changed their reason to adoptium#1297 to support
the test tool, which automatically enables tests after the related
issues are closed.

Related:
- eclipse-openj9/openj9#16688
- eclipse-openj9/openj9#16242
- eclipse-openj9/openj9#17307

Depends on eclipse-openj9/openj9#17318

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
llxia added a commit to adoptium/aqa-tests that referenced this issue May 2, 2023
- NotSuspended/GetStackTraceNotSuspendedStressTest has been fixed.
- SuspendThread/suspendthrd03 has been removed in JDK20.
- Now, VThreadTest fails because of eclipse-openj9/openj9#15920.
- eclipse-openj9/openj9#16185 and eclipse-openj9/openj9#16279 are
permanently excluded. Changed their reason to #1297 to support
the test tool, which automatically enables tests after the related
issues are closed.

Related:
- eclipse-openj9/openj9#16688
- eclipse-openj9/openj9#16242
- eclipse-openj9/openj9#17307

Depends on eclipse-openj9/openj9#17318

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
Co-authored-by: Martijn Verburg <martijnverburg@gmail.com>
Co-authored-by: Lan Xia <19273206+llxia@users.noreply.github.com>
@babsingh babsingh modified the milestones: Backlog, Java 21 Jul 26, 2023
@babsingh
Copy link
Contributor

babsingh commented Jul 26, 2023

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 #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.

@babsingh babsingh modified the milestones: Java 21 (0.42), Backlog Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants