Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-7679

Memory leak in DirectExchange

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Resolved
    • qpid-cpp-0.34, qpid-cpp-1.36.0
    • qpid-cpp-1.37.0
    • C++ Broker
    • None

    Description

      The Exchange::unbind call for DirectExchange is coded assuming that the binding actually exists. If the binding does not exist, this has the side effect of creating a Bindingkey in the BindingKey map that remains in the map until broker exit. The management count of bindings is not updated so there is no indication there of the problem.

      A well behaved 0_10 program that creates a queue, creates a direct binding, deletes the binding and then deletes the queue results in a second implicit unbind when the queue is deleted (usually on the QueueDeleteBody, but if an autodelete queue, it can also happen on the MessageCancelBody ending a subscription).

      TopicExchange and FanOutExchange explicitly guard against non-existence of the binding/queue pair on unbind(). Presumably, DirectExchange should do the same. HeadersExchange doesn't check but doesn't "remember" the pair.

      Attachments

        1. unbind.cpp
          2 kB
          Clifford Jansen
        2. Q7679_0.diff
          1 kB
          Clifford Jansen

        Activity

          People

            cliffjansen Clifford Jansen
            cliffjansen Clifford Jansen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: