[ https://issues.apache.org/jira/browse/PROTON-641?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gordon Sim updated PROTON-641: ------------------------------ Attachment: proton_leak.cpp Running attached test under valgrind gives: ==17718== ==17718== HEAP SUMMARY: ==17718== in use at exit: 29,660 bytes in 612 blocks ==17718== total heap usage: 819 allocs, 207 frees, 156,612 bytes allocated ==17718== ==17718== 14,830 (256 direct, 14,574 indirect) bytes in 1 blocks are definitely lost in loss record 611 of 612 ==17718== at 0x4A0881C: malloc (vg_replace_malloc.c:270) ==17718== by 0x4C24B5D: pn_new2 (in /home/gordon/projects/proton/installation/lib64/libqpid-proton.so.2.0.0) ==17718== by 0x4C24B37: pn_new (in /home/gordon/projects/proton/installation/lib64/libqpid-proton.so.2.0.0) ==17718== by 0x4C355A6: pn_connection (in /home/gordon/projects/proton/installation/lib64/libqpid-proton.so.2.0.0) ==17718== by 0x40139C: Client::Client() (proton_leak.cpp:35) ==17718== by 0x40128B: main (proton_leak.cpp:152) ==17718== ==17718== 14,830 (256 direct, 14,574 indirect) bytes in 1 blocks are definitely lost in loss record 612 of 612 ==17718== at 0x4A0881C: malloc (vg_replace_malloc.c:270) ==17718== by 0x4C24B5D: pn_new2 (in /home/gordon/projects/proton/installation/lib64/libqpid-proton.so.2.0.0) ==17718== by 0x4C24B37: pn_new (in /home/gordon/projects/proton/installation/lib64/libqpid-proton.so.2.0.0) ==17718== by 0x4C355A6: pn_connection (in /home/gordon/projects/proton/installation/lib64/libqpid-proton.so.2.0.0) ==17718== by 0x401546: Server::Server() (proton_leak.cpp:84) ==17718== by 0x401297: main (proton_leak.cpp:153) ==17718== ==17718== LEAK SUMMARY: ==17718== definitely lost: 512 bytes in 2 blocks ==17718== indirectly lost: 29,148 bytes in 610 blocks ==17718== possibly lost: 0 bytes in 0 blocks ==17718== still reachable: 0 bytes in 0 blocks ==17718== suppressed: 0 bytes in 0 blocks ==17718== ==17718== For counts of detected and suppressed errors, rerun with: -v ==17718== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 2 from 2) > pn_connection_t leaked when links not closed > -------------------------------------------- > > Key: PROTON-641 > URL: https://issues.apache.org/jira/browse/PROTON-641 > Project: Qpid Proton > Issue Type: Bug > Components: proton-c > Affects Versions: 0.8 > Reporter: Gordon Sim > Assignee: Rafael H. Schloming > Fix For: 0.8 > > Attachments: proton_leak.cpp > > > If the application doesn't call pn_link_close(), but calls > on_session_close(), pn_connection_close(), then pn_transport_free() and > pn_connection_free(), the pn_connection_t object appear to be leaked. > Will attach reproducer. See also QPID-5951. -- This message was sent by Atlassian JIRA (v6.2#6252)