On Wed, 31 Dec 2025 08:08:49 GMT, Alan Bateman <[email protected]> wrote:

> A regression since we changed the VirtualThread implementation to use use FJP 
> delayed task handling (JDK-8351927) in JDK 25.
> 
> If a virtual thread does a timed-park, followed immediately by an 
> untimed-park, while racing with both an async unpark and the execution of 
> cancelled timeout-task, then it is possible for the virtual thread to get 
> stuck in the parked state. More specifically, it is possible for stars to 
> align to create the scenario where parkTimeoutExpired makes available the 
> parking permit but it doesn't continue the thread because it has moved on to 
> an untimed-park.  A small oversight that crept in when the timeout support 
> was migrated to use the new delay scheduler.
> 
> Testing: tier1-5. New stress tests added, and existing stress test 
> TimedWaitALot updated.

Looks good to me.

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

Marked as reviewed by pchilanomate (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/29011#pullrequestreview-3631767826

Reply via email to