You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Pavel Moravec (JIRA)" <ji...@apache.org> on 2014/07/03 16:06:25 UTC

[jira] [Created] (QPID-5872) [C++ client] Memory leak in qpid::messaging::amqp::ConnectionContext::ConnectionContext when using qpid-receive

Pavel Moravec created QPID-5872:
-----------------------------------

             Summary: [C++ client] Memory leak in qpid::messaging::amqp::ConnectionContext::ConnectionContext when using qpid-receive
                 Key: QPID-5872
                 URL: https://issues.apache.org/jira/browse/QPID-5872
             Project: Qpid
          Issue Type: Bug
          Components: C++ Client
    Affects Versions: 0.29
            Reporter: Pavel Moravec
            Assignee: Pavel Moravec
            Priority: Minor


valgrind shows a memory leak like below:

qpid-send --messages 3000 --address "q;{create:sender}"
valgrind --leak-check=full ./src/tests/qpid-receive --connection-options {protocol:amqp1.0} --messages 1 --address q
==1206== Memcheck, a memory error detector
==1206== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==1206== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==1206== Command: ./src/tests/qpid-receive --connection-options {protocol:amqp1.0} --messages 1 --address q
==1206== 

==1206== 
==1206== HEAP SUMMARY:
==1206==     in use at exit: 173,792 bytes in 376 blocks
==1206==   total heap usage: 84,019 allocs, 83,643 frees, 15,026,997 bytes allocated
==1206== 
==1206== 157,964 (256 direct, 157,708 indirect) bytes in 1 blocks are definitely lost in loss record 339 of 339
==1206==    at 0x4A069EE: malloc (vg_replace_malloc.c:270)
==1206==    by 0x3CAA617029: pn_new (object.c:41)
==1206==    by 0x3CAA623041: pn_connection (engine.c:384)
==1206==    by 0x4C55425: qpid::messaging::amqp::ConnectionContext::ConnectionContext(std::string const&, std::map<std::string, qpid::types::Variant, std::less<std::string>, std::allocator<std::pair<std::string const, qpid::types::Variant> > > const&) (in /data_xfs/qpid/cpp/BLD/src/libqpidmessaging.so.2.0.0)
==1206==    by 0x4C6B24D: qpid::messaging::amqp::ConnectionHandle::ConnectionHandle(std::string const&, std::map<std::string, qpid::types::Variant, std::less<std::string>, std::allocator<std::pair<std::string const, qpid::types::Variant> > > const&) (in /data_xfs/qpid/cpp/BLD/src/libqpidmessaging.so.2.0.0)
==1206==    by 0x4C6AEB7: qpid::messaging::amqp::(anonymous namespace)::create(std::string const&, std::map<std::string, qpid::types::Variant, std::less<std::string>, std::allocator<std::pair<std::string const, qpid::types::Variant> > > const&) (in /data_xfs/qpid/cpp/BLD/src/libqpidmessaging.so.2.0.0)
==1206==    by 0x4CDA4DB: qpid::messaging::ProtocolRegistry::create(std::string const&, std::map<std::string, qpid::types::Variant, std::less<std::string>, std::allocator<std::pair<std::string const, qpid::types::Variant> > > const&) (in /data_xfs/qpid/cpp/BLD/src/libqpidmessaging.so.2.0.0)
==1206==    by 0x4CCF362: qpid::messaging::Connection::Connection(std::string const&, std::string const&) (in /data_xfs/qpid/cpp/BLD/src/libqpidmessaging.so.2.0.0)
==1206==    by 0x40C707: main (in /data_xfs/qpid/cpp/BLD/src/tests/qpid-receive)
==1206== 
==1206== LEAK SUMMARY:
==1206==    definitely lost: 256 bytes in 1 blocks
==1206==    indirectly lost: 157,708 bytes in 330 blocks
==1206==      possibly lost: 0 bytes in 0 blocks
==1206==    still reachable: 15,828 bytes in 45 blocks
==1206==         suppressed: 0 bytes in 0 blocks
==1206== Reachable blocks (those to which a pointer was found) are not shown.
==1206== To see them, rerun with: --leak-check=full --show-reachable=yes
==1206== 
==1206== For counts of detected and suppressed errors, rerun with: -v
==1206== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 36 from 9)




--
This message was sent by Atlassian JIRA
(v6.2#6252)

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