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

InterProcessSemaphoreMutex is not thread safe

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.2.1, 2.11.1
    • 3.3.0, 2.12.0
    • Recipes
    • 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

              randgalt Jordan Zimmerman
              ayanamist Yang Tianyang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: