Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-2347

JournalStorageManager::stopReplication can deadlock while stopping

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.8.1
    • 2.9.0
    • Broker
    • None

    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

        1. deadlock_stacktrace.txt
          40 kB
          Francesco Nigro

        Issue Links

          Activity

            People

              Unassigned Unassigned
              nigro.fra@gmail.com Francesco Nigro
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 20m
                  1h 20m