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

Memory leak in DirectExchange bind/unbind

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 0.8, 0.12
    • None
    • C++ Broker
    • None
    • RHEL4.7 and RHEL6.2

    Description

      One of our customers observed that the Qpid daemon's memory footprint increased over a number of weeks. We were able to reproduce this in-house, and noticed that the increase was correlated with queu creation/deletion (our application, when under load, creates & destroys a large number of queues).

      This memory leak wasn't discoverable with valgrind (i.e., memcheck), since it's not the result of lost pointers, but massif was very useful. It appears that entries in the std::map Bindings (DirectExchange.h:41) created on DirectExchange.cpp:71 (during creation of, in our case, the default binding) are never deleted when the queue and binding are deleted on DirectExchange.cpp:~138.

      While individual map entries aren't that expensive, over several thousand queue creations and deletions, the memory consumed does grow to be substantial.

      If I explicitly delete the map entry, memory usage appears to remain stable over time.

      While I doubt that my fix will be best way to resolve this issue, I'll attach my patch anyway, in the case that it helps in understanding the issue.

      Thanks!

      Attachments

        1. QPID-3752.patch
          1 kB
          Rob Springer

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rspringer Rob Springer
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: