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

JDK21 serviceability_jvmti_j9_0_FAILED serviceability/jvmti/vthread/GetThreadState/GetThreadStateTest.java#default java timed out #18642

Closed
JasonFengJ9 opened this issue Dec 18, 2023 · 2 comments

Comments

@JasonFengJ9
Copy link
Member

JasonFengJ9 commented Dec 18, 2023

Failure link

From an internal build(paix906):

openjdk version "21.0.1" 2023-10-17 LTS
IBM Semeru Runtime Open Edition 21.0.2.0-m2 (build 21.0.1+12-LTS)
Eclipse OpenJ9 VM 21.0.2.0-m2 (build v0.43.0-release-54becab46, JRE 21 AIX ppc64-64-Bit Compressed References 20231017_57 (JIT enabled, AOT enabled)
OpenJ9   - 54becab46
OMR      - d810fcb98
JCL      - 10a4ed68a77 based on jdk-21.0.1+12)

Rerun in Grinder - Change TARGET to run only the failed test targets.

Optional info

Failure output (captured from console output)

[2023-12-15T22:04:33.880Z] variation: Mode150
[2023-12-15T22:04:33.880Z] JVM_OPTIONS:  -XX:+UseCompressedOops -Xverbosegclog 

[2023-12-15T22:42:14.159Z] TEST: serviceability/jvmti/vthread/GetThreadState/GetThreadStateTest.java#default

[2023-12-15T22:42:14.161Z] TEST RESULT: Error. Program `/home/jenkins/workspace/Test_openjdk21_j9_extended.openjdk_ppc64_aix/jdkbinary/j2sdk-image/bin/java' timed out (timeout set to 960000ms, elapsed time including timeout handling was 1702133ms).
[2023-12-15T22:42:14.161Z] --------------------------------------------------
[2023-12-15T22:46:15.338Z] Test results: passed: 155; failed: 2; error: 1
[2023-12-15T22:46:15.338Z] Report written to /home/jenkins/workspace/Test_openjdk21_j9_extended.openjdk_ppc64_aix/jvmtest/openjdk/report/html/report.html
[2023-12-15T22:46:15.338Z] Results written to /home/jenkins/workspace/Test_openjdk21_j9_extended.openjdk_ppc64_aix/aqa-tests/TKG/output_17026778268558/serviceability_jvmti_j9_0/work
[2023-12-15T22:46:15.338Z] Error: Some tests failed or other problems occurred.
[2023-12-15T22:46:15.338Z] -----------------------------------
[2023-12-15T22:46:15.338Z] serviceability_jvmti_j9_0_FAILED

ppc64_aix serviceability_jvmti_j9 50x internal grinder

JDK21 aarch64_linux

[2023-12-15T20:37:00.156Z] TEST: serviceability/jvmti/vthread/GetThreadState/GetThreadStateTest.java#no-vmcontinuations

[2023-12-15T20:37:00.159Z] TEST RESULT: Error. Program `/home/jenkins/workspace/Test_openjdk21_j9_extended.openjdk_aarch64_linux/jdkbinary/j2sdk-image/bin/java' timed out (timeout set to 960000ms, elapsed time including timeout handling was 1704769ms).
[2023-12-15T20:37:00.159Z] --------------------------------------------------
[2023-12-15T20:37:00.159Z] Test results: passed: 155; failed: 2; error: 1
[2023-12-15T20:37:00.159Z] Report written to /home/jenkins/workspace/Test_openjdk21_j9_extended.openjdk_aarch64_linux/jvmtest/openjdk/report/html/report.html
[2023-12-15T20:37:00.159Z] Results written to /home/jenkins/workspace/Test_openjdk21_j9_extended.openjdk_aarch64_linux/aqa-tests/TKG/output_17026702831890/serviceability_jvmti_j9_1/work
[2023-12-15T20:37:00.159Z] Error: Some tests failed or other problems occurred.
[2023-12-15T20:37:00.159Z] -----------------------------------
[2023-12-15T20:37:00.159Z] serviceability_jvmti_j9_1_FAILED

aarch64_linux serviceability_jvmti_j9 50x internal grinder - 12/50 failed

@pshipton pshipton added this to the Java 21 (0.42) milestone Dec 18, 2023
@pshipton
Copy link
Member

@babsingh pls take a look

@babsingh
Copy link
Contributor

babsingh commented Dec 20, 2023

babsingh added a commit to babsingh/openj9 that referenced this issue Dec 20, 2023
VirtualThreads.park performs operations in the below order:
Set VThreadInspector to -1 and then acquire vmThreadListMutex

JVMTI GetThreadState -> ... -> getVMThread follows the below order:
Acquire vmThreadListMutex and then spin until VThreadInspector != -1

A deadlock occurs because the order of operations is inconsistent
between VirtualThreads.park and JVMTI GetThreadState.

To resolve the deadlock, the operations in getVMThread are swapped
to match the operations in VirtualThreads.park:
Acquire VThreadInspector and then acquire vmThreadListMutex

Related: eclipse-openj9#18642

Signed-off-by: Babneet Singh <[email protected]>
babsingh added a commit to babsingh/openj9 that referenced this issue Dec 20, 2023
RI and JTReg tests expect the same JVMTI thread state for
- PARKED and PINNED
- TIMED_PARKED and TIMED_PINNED

Related: eclipse-openj9#18642

Signed-off-by: Babneet Singh <[email protected]>
babsingh added a commit to babsingh/openj9 that referenced this issue Dec 20, 2023
VirtualThreads.park performs operations in the below order:
Set VThreadInspector to -1 and then acquire vmThreadListMutex

JVMTI GetThreadState -> ... -> getVMThread follows the below order:
Acquire vmThreadListMutex and then spin until VThreadInspector != -1

A deadlock occurs because the order of operations is inconsistent
between VirtualThreads.park and JVMTI GetThreadState.

To resolve the deadlock, the operations in getVMThread are swapped
to match the operations in VirtualThreads.park:
Acquire VThreadInspector and then acquire vmThreadListMutex

Related: eclipse-openj9#18642

Signed-off-by: Babneet Singh <[email protected]>
babsingh added a commit to babsingh/openj9 that referenced this issue Dec 20, 2023
RI and JTReg tests expect the same JVMTI thread state for
- PARKED and PINNED
- TIMED_PARKED and TIMED_PINNED

Related: eclipse-openj9#18642

Signed-off-by: Babneet Singh <[email protected]>
babsingh added a commit to babsingh/openj9 that referenced this issue Dec 20, 2023
VirtualThreads.park performs operations in the below order:
Set VThreadInspector to -1 and then acquire vmThreadListMutex

JVMTI GetThreadState -> ... -> getVMThread follows the below order:
Acquire vmThreadListMutex and then spin until VThreadInspector != -1

A deadlock occurs because the order of operations is inconsistent
between VirtualThreads.park and JVMTI GetThreadState.

To resolve the deadlock, the operations in getVMThread are swapped
to match the operations in VirtualThreads.park:
Acquire VThreadInspector and then acquire vmThreadListMutex

Related: eclipse-openj9#18642

Signed-off-by: Babneet Singh <[email protected]>
babsingh added a commit to babsingh/openj9 that referenced this issue Dec 20, 2023
RI and JTReg tests expect the same JVMTI thread state for
- PARKED and PINNED
- TIMED_PARKED and TIMED_PINNED

Related: eclipse-openj9#18642

Signed-off-by: Babneet Singh <[email protected]>
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

3 participants