RFR: 8361912: ThreadsListHandle::cv_internal_thread_to_JavaThread does not deal with a virtual thread's carrier thread [v2]
Serguei Spitsyn
sspitsyn at openjdk.org
Fri Jul 25 06:24:55 UTC 2025
On Thu, 24 Jul 2025 20:35:25 GMT, David Holmes <dholmes at openjdk.org> wrote:
>>> Note that java_thread may already be null so we don't get to execute line 836.
>>
>> Right. I guess, this answers my comment about the line 839.
>
> Once in the handshake the carrier (and thus virtual thread) is "frozen" with regards to any transition. It could be anywhere in the process of mounting/unmounting (depending of course exactly where the carrier might respond to the handshake request), and the actual handshake operation has to deal with that. But that is true no matter how you extracted a reference to the carrier. As I said before the only thing this change guarantees is that the carrier is protected by the TLH and can't fully terminate whilst handshaking with it.
Okay, thanks.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26287#discussion_r2230252813
More information about the hotspot-dev
mailing list