-
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
Fix GetThreadState to return correct state for carrier thread #16805
Fix GetThreadState to return correct state for carrier thread #16805
Conversation
fb47bda
to
0078a57
Compare
@babsingh requesting you to please review |
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>
0078a57
to
8134e18
Compare
jenkins test sanity alinux64 jdk19 |
jenkins test sanity xlinux jdk8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dipak-bagadiya has verified locally that #16690 is fixed with this PR. #16690 will be closed after the test is re-enabled.
Test had been fixed by eclipse-openj9/openj9#16805 Signed-off-by: Dipak Bagadiya dipak.bagadiya@ibm.com
The test has been fixed by eclipse-openj9/openj9#16805. Signed-off-by: Dipak Bagadiya dipak.bagadiya@ibm.com
The test has been fixed by eclipse-openj9/openj9#16805. Signed-off-by: Dipak Bagadiya dipak.bagadiya@ibm.com Signed-off-by: Dipak Bagadiya dipak.bagadiya@ibm.com
@dipak-bagadiya This fix is needed for the JDK19 release. Can you create a PR to deliver this fix in the 0.37 release branch: https://github.com/eclipse-openj9/openj9/tree/v0.37.0-release? |
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: #16690
Signed-off-by: Dipak Bagadiya dipak.bagadiya@ibm.com