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

ResourceScope code does not handle close vs. add races well

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: repo-panama
    • Fix Version/s: None
    • Component/s: tools

      Description

      While no test is showing sign of failures (even under extra stress), it seems like the code which manages shared resource scope lists has at least a conceptual issue: the code always performs a "compareAndExchange", using the "previous" list head as witness and the new cleanup action as the actual value. If the witness is the CLOSED_LIST singleton (which means the list is about to be cleaned up), the replacement still takes place, meaning that the head of the list can potentially go from CLOSED_LIST to something else, possibly in the middle of a cleanup.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mcimadamore Maurizio Cimadamore
              Reporter:
              mcimadamore Maurizio Cimadamore
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: