Uploaded image for project: 'ActiveMQ'
  1. ActiveMQ
  2. AMQ-6370

JDBC message store - jdbc connection pool - potential deadlock with cleanup task when pool exhausted

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.13.0
    • Fix Version/s: 5.14.0
    • Component/s: JDBC, Message Store, XA
    • Labels:
      None

      Description

      There is an read/write lock guarding the cleanup task and other jdbc ops in the jdbc message store.
      Typically the read lock is obtained before the connection from the jdbc connection pool.
      In the case of xa transactions, the connection is obtained before the read lock, in transactioncontext.begin, leaving a window between which readlock holders can be blocked pending the connection release.
      If there is a cleanup (and write lock) request before release, the xa transaction cannot obtain a read lock and we are stuck.
      Disabling the cleanup task avoids this issue, but that is only an option if there are no durable subs or if the durable sub cleanup task can be tackled through db admin.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gtully Gary Tully
                Reporter:
                gtully Gary Tully
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: