Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8295673 Deprecate and disable legacy parallel class loading workaround for non-parallel-capable class loaders
  3. JDK-8296446

Release Note: Deprecate and Disable Legacy Parallel Class Loading Workaround for Non-Parallel-Capable Class Loaders

    XMLWordPrintable

Details

    • Sub-task
    • Resolution: Delivered
    • P4
    • 20
    • 20
    • hotspot

    Description

      Some user-defined, older 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. That workaround is finally being removed and as a first step has been deprecated and disabled by default. If you start seeing "java.lang.LinkageError: attempted duplicate class definition", then you may have an affected legacy class loader. The flag `-XX:+EnableWaitForParallelLoad` can be used to temporarily restore the old behavior in this release of the JDK, but the legacy class loader will need to be updated for future releases.

      See the CSR request (JDK-8295848) for more background and details.

      Attachments

        Issue Links

          Activity

            People

              coleenp Coleen Phillimore
              coleenp Coleen Phillimore
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: