Qpid
  1. Qpid
  2. QPID-2507

C++ broker can deadlock when processing a bind.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.7
    • Component/s: C++ Broker
    • Labels:
      None
    • Environment:

      c++ broker on linux.

      Description

      Rarely happens, but I was lucky enough to catch this on the debugger.

      Broker locks due to lock inversion. Here's the flow:

      thread 1 (broker):
      1) gets bind request for the management topic exchange
      2) binds to the management topic exchange [takes topic->lock]
      3) attempts to call management agent allocId() [takes mgmt agent->userLock]

      At the same time:

      thread 4 (mgmt agent periodic timer)
      1) periodic processing [takes mgmt agent->userLock]
      2) call topicexchange::route() [takes topic->lock]

      thread one holds the topic->lock, tries to take mgmt agent->userLock
      thread four holds mgmt agent->userLock, tries to take topic->lock

      deadlock.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Ken Giusti
            Reporter:
            Ken Giusti
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development