RFR: 8361912: ThreadsListHandle::cv_internal_thread_to_JavaThread does not deal with a virtual thread's carrier thread [v2]

Daniel D. Daugherty dcubed at openjdk.org
Fri Jul 25 18:08:59 UTC 2025


On Fri, 25 Jul 2025 07:05:55 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Okay, thanks.
>
> Once this change is in main line then we can sync'up the loom repo and work on the follow-up changes. The loom repo has changes (that are not in main line) for "suspending" an unmounted thread. For the mounted case then we'll need checks in the handshake to ensure that the expected virtual threads is mounted. We'll need stress tests of course and we can collaborate there in advance of proposing changes for main line.

> Note that java_thread may already be null so we don't get to execute line 836.

I'm having some trouble with this statement. Working backwards from L836, I see
the nullptr check on L826 and the check for non-virtual thread and bail on L827
and L831. However, if we saw nullptr on L826 and we have a virtual thread, then
we can get to L836 even when we started off with a null java_thread.

So I guess I'm not sure what point you're trying to make with the statement.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/26287#discussion_r2231702449


More information about the hotspot-dev mailing list