RFR: 8373120: Virtual thread stuck in BLOCKED state
Patricio Chilano Mateo
pchilanomate at openjdk.org
Thu Jan 22 14:55:39 UTC 2026
On Fri, 16 Jan 2026 07:05:45 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> @pchilano I took a look at this out of interest but there is nothing Hotspot related to review. The state machine for VTs is too complex for me to comment on the actual fix - though I understand how the timedWaitLock forces the calls to be serialized.
>>
>> It did make we wonder why the timed-park doesn't need any locking. Can't it have a similar problem if the virtual thread is unparked before the carrier can set the state to TIMED_PARK?
>
>> It did make we wonder why the timed-park doesn't need any locking. Can't it have a similar problem if the virtual thread is unparked before the carrier can set the state to TIMED_PARK?
>
> Parking (including timed-parking) is much simpler, and okay to be unparked during transition. We have a lot of tests for this. Timed-Object.wait is more complex due to the two block states (the equivalent of Thread.State TIMED_WAITING and BLOCKED), and timed and unblocking working asynchronously.
Thanks for the reviews and comments @AlanBateman, @dholmes-ora and @viktorklang-ora!
-------------
PR Comment: https://git.openjdk.org/jdk/pull/29255#issuecomment-3784826784
More information about the core-libs-dev
mailing list