[
https://issues.apache.org/jira/browse/AXIS2C-1542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bill Blough updated AXIS2C-1542:
--------------------------------
Component/s: code generation
(was: core/clientapi)
> Memory leak in axis2c generated code
> ------------------------------------
>
> Key: AXIS2C-1542
> URL: https://issues.apache.org/jira/browse/AXIS2C-1542
> Project: Axis2-C
> Issue Type: Bug
> Components: code generation
> Affects Versions: 1.6.0
> Environment: Linux
> Reporter: Manoj Dhirde
> Priority: Major
> Fix For: 1.7.0
>
>
> Hi,
> We are on version 1.6.0 for our axis2c client. We generated c code using
> WSDL2C and there seems to be memory leak of 8K per request on the client
> side. ValGrind analysis is pointing to axis2c-generated code as follows,
> ==22206== 48,164 (32,275 direct, 15,889 indirect) bytes in 374 blocks are
> definitely lost in loss record 647 of 675
> ==22206== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
> ==22206== by 0x13767376: axutil_allocator_malloc_impl (in
> /opt/sac/lib/libaxutil.so.0)
> ==22206== by 0x1376C315: axutil_qname_create (in
> /opt/sac/lib/libaxutil.so.0)
> ==22206== by 0x134E7A57: adb_searchRecordsResponse_deserialize (in
> /opt/sac/lib/libACSServiceClient.so)
> ==22206== by 0x135C7534: axis2_stub_op_ACSServiceService_searchRecords
> (in /opt/sac/lib/libACSServiceClient.so)
> I checked the adb_searchRecordsResponse_deserialize which is part of
> adb_searchRecordsResponse.c generated from the wsdl by WSDL2C, and I can see
> it calling axutil_qname_create and later calling axutil_qname_free as well.
> But this doesnt seem to get freed.
> Then checked the qname.c under axis2c-src-1.6.0/util/src and in the
> axutil_qname_free function it reduces the property 'ref' by 1 and then checks
> for it being non-zero. And only if it's non-zero, axis frees the qname. Maybe
> having another reference to the qname is causing the ref being non-zero even
> after reducing it by one in axutil_qname_free? We are getting the
> searchResponse back from service and then getting elements from it. One
> example of it is as follows,
> adb_subscriberList_t* subscribers =
> adb_searchRecordsResponse_get_subscribers(searchRecordsResponse, env);
> and after this we are freeing searchRecordsResponse. Is this
> adb_subscriberList_t* subscribers causing a double reference and not freeing
> qname.
> Any help on this is greatly appreciated.
> Thanks,
> Manoj Dhirde.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]