axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rafal Metkowski <rafmet...@ais.pl>
Subject SSL related memory leak ?
Date Wed, 16 Jul 2008 13:22:30 GMT

Hi,

I've written small client using Axis2C and I've noticed memory leaks
when connecting to service with https.

I've checked with the valgrind and got following results:
valgrind --leak-check=full
==8057== 58,000 (292 direct, 57,708 indirect) bytes in 1 blocks are
definitely lost in loss record 9 of 9
==8057==    at 0x4006AEE: malloc (vg_replace_malloc.c:207)
==8057==    by 0x7B4E4CD: (within /lib/libcrypto.so.0.9.8g)
==8057==    by 0x7B4EB4E: CRYPTO_malloc (in /lib/libcrypto.so.0.9.8g)
==8057==    by 0x34C529: SSL_new (in /lib/libssl.so.0.9.8g)
==8057==    by 0x40EB9C2: axis2_ssl_utils_initialize_ssl (ssl_utils.c:133)
==8057==    by 0x40EB7E6: axutil_stream_create_ssl (ssl_stream.c:104)
==8057==    by 0x40EABB1: axis2_http_client_send (http_client.c:216)
==8057==    by 0x40E8A9D: axis2_http_sender_send (http_sender.c:1064)
==8057==    by 0x40E32B4: axis2_http_transport_sender_write_message
(http_transport_sender.c:771)
==8057==    by 0x40E3AC3: axis2_http_transport_sender_invoke
(http_transport_sender.c:306)
==8057==    by 0x407DF6A: axis2_engine_send (engine.c:176)
==8057==    by 0x40A5BAB: axis2_op_client_two_way_send (op_client.c:1157)
.......
==8057== LEAK SUMMARY:
==8057==    definitely lost: 332 bytes in 4 blocks.
==8057==    indirectly lost: 57,900 bytes in 596 blocks.
==8057==      possibly lost: 0 bytes in 0 blocks.
==8057==    still reachable: 28,292 bytes in 1,887 blocks.
==8057==         suppressed: 0 bytes in 0 blocks.

As I expected when I changed https to plain http the problem disapeared:
==9065== LEAK SUMMARY:
==9065==    definitely lost: 40 bytes in 3 blocks.
==9065==    indirectly lost: 192 bytes in 6 blocks.
==9065==      possibly lost: 0 bytes in 0 blocks.
==9065==    still reachable: 300 bytes in 3 blocks.
==9065==         suppressed: 0 bytes in 0 blocks.

I looked at the code and it seems axis2_ssl_utils_cleanup_ssl function 
isn't called in case of successful connection.
Is it a bug in Axis2C or am I missing something ?

Thanks for help

Rafal Metkowski


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Mime
View raw message