qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Clifford Jansen (Jira)" <j...@apache.org>
Subject [jira] [Created] (QPID-8397) Memory leak in QueueBindings list
Date Mon, 06 Jan 2020 07:21:00 GMT
Clifford Jansen created QPID-8397:
-------------------------------------

             Summary: Memory leak in QueueBindings list
                 Key: QPID-8397
                 URL: https://issues.apache.org/jira/browse/QPID-8397
             Project: Qpid
          Issue Type: Bug
          Components: C++ Broker
    Affects Versions: qpid-cpp-1.40.0
            Reporter: Clifford Jansen
            Assignee: Clifford Jansen


The Queue remembers the bindings it belongs to in its QueueBindings class. There is an add()
but no corresponding remove() method. If repeated bind and unbind operations are done in succession
(between the same exchange-queue pair), duplicates pile up in the QueueBindings but not in
the exchange binding list.

The remembered QueueBindings are only ever actively used in two cases: a simple unit_test
case and on deletion of the Queue to free its resources, including bindings. Neither case
suffers from working with duplicates, aside from the memory waste while the queue is alive.
Memory is reclaimed when the queue is destroyed, so valgrind is happy.

However, some usage patterns can allow many duplicates to accumulate. See

https://bugzilla.redhat.com/show_bug.cgi?id=1778703


There is more than one mechanism used within the broker to create a binding:

Exchange::bind() + Queue::bound()

Queue::bind() which essentially does the former


To fix this leak without a refactor, both forms needs to be located in the code and symmetric
"unbind" operations need to deallocate the QueueBindings reference.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message