Uploaded image for project: 'JBoss Cache'
  1. JBoss Cache
  2. JBCACHE-1620

Race condition when automatically creating parent nodes during locking fails to get lock

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.2.9.GA
    • Fix Version/s: None
    • Component/s: Locking
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      See README in attached JBCACHE-1620-test.zip.

      Show
      See README in attached JBCACHE-1620 -test.zip.
    • Affects:
      Release Notes

      Description

      Bug/race condition in PessimisticUnversionedNode#addChildAndAcquireLock.
      If two threads try to create the same node at the exact same time, one thread creates it and gets a write lock.
      The other thread does not create a node, but returns the previously created node and does not lock it.

      The only caller PessimisticNodeBasedLockManager assumes the node was both created and locked after the call returns.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  dereed Dennis Reed
                  Reporter:
                  dereed Dennis Reed
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: