Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.4.0
-
None
-
Fedora 9 (i386), openssl-0.9.8g-9.fc9
Description
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.
Attachments
Issue Links
- is duplicated by
-
AXIS2C-1452 Memory leak in axis2_engine_send
- Resolved