Return-Path: Delivered-To: apmail-axis-c-user-archive@www.apache.org Received: (qmail 78182 invoked from network); 4 Mar 2010 15:29:13 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 4 Mar 2010 15:29:13 -0000 Received: (qmail 12070 invoked by uid 500); 4 Mar 2010 15:29:03 -0000 Delivered-To: apmail-axis-c-user-archive@axis.apache.org Received: (qmail 12051 invoked by uid 500); 4 Mar 2010 15:29:02 -0000 Mailing-List: contact c-user-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache AXIS C User List" Delivered-To: mailing list c-user@axis.apache.org Received: (qmail 12043 invoked by uid 99); 4 Mar 2010 15:29:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Mar 2010 15:29:02 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [209.85.216.198] (HELO mail-px0-f198.google.com) (209.85.216.198) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Mar 2010 15:28:55 +0000 Received: by pxi36 with SMTP id 36so901036pxi.13 for ; Thu, 04 Mar 2010 07:28:34 -0800 (PST) MIME-Version: 1.0 Received: by 10.141.23.18 with SMTP id a18mr5256044rvj.17.1267716514213; Thu, 04 Mar 2010 07:28:34 -0800 (PST) In-Reply-To: <014C756DD244D34991AEE9B9CC54A6291309148F@serv105.ARGO.LOCAL> References: <9C55040DA84D3D4C936A896505A1F64E01066901@mail2.oxymelfr.com> <9C55040DA84D3D4C936A896505A1F64E01066904@mail2.oxymelfr.com> <014C756DD244D34991AEE9B9CC54A6291309148F@serv105.ARGO.LOCAL> Date: Thu, 4 Mar 2010 20:58:34 +0530 Message-ID: Subject: Re: How to fix memory leak in Axis2/C client? From: Samisa Abeysinghe To: Apache AXIS C User List Content-Type: multipart/alternative; boundary=000e0cd17b0a816f810480fb402e --000e0cd17b0a816f810480fb402e Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Thu, Mar 4, 2010 at 8:37 PM, Hatim Daginawala < Hatim.Daginawala@argodata.com> wrote: > You probably need to call axiom_node_free_tree on both request and > response node before reusing svc_client > I do not think so - this will lead to seg faults if I recall right. If you cannot share the code, then the best is to use echo sample and see i= f it leaks memory and if it does, report issues against that. It is like searching in the dark to talk about this without some concrete code. Samisa... > > > *From:* Olivier Mengu=E9 [mailto:omengue@oxymel.com] > *Sent:* Thursday, March 04, 2010 8:36 AM > *To:* Apache AXIS C User List; Apache AXIS C User List > *Cc:* Axis2/C user > *Subject:* RE : How to fix memory leak in Axis2/C client? > > > > > > Samisa Abeysinghe wrote: > >It is hard to tell from the list of methods given. Can you please provid= e > >the code you are using to test? Then we can profile and see where the > leaks > >are. > > As you probably expected, no, I can't. > > Could you at least tell me if I have a good understanding of the API? > Is it my responsability to free the XML trees used in the SOAP exchange? > > Or if it may be a bug such as AXIS2C-1452? > > >> * for every call to the service: > >> - I construct the XML request document: > >> + axutil_qname_create() > >> + axiom_element_create_with_qname() > >> + axiom_element_create(), axiom_element_set_text() > >> - axis2c_svc_client_send_receive() > >> - I parse the XML response document: > >> + axis2c_svc_client_get_http_status_code() > >> + axis2c_svc_client_get_last_response_has_fault() > >> + axiom_node_get_n,ext_sibling() > >> + axiom_node_get_node_type() > >> + axiom_node_get_data_element(), axiom_node_get_localname(), > >> axiom_node_get_namespace(), axiom_node_get_text() > >> > >> > >> I suspect that either the request XML tree and the response XML tree a= re > >> not freed, > >> but I've seen nothing in the axis2c_svc_client API to do that. > >> > >> Which function calls are missing to fix my leak? > >> > >> Olivier. > >> > > Olivier Mengu=E9 > Oxymel, France. > > ------------------------------ > --------------------------------------------------- > Confidentiality Notice: This electronic mail transmission is confidential= , > may be privileged and should be read or retained only by the intended > recipient. If you have received this transmission in error, please > immediately notify the sender and delete it from your system. > > --=20 Samisa Abeysinghe Director, Engineering - WSO2 Inc. http://wso2.com/ - "lean . enterprise . middleware" --000e0cd17b0a816f810480fb402e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Thu, Mar 4, 2010 at 8:37 PM, Hatim Da= ginawala <Hatim.Daginawala@argodata.com> wrote:

You p= robably need to call axiom_node_free_tree on both request and response node before reusing svc_client

=

I do not think so - this will lead to seg faults if I r= ecall right.

If you cannot=A0share=A0the code, the= n the best is to use echo sample and see if it leaks memory and if it does,= report issues against that.=A0

It is like=A0searching=A0in the dark to talk about this= without some concrete code.=A0

Samisa...
=A0

=A0

From:= Olivier Mengu=E9 [mailto:omengue@oxy= mel.com]
Sent: Thursday, March 04, 2010 8:36 AM
To: Apache AXIS C User List; Apache AXIS C User List
Cc: Axis2/C user
Subject: RE=A0: How to fix memory leak in Axis2/C client?

=A0

=A0

Samisa Abeysinghe wrote:
>It is hard to tell from the list of methods given. Can you please provi= de
>the code you are using to test? Then we can profile and see where the l= eaks
>are.

As you probably expected, no, I can't.

Could you at least tell me if I have a good understanding of the API?
Is it my responsability to free the XML trees used in the SOAP exchange?
Or if it may be a bug such as AXIS2C-1452?

>> * for every call to the service:
>>=A0=A0=A0=A0 - I construct the XML request document:
>>=A0=A0=A0=A0=A0=A0=A0=A0 + axutil_qname_create()
>>=A0=A0=A0=A0=A0=A0=A0=A0 + axiom_element_create_with_qname()
>>=A0=A0=A0=A0=A0=A0=A0=A0 + axiom_element_create(), axiom_element_set_text()
>>=A0=A0=A0=A0 - axis2c_svc_client_send_receive()
>>=A0=A0=A0=A0 - I parse the XML response document:
>>=A0=A0=A0=A0=A0=A0=A0=A0 + axis2c_svc_client_get_http_status_code()
>>=A0=A0=A0=A0=A0=A0=A0=A0 + axis2c_svc_client_get_last_response_has_fault()
>>=A0=A0=A0=A0=A0=A0=A0=A0 + axiom_node_get_n,ext_sibling()
>>=A0=A0=A0=A0=A0=A0=A0=A0 + axiom_node_get_node_type()
>>=A0=A0=A0=A0=A0=A0=A0=A0 + axiom_node_get_data_element(), axiom_node_get_localname(),
>> axiom_node_get_namespace(), axiom_node_get_text()
>>
>>
>> I suspect that either the request XML tree and the response XML tr= ee are
>> not freed,
>> but I've seen nothing in the axis2c_svc_client API to do that.=
>>
>> Which function calls are missing to fix my leak?
>>
>> Olivier.
>>

Olivier Mengu=E9
Oxymel, France.


---------------------------------------------------
Confidentiality Notice: This electronic mail transmission is confidential,=
may be privileged and should be read or retained only by the intended
recipient. If you have received this transmission in error, please
immediately notify the sender and delete it from your system.




--
Samisa Abeysinghe
D= irector, Engineering - WSO2 Inc.

http:/= /wso2.com/ - "lean . enterprise . middleware"
--000e0cd17b0a816f810480fb402e--