Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.7.0
-
None
Description
There seem to be several memory leaks in trunk code, introduced when keepalive was implemented...
I.e running ./samples/client/echo/echo when echo server down
==26655== 654 (72 direct, 582 indirect) bytes in 1 blocks are definitely lost in loss record 7 of 9
==26655== at 0x4028876: malloc (vg_replace_malloc.c:236)
==26655== by 0x40522FE: axutil_allocator_malloc_impl (allocator.c:99)
==26655== by 0x4147AA7: axis2_http_client_create (http_client.c:69)
==26655== by 0x413FC61: axis2_http_sender_send (http_sender.c:452)
==26655== by 0x413EFDD: axis2_http_transport_sender_write_message (http_transport_sender.c:777)
==26655== by 0x413DE47: axis2_http_transport_sender_invoke (http_transport_sender.c:297)
==26655== by 0x40D3A07: axis2_engine_send (engine.c:168)
==26655== by 0x4107CCA: axis2_op_client_two_way_send (op_client.c:1160)
==26655== by 0x4106A23: axis2_op_client_execute (op_client.c:519)
==26655== by 0x4109DF5: axis2_svc_client_send_receive_with_op_qname (svc_client.c:709)
==26655== by 0x410A09C: axis2_svc_client_send_receive (svc_client.c:797)
==26655== by 0x8048C74: main (echo.c:108)
==26655==
==26655== 654 (72 direct, 582 indirect) bytes in 1 blocks are definitely lost in loss record 8 of 9
==26655== at 0x4028876: malloc (vg_replace_malloc.c:236)
==26655== by 0x40522FE: axutil_allocator_malloc_impl (allocator.c:99)
==26655== by 0x4147AA7: axis2_http_client_create (http_client.c:69)
==26655== by 0x413FC61: axis2_http_sender_send (http_sender.c:452)
==26655== by 0x413EFDD: axis2_http_transport_sender_write_message (http_transport_sender.c:777)
==26655== by 0x413DE47: axis2_http_transport_sender_invoke (http_transport_sender.c:297)
==26655== by 0x40D3A07: axis2_engine_send (engine.c:168)
==26655== by 0x4107CCA: axis2_op_client_two_way_send (op_client.c:1160)
==26655== by 0x4106A23: axis2_op_client_execute (op_client.c:519)
==26655== by 0x4109DF5: axis2_svc_client_send_receive_with_op_qname (svc_client.c:709)
==26655== by 0x410A09C: axis2_svc_client_send_receive (svc_client.c:797)
==26655== by 0x8048D6D: main (echo.c:131)
==26655==
(i modified engine.c:168 to show the stack trace correctly)
There seems to be several other memory leaks when using the samples, attached patch takes care of most of them only leaving a memory leak from method axis2_http_sender_connection_map_remove() (which involves modifying a lot of code so I will open a separate issue for it)
Please review the patch, I tested it against all the samples in trunk and takes care of most of the leaks (both in ok and error cases) , with exception of the one mentioned before, an unrelated mem leak in mtom, and the async calls bug (which already has a separate issue)
Attachments
Attachments
Issue Links
- is related to
-
AXIS2C-1632 Patch to fix Stability issues and memory leaks on hash keys
- Open
- relates to
-
AXIS2C-1584 Asynchronous call crashes and memory leaks
- Open