[rabbitmq-discuss] [rabbitmq-c-master] memory leakinkg while reconnect.

Alan Antonuk alan.antonuk at gmail.com
Fri Feb 14 16:53:41 GMT 2014


Rohit;

On Fri, Feb 14, 2014 at 6:15 AM, Rohit Patle
<Rohit.Patle at techmahindra.com>wrote:

>  Hi Alan,
>
> Thank you for your suggestions.
>
> As guided I run my simulation code in for() loop of 5 iterations.
>
> A. Here in case of Valgrind I could not called amqp_destroy_connection()
> API after getting "opening SSL/TLS connection ERROR" because as network
> cable is plugged out It will produce the seg fault. I could see the memory
> leak there in this case.
>

The leaks we see here are consistent with not calling
amqp_destroy_connection() on each amqp_connection_state_t object that is
created.

>
> B. In other case when I am trying to do amqp_destroy_connection() after
> getting "opening SSL/TLS connection ERROR". In this I am getting Seg fault
> as expected. I trace out the execution through GDB here is the bt you asked
> for.
>

It looks like it might be a double-free of some SSL structure, I did have
an issue with that pre v0.4.0 (see:
https://github.com/alanxz/rabbitmq-c/issues/129). What string is returned
from the amqp_version() function? What version of OpenSSL are you compiling
against?

-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140214/7ffb8a39/attachment.html>


More information about the rabbitmq-discuss mailing list