Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8336384

AbstractQueuedSynchronizer.acquire should cancel acquire when failing due to a LinkageError or other errors

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 24
    • 24
    • core-libs
    • None

      As more of the Java runtime is written in the Java language, e.g. virtual threads, there is more potential for OOME, SOE, and linkage errors to arise that challenge the robustness of other areas of the system. In JDK-8334167, there is a test that instruments/wraps native methods defined by core classes that that can cause a virtual thread executing LockSupport.park to fail with a ClassCircularityError. One of the discussion points from that investigation is about AQS.acquire where the ClassCircularityError can propagate without cancelling an acquire, thus leading to a hard to diagnose hang.

      This issue tracks updating AQS.acquire (and AQLS.acquire) to cancel the acquire before propagating the underlying Error.

            vklang Viktor Klang
            alanb Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: