JDK-8371412 : Release Note: Virtual threads now unmount from carrier when waiting for another thread to execute a class initializer
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 26
  • Priority: P4
  • Status: New
  • Resolution: Unresolved
  • Submitted: 2025-11-06
  • Updated: 2025-11-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 26
26Unresolved
Description
A virtual thread that waits for another thread to execute a class initializer will now, in most cases, unmount from its carrier while waiting. Previously, the behavior was to pin the virtual thread to its carrier while waiting for the other thread to execute the class initializer.

This change may improve performance in some cases, as unmounting from the carrier releases a platform thread, allowing the JDK virtual thread scheduler to mount a different virtual thread.

The change also helps address the pathological case where all platform threads available to the JDK virtual thread scheduler are pinned by virtual threads waiting for another thread to execute a class initializer. If the thread executing the class initializer blocks or waits on something that requires a virtual thread to execute, the system could become deadlocked, as no virtual thread would be able to continue execution.