-
Notifications
You must be signed in to change notification settings - Fork 722
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
JVMTI SuspendResume1 test fails with invalid thread state #16690
Comments
Duplicate of #15939. @fengxue-IS Can you point us to the PR which contains the fix for this issue? |
see #16374 |
@dipak-bagadiya Can you check if changes from #16374 are included in your local workspace? If not, fetch these changes and verify if the reported failure is fixed. |
@fengxue-IS @babsingh
The aforementioned problem/error doesn't occur all the time. |
What's the next step with this issue? (and who should own it?) |
VM team owns it. Updated issue's description and labels (fyi @dipak-bagadiya). The |
JVMTI GetThreadState returns 0 (invalid state) for carrier threads when a virtual thread is mounted over them. 0 indicates that the thread has not started but this state is invalid for the carrier threads when they have a virtual thread mounted. Helper function getThreadState should not be given virtual thread objects. It should only receive platform thread objects. Instead of targetThread->threadObject which can be a virtual thread object, it is given targetThread->carrierThreadObject to correctly evaluate the state of carrier threads. This change should also be compatible with all platform threads since carrierThreadObject is set only once during thread creation, and it stays the same until thread termination. Related: eclipse-openj9#16690 Signed-off-by: Dipak Bagadiya <dipak.bagadiya@ibm.com>
Fixed by #16805. Will close this issue after the fix is delivered to the v0.37.0-release branch. |
JVMTI GetThreadState returns 0 (invalid state) for carrier threads when a virtual thread is mounted over them. 0 indicates that the thread has not started but this state is invalid for the carrier threads when they have a virtual thread mounted. Helper function getThreadState should not be given virtual thread objects. It should only receive platform thread objects. Instead of targetThread->threadObject which can be a virtual thread object, it is given targetThread->carrierThreadObject to correctly evaluate the state of carrier threads. This change should also be compatible with all platform threads since carrierThreadObject is set only once during thread creation, and it stays the same until thread termination. Related: eclipse-openj9#16690 Signed-off-by: Dipak Bagadiya <dipak.bagadiya@ibm.com>
Closing. Fix backported to the 0.37 release branch: #16843. |
Issue
JVMTI
GetThreadState
returns 0 (invalid state) for the carrier thread when a virtual thread is mounted. 0 refers to a thread which has not started but this state is invalid for the carrier thread. InjvmtiHelpers.c::getThreadState
,getVMThreadObjectStatesAll
returnsJ9VMTHREAD_STATE_UNKNOWN
for the carrier thread. This will require further investigation.JVMTI Spec
GetThreadState: https://download.java.net/java/early_access/jdk19/docs/specs/jvmti.html#GetThreadState
Test CMD
Test Output
The text was updated successfully, but these errors were encountered: