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

ResourceScope code does not handle close vs. add races well

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • None
    • repo-panama
    • tools

      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.

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

              Created:
              Updated:
              Resolved: