Uploaded image for project: 'Apache Curator'
  1. Apache Curator
  2. CURATOR-376

InterProcessSemaphoreMutex is not thread safe

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.1, 2.11.1
    • Fix Version/s: 3.3.0, 2.12.0
    • Component/s: Recipes
    • Labels:
      None

      Description

      In `release` method, `lease.close()` will cause `semaphore.acquire` return, then two threads will write on same `this.lease` (one set it to `acquiredLease` while the other set it to `null`), so `acquire` method will return true and `this.lease` is still null, which can't be `release`.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                randgalt Jordan Zimmerman
                Reporter:
                ayanamist ayanamist
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: