[rabbitmq-discuss] [rabbitmq-c-master] memory leakinkg while reconnect.
Rohit Patle
Rohit.Patle at techmahindra.com
Thu Feb 13 15:05:54 GMT 2014
Hi Alan,
As suggested by you I run our code with Valgrind and also with GDB bellow is the outcome for your reference. From GDB outcome I can see that the Segmentation fault occurs due to non availability of malloc_consolidate in malloc.c also I am not able to find the file in my downloaded rabbitmq-c-master package.
Please suggest.
========================= Valgrind ======================
==6778==
==6778== Process terminating with default action of signal 2 (SIGINT)
==6778== at 0x414D311: connect (socket.S:64)
==6778== by 0x69682E30: ???
==6778==
==6778== HEAP SUMMARY:
==6778== in use at exit: 667,319 bytes in 3,295 blocks
==6778== total heap usage: 4,393 allocs, 1,098 frees, 789,240 bytes allocated
==6778==
==6778== Searching for pointers to 3,295 not-freed blocks
==6778== Checked 206,660 bytes
==6778==
==6778== 414,730 (344 direct, 414,386 indirect) bytes in 2 blocks are definitely lost in loss record 378 of 378
==6778== at 0x402A5E6: calloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==6778== by 0x404C623: amqp_new_connection (amqp_connection.c:68)
==6778== by 0x40754D2: (below main) (libc-start.c:226)
==6778==
==6778== LEAK SUMMARY:
==6778== definitely lost: 344 bytes in 2 blocks
==6778== indirectly lost: 414,386 bytes in 372 blocks
==6778== possibly lost: 0 bytes in 0 blocks
==6778== still reachable: 252,589 bytes in 2,921 blocks
==6778== suppressed: 0 bytes in 0 blocks
==6778== Reachable blocks (those to which a pointer was found) are not shown.
==6778== To see them, rerun with: --leak-check=full --show-reachable=yes
==6778==
==6778== Use --track-origins=yes to see where uninitialised values come from
==6778== ERROR SUMMARY: 7 errors from 2 contexts (suppressed: 0 from 0)
==6778==
==6778== 6 errors in context 1 of 2:
==6778== Conditional jump or move depends on uninitialised value(s)
==6778== at 0x4346494: ASN1_STRING_set (asn1_lib.c:382)
==6778== by 0x432FF02: ASN1_mbstring_ncopy (a_mbstr.c:204)
==6778== by 0x433018A: ASN1_mbstring_copy (a_mbstr.c:86)
==6778== by 0x4331258: ASN1_STRING_to_UTF8 (a_strex.c:570)
==6778== by 0x4332F0B: x509_name_canon (x_name.c:408)
==6778== by 0x43335BF: x509_name_ex_d2i (x_name.c:210)
==6778== by 0x433B017: ASN1_item_ex_d2i (tasn_dec.c:239)
==6778== by 0x433BD9E: asn1_template_noexp_d2i (tasn_dec.c:746)
==6778==
==6778== ERROR SUMMARY: 7 errors from 2 contexts (suppressed: 0 from 0)
===============================END==================
GDB outcome:
========================== GDB =======================
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
creating connection
opening SSL/TLS connection
Program received signal SIGSEGV, Segmentation fault.
0xb7e80175 in malloc_consolidate (av=0xb7fb0440) at malloc.c:4278
4278 malloc.c: No such file or directory.
(gdb) n
=====================================================
Thanks & Regards,
Rohit
________________________________
DISCLAIMER:
This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140213/72bdaf4d/attachment.html>
More information about the rabbitmq-discuss
mailing list