[
https://issues.apache.org/jira/browse/AXIS2C-1631?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alex Mantaut updated AXIS2C-1631:
---------------------------------
Attachment: axis2c-1631.patch
Patch to solve the leaks.
In http_sender it keeps a copy of the client in connection_map in order to
release it when svc_client is destroyed
In samples it releases the namespaces used.
Also it solves an mem leak when setting the same value to a property.
Solves a mem leak when the server returns a 404 error.
> Patch for Memory leaks when keepalive enabled and samples.
> ----------------------------------------------------------
>
> Key: AXIS2C-1631
> URL: https://issues.apache.org/jira/browse/AXIS2C-1631
> Project: Axis2-C
> Issue Type: Bug
> Components: core/transport
> Affects Versions: 1.7.0
> Reporter: Alex Mantaut
> Fix For: 1.7.0
>
> Attachments: axis2c-1631.patch
>
>
> 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)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]