qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: Memory leak in QPID C++ Broker
Date Thu, 04 Aug 2011 14:47:52 GMT
On 08/04/2011 09:21 AM, et3w503 wrote:
> Dear all:
>
> I found a memory leak issue in QPID C++ broker using valgrind.
>
> My qpidd broker is the rpm version from Redhat ftp.
>
> ftp://ftp.redhat.com/pub/redhat/linux/enterprise/5Server/en/RHEMRG/SRPMS/qpidc-0.5.752581-34.el5.src.rpm

Can't say for sure with no further information, but I suspect this may 
be simply the failure to free active sessions when the broker shuts 
down. If so it is not an issue for a running system and is already fixed.

That is quite an old version, I'd recommend upgrading (the qpidc top 
level package for RHEL is now called qpid-cpp-mrg). If you can reproduce 
on a more recent broker, let me know.

> ==4485== 144,243 (872 direct, 143,371 indirect) bytes in 1 blocks are
> definitely lost in loss record 144 of 158
> ==4485==    at 0x40060D5: operator new(unsigned int)
> (vg_replace_malloc.c:214)
> ==4485==    by 0x63B8C1:
> qpid::broker::SessionManager::attach(qpid::broker::SessionHandler&,
> qpid::SessionId const&, bool) (in /usr/lib/libqpidbroker.so.0.1.0)
> ==4485==    by 0x63D95A: qpid::broker::SessionHandler::setState(std::string
> const&, bool) (in /usr/lib/libqpidbroker.so.0.1.0)
> ==4485==    by 0x3F4C58: qpid::amqp_0_10::SessionHandler::attach(std::string
> const&, bool) (in /usr/lib/libqpidcommon.so.0.1.0)
> ==4485==    by 0x347A72:
> qpid::framing::AMQP_AllOperations::SessionHandler::Invoker::visit(qpid::framing::SessionAttachBody
> const&) (in /usr/lib/libqpidcommon.so.0.1.0)
> ==4485==    by 0x3765C7:
> qpid::framing::SessionAttachBody::accept(qpid::framing::MethodBodyConstVisitor&)
> const (in /usr/lib/libqpidcommon.so.0.1.0)
> ==4485==    by 0x3F98A6: qpid::framing::Invoker::Result
> qpid::framing::invoke<qpid::amqp_0_10::SessionHandler>(qpid::amqp_0_10::SessionHandler&,
> qpid::framing::AMQMethodBody const&) (in /usr/lib/libqpidcommon.so.0.1.0)
> ==4485==    by 0x3F43BF:
> qpid::amqp_0_10::SessionHandler::invoke(qpid::framing::AMQMethodBody const&)
> (in /usr/lib/libqpidcommon.so.0.1.0)
> ==4485==    by 0x3F82C6:
> qpid::amqp_0_10::SessionHandler::handleIn(qpid::framing::AMQFrame&) (in
> /usr/lib/libqpidcommon.so.0.1.0)
> ==4485==    by 0x63A26A:
> qpid::framing::Handler&lt;qpid::framing::AMQFrame&amp;&gt;::MemFunRef&lt;qpid::framing::Handler&lt;qpid::framing::AMQFrame&amp;&gt;::InOutHandlerInterface,
> &(qpid::framing::Handler&lt;qpid::framing::AMQFrame&amp;&gt;::InOutHandlerInterface::handleIn(qpid::framing::AMQFrame&))>::handle(qpid::framing::AMQFrame&)
> (in /usr/lib/libqpidbroker.so.0.1.0)
> ==4485==    by 0x599D6F:
> qpid::broker::Connection::received(qpid::framing::AMQFrame&) (in
> /usr/lib/libqpidbroker.so.0.1.0)
> ==4485==    by 0x55C46E: qpid::amqp_0_10::Connection::decode(char const*,
> unsigned int) (in /usr/lib/libqpidbroker.so.0.1.0)
[snip]
> ==4485== LEAK SUMMARY:
> ==4485==    definitely lost: 872 bytes in 1 blocks
> ==4485==    indirectly lost: 143,371 bytes in 75 blocks
> ==4485==      possibly lost: 13,650,722 bytes in 142,053 blocks
> ==4485==    still reachable: 1,067,045 bytes in 97 blocks
> ==4485==         suppressed: 0 bytes in 0 blocks
> ==4485== Reachable blocks (those to which a pointer was found) are not
> shown.
> ==4485== To see them, rerun with: --leak-check=full --show-reachable=yes
> ==4485==
> ==4485== For counts of detected and suppressed errors, rerun with: -v
> ==4485== ERROR SUMMARY: 62 errors from 62 contexts (suppressed: 93 from 13)

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Mime
View raw message