-
Notifications
You must be signed in to change notification settings - Fork 727
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/vthread/ThreadListStackTracesTest/ThreadListStackTracesTest.java RuntimeException: JVMTI multi thread state is wrong #18089
Comments
Locally, I was able to reproduce the failure 1 time in 250 runs. The default test output is insufficient to properly triage. The test will need to be updated to print/output more debug information. @thallium Shall I assign this issue to you? |
@babsingh Sure I can take a look at this. |
A few things that I have observed:
|
@thallium Documenting my Slack notes (from 25 Sep 23) here since they highlight the next steps for the issue. Can you provide me a progress update, what will be your next steps and a time estimate to resolve this issue? Test source code
The above two checks fail intermittently.
|
Current update: |
openj9/runtime/jvmti/jvmtiHelpers.c Lines 821 to 826 in da4cabf
openj9/runtime/jvmti/jvmtiHelpers.c Lines 841 to 852 in da4cabf
Add debug code (print statements) in |
Moving to the 0.44 release since the failure is highly intermittent. |
During failure, the test output is ...
When the test passes, the test output is ...
The problem is in the TEST. Test code, ThreadListStackTracesTest.checkStates:
Test code, ReentrantLockTestTask.run represents the virtual thread:
Test code, ThreadListStackTracesTest.checkReentrantLock:
The below changes to the test code should resolve the reported failure:
Refer to the Javadoc for ReentrantLock to understand the @singh264 Can you verify the above analysis? If you agree, can you create PRs that modify the test in the JDK21 and JDK-next repos?
|
JDK21 x86-64_mac(
|
@babsingh I will verify the analysis. |
It seems like the virtual thread scheduler does not unmount and park the virtual thread when the state of the thread changes from Before Since the After the |
Adjust ThreadListStackTracesTest for checkReentrantLock to be ready when the virtual thread state is Thread.State.WAITING after the reentrant lock parks the virutal thread. When the virtual thread is mounted, the virtual thread state, which is obtained from the carrier thread, can transition between Thread.State.WAITING and Thread.State.RUNNABLE before the reentrant lock parks the virtual thread. Issue: eclipse-openj9/openj9#18089 Signed-off-by: Amarpreet Singh <[email protected]>
Adjust ThreadListStackTracesTest for checkReentrantLock to be ready when the virtual thread state is Thread.State.WAITING after the reentrant lock parks the virutal thread. When the virtual thread is mounted, the virtual thread state, which is obtained from the carrier thread, can transition between Thread.State.WAITING and Thread.State.RUNNABLE before the reentrant lock parks the virtual thread. Issue: eclipse-openj9/openj9#18089 Signed-off-by: Amarpreet Singh <[email protected]>
Adjust ThreadListStackTracesTest for checkReentrantLock to be ready when the virtual thread state is Thread.State.WAITING after the reentrant lock parks the virtual thread. When the virtual thread is mounted, the virtual thread state, which is obtained from the carrier thread, can transition between Thread.State.WAITING and Thread.State.RUNNABLE before the reentrant lock parks the virtual thread. Issue: eclipse-openj9/openj9#18089 Signed-off-by: Amarpreet Singh <[email protected]>
Adjust ThreadListStackTracesTest for checkReentrantLock to be ready when the virtual thread state is Thread.State.WAITING after the reentrant lock parks the virtual thread. When the virtual thread is mounted, the virtual thread state, which is obtained from the carrier thread, can transition between Thread.State.WAITING and Thread.State.RUNNABLE before the reentrant lock parks the virtual thread. Issue: eclipse-openj9/openj9#18089 Signed-off-by: Amarpreet Singh <[email protected]>
@babsingh the PRs that modify the test in the JDK21 and JDK-next repos are at ibmruntimes/openj9-openjdk-jdk21#63 and ibmruntimes/openj9-openjdk-jdk#693. I adjusted the test, which passed 2500 times locally, by including |
Adjust ThreadListStackTracesTest for checkReentrantLock to be ready when the virtual thread state is WAITING after the reentrant lock parks the virtual thread. When the virtual thread is mounted, the virtual thread state, which is obtained from the carrier thread, can transition between WAITING and RUNNABLE before the reentrant lock parks the virtual thread. Issue: eclipse-openj9/openj9#18089 Signed-off-by: Amarpreet Singh <[email protected]>
Adjust ThreadListStackTracesTest for checkReentrantLock to be ready when the virtual thread state is WAITING after the reentrant lock parks the virtual thread. When the virtual thread is mounted, the virtual thread state, which is obtained from the carrier thread, can transition between WAITING and RUNNABLE before the reentrant lock parks the virtual thread. Issue: eclipse-openj9/openj9#18089 Signed-off-by: Amarpreet Singh <[email protected]>
Adjust ThreadListStackTracesTest for checkReentrantLock to be ready when the virtual thread state is WAITING after the reentrant lock parks the virtual thread. When the virtual thread is mounted, the virtual thread state, which is obtained from the carrier thread, can transition between WAITING and RUNNABLE before the virtual thread is parked on the lock. Issue: eclipse-openj9/openj9#18089 Signed-off-by: Amarpreet Singh <[email protected]>
Adjust ThreadListStackTracesTest for checkReentrantLock to be ready when the virtual thread state is WAITING after the reentrant lock parks the virtual thread. When the virtual thread is mounted, the virtual thread state, which is obtained from the carrier thread, can transition between WAITING and RUNNABLE before the virtual thread is parked on the lock. Issue: eclipse-openj9/openj9#18089 Signed-off-by: Amarpreet Singh <[email protected]>
Adjust ThreadListStackTracesTest for checkReentrantLock to be ready when the virtual thread state is WAITING after the reentrant lock parks the virtual thread. When the virtual thread is mounted, the virtual thread state, which is obtained from the carrier thread, can transition between WAITING and RUNNABLE before the virtual thread is parked on the lock. Issue: eclipse-openj9/openj9#18089 Signed-off-by: Amarpreet Singh <[email protected]>
Adjust ThreadListStackTracesTest for checkReentrantLock to be ready when the virtual thread state is WAITING after the reentrant lock parks the virtual thread. When the virtual thread is mounted, the virtual thread state, which is obtained from the carrier thread, can transition between WAITING and RUNNABLE before the virtual thread is parked on the lock. Issue: eclipse-openj9/openj9#18089 Signed-off-by: Amarpreet Singh <[email protected]>
Failure link
From an internal build(
osxrt1
):Rerun in Grinder - Change TARGET to run only the failed test targets.
Optional info
Failure output (captured from console output)
50x serviceability_jvmti_j9_0 internal grinder - this failure wasn't reproduced
FYI @babsingh
The text was updated successfully, but these errors were encountered: