JDK-8303967 : Release Note: Obsolete Legacy HotSpot Parallel Class Loading Workaround Option `-XX:+EnableWaitForParallelLoad` Is Removed
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 21
  • Priority: P4
  • Status: Resolved
  • Resolution: Delivered
  • Submitted: 2023-03-10
  • Updated: 2023-09-01
  • Resolved: 2023-03-17
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 21
21Resolved
Related Reports
Relates :  
Description
Some older, user-defined class loaders would workaround a deadlock issue by releasing the class loader lock during the loading process. To prevent these loaders from encountering a `java.lang.LinkageError: attempted duplicate class definition` while loading the same class by parallel threads, the HotSpot Virtual Machine introduced a workaround in JDK 6 that serialized the load attempts, causing the subsequent attempts to wait for the first to complete.

The need for class loaders to work this way was removed in JDK 7 when parallel-capable class loaders were introduced, but the workaround remained in the VM. The workaround was deprecated in JDK 20 and the option `-XX:+EnableWaitForParallelLoad` was introduced for users who relied on this legacy behavior.  The default for this option was off.

In JDK 21, the option `-XX:+EnableWaitForParallelLoad`, and the code to support it, has been removed.

See CSR JDK-8304056 for more details.
Comments
Looks fine. Thanks.
13-03-2023