Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-2536

JournalStorageManager::stopReplication can deadlock while stopping

    XMLWordPrintable

Details

    • AMQ Broker 2019

    Description

      JournalStorageManager::stopReplication needs to:

      1. acquires the manager write lock
      2. acquires (if any) large message intrinsic locks during performCachedLargeMessageDeletes
      3. acquires the manager read lock on confirmPendingLargeMessage

      JournalStorageManager::stop needs to:

      1. acquires (if any) large message intrinsic locks during performCachedLargeMessageDeletes
      2. acquires the manager read lock on confirmPendingLargeMessage

      A racing call to JournalStorageManager::stopReplication while stopping could deadlock
      the broker:

      1. JournalStorageManager::stop acquires a large message intrinsic locks during performCachedLargeMessageDeletes
      2. JournalStorageManager::stopReplication acquires the manager write lock
      3. JournalStorageManager::stop wait is blocked on the manager write lock before releasing the lock on large message
      4. JournalStorageManager::stopReplication is blocked on the large message intrinsic lock before releasing the manager write lock
      5. deadlock occurred: none can proceed

      Attachments

        Activity

          People

            fnigro Francesco Nigro
            fnigro Francesco Nigro
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: