[
https://issues.apache.org/jira/browse/AXIS2C-1227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Lazarski resolved AXIS2C-1227.
-------------------------------------
Fix Version/s: 2.0.0
(was: 1.7.0)
Resolution: Fixed
Issue: "engine not freed when server return an error" - but the user
correctly noted that the attached patch was inadequate. The original patch only
fixed the engine leak (12 bytes), but there was a more significant msg_ctx leak
(31,978 bytes) that wasn't addressed.
Root Cause: The axis2_http_worker_process_request() function had 3 early
return paths after msg_ctx was created that didn't free it:
1. Line 302 (bad URL): When url_external_form is NULL
2. Line 1018 (engine failure): When axis2_engine_create() fails
3. Line 1285 (OOM): When memory allocation fails during content type
processing
Fix: Added proper cleanup of msg_ctx and related resources (request_url,
soap_action_str) before each early return to prevent memory leaks.
> engine not freed when server return an error
> --------------------------------------------
>
> Key: AXIS2C-1227
> URL: https://issues.apache.org/jira/browse/AXIS2C-1227
> Project: Axis2-C
> Issue Type: Bug
> Components: transport/http
> Environment: linux fc6
> Reporter: Frederic Heem
> Priority: Major
> Labels: patch
> Fix For: 2.0.0
>
> Attachments: http_worker.patch
>
>
> In http_worker.c at line 1181, the engine is created but not destroyed, this
> happens when the server returns a fault.
> ==17539== 12 bytes in 3 blocks are definitely lost in loss record 4 of 103
> ==17539== at 0x4005858: malloc (vg_replace_malloc.c:207)
> ==17539== by 0x4091E75: axis2_engine_create (engine.c:52)
> ==17539== by 0x4016B40: axis2_http_worker_process_request
> (http_worker.c:1181)
> ==17539== by 0x4123ED0: axis2_svr_thread_worker_func
> (http_svr_thread.c:259)
> ==17539== by 0x405EEE5: dummy_worker (thread_unix.c:93)
> ==17539== by 0x8E145A: start_thread (in /lib/libpthread-2.5.so)
> ==17539== by 0x71323D: clone (in /lib/libc-2.5.so)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]