Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-2728

AbstractCacheTransaction.hasLockOrIsLockBackup may cause NPE

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 5.2.0.CR2
    • 5.2.0.CR1
    • Transactions
    • None

    Description

      AbstractCacheTransaction.hasLockOrIsLockBackup can be called from non-synchronized context (particularly from the AbstractTxLockingInterceptor when iterating through all transactions from older topology). If the transaction is committed in parallel, AbstractCacheTransaction.clearLockedKeys is called which nulls the volatile field lockedKeys.

      lockedKeys != null && lockedKeys.contains(key)
      

      Contains a race condition - lockedKey may be nulled between the checks.
      Similar with backupKeyLocks but these are never nulled.

      Attachments

        Activity

          People

            mircea.markus Mircea Markus (Inactive)
            rvansa1@redhat.com Radim Vansa (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: