Return-Path: Delivered-To: apmail-ws-axis-c-dev-archive@www.apache.org Received: (qmail 89335 invoked from network); 16 Apr 2008 06:29:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Apr 2008 06:29:19 -0000 Received: (qmail 13200 invoked by uid 500); 16 Apr 2008 06:29:18 -0000 Delivered-To: apmail-ws-axis-c-dev-archive@ws.apache.org Received: (qmail 13177 invoked by uid 500); 16 Apr 2008 06:29:18 -0000 Mailing-List: contact axis-c-dev-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: "Apache AXIS C Developers List" Reply-To: "Apache AXIS C Developers List" Delivered-To: mailing list axis-c-dev@ws.apache.org Received: (qmail 13161 invoked by uid 99); 16 Apr 2008 06:29:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Apr 2008 23:29:18 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of milinda.pathirage@gmail.com designates 209.85.128.188 as permitted sender) Received: from [209.85.128.188] (HELO fk-out-0910.google.com) (209.85.128.188) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Apr 2008 06:28:25 +0000 Received: by fk-out-0910.google.com with SMTP id f40so4544997fka.0 for ; Tue, 15 Apr 2008 23:28:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=w2hkfCuqzfUNzu0G2Y/IioG8yqEyynI6R90Pikm4qTA=; b=NeXwfpSXmWSZT+ulW+ki4z66fmw5fgSiaV6VE/GJzHgx8zSEt+B7ZeYBKnY5ZxN980ARjdzABhQrk3mXbWYv8ZpSd5sRosFdM8uaqZtD6urgaEHUQNhDDV2oLZbS9/KBLWqUPKATkAKtOC547qnDd/WjW3aos4b60+PcYZkysPE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=cHbpSPOcMW8RIYgjrp+Zfu5tiCnA7tPEEYvfT6mcAswkzA/dflXH2oW7DIE/R/2d+m4jBVX8xrz2LlfzqwTSmFf1Ef/9/zOO/szvnpJH0rM3rq1SOZMvGyBwOuZrkJjNLTzenaBQpmxuHoX7rfKVWaWr7g/chVRaQ471RX3DWN8= Received: by 10.78.135.20 with SMTP id i20mr6528523hud.18.1208327325820; Tue, 15 Apr 2008 23:28:45 -0700 (PDT) Received: by 10.78.100.3 with HTTP; Tue, 15 Apr 2008 23:28:45 -0700 (PDT) Message-ID: <22a059a60804152328s49f349fah812b928aada2e813@mail.gmail.com> Date: Wed, 16 Apr 2008 11:58:45 +0530 From: "Milinda Pathirage" To: "Apache AXIS C User List" , "Apache AXIS C Developers List" Subject: Re: Memory leak in mod_axis2? In-Reply-To: <47FF9C85.4050205@wso2.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_11049_32420998.1208327325820" References: <6463f4210803281238l797d1321ja1e2e2922e7b497a@mail.gmail.com> <47FB7144.20101@wso2.com> <6463f4210804091225k1ecb7acdse114c138c88cc2b5@mail.gmail.com> <47FD1AD3.5080308@wso2.com> <6463f4210804091355neafa218n318db22c9445ec4c@mail.gmail.com> <47FD9743.8060702@wso2.com> <47FE056B.1030300@wso2.com> <47FE0891.8030204@wso2.com> <22a059a60804110815o7f12d0c5ya7814e96f7c8e83@mail.gmail.com> <47FF9C85.4050205@wso2.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_11049_32420998.1208327325820 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, I think the hack samisa proposed earlier is not working, because we didn't include any header files specific to guththila inside axiom code which related to om_stax_builder.c. If we include it in axiom_xml_reader.h, it worked well. But this hack is not acceptable due to it parser specific code inside axiom code (other than wrappers). Is there any specific '#define' for libxml. If we have one we can change the current code to check whether libxml is enabled, or we can simple define AXIS2_ENABLE_GUTHTHILA at configuration. Other than the comment handling, there are many places in om_stax_builder.c which we have use AXIS2_GUTHTHILA_ENABLED. I think we must fix this before 1.3.1 release. Please feel free to comment in this. Thanks Milinda. On Fri, Apr 11, 2008 at 10:44 PM, Samisa Abeysinghe wrote: > > Milinda Pathirage wrote: > > > Hi Alex and Samisa, > > > > This bug was caused by recent change of default parser. In the > > om_stax_builder.c, we previously check whether guththila is enabled and free > > the comment vlaue when we encounter a comment. Now guththila is default we > > don have AXIS2_GUTHTHILA_ENABLED defined at the compile time. > > > > hmm, Good point. The whole trouble is because of a design flow, how come a > parser specific thing came to a parser independent logic? :) > > As an immediat efix, we can define AXIS2_GUTHTHILA_ENABLED in some > Guththila header. However that is a hack, and not a neat fix. In the long > run, we need to find why we have to treat comments form different parsers > differently and fix that issue. > > Please raise a Jira on this. > > Thanks, > Samisa... > > > > #ifdef AXIS2_GUTHTHILA_ENABLED*/ > > > > AXIS2_FREE(env->allocator,comment_value); > > > > #else > > > > axiom_xml_reader_xml_free(om_builder->parser,env,comment_value); > > > > #endif > > > > I changed the above lines to following > > > > /*#ifdef AXIS2_GUTHTHILA_ENABLED*/ > > > > AXIS2_FREE(env->allocator,comment_value); > > > > /*#else*/ > > #ifdef AXIS2_LIBXML_ENABLED > > axiom_xml_reader_xml_free(om_builder->parser,env,comment_value); > > > > #endif > > > > and now definitely lost: 690 bytes in 46 blocks. > > > > I have attached the valgrind log. I don't know the correct way to handle > > LIBXML enabling. Please can some one change the > > 'axiom_stax_builder_create_om_comment' function in om_stax_builder.c file to > > reflect recent changes in default parser. > > > > Thanks > > Milinda > > > > > > On Thu, Apr 10, 2008 at 6:01 PM, Samisa Abeysinghe > samisa@wso2.com>> wrote: > > > > Alex, > > In the mean time, try with libxml2 paarser. > > Samisa... > > > > > > Samisa Abeysinghe wrote: > > > > Samisa Abeysinghe wrote: > > > > > > Alex Bolgarov wrote: > > > > On Wed, Apr 9, 2008 at 3:36 PM, Samisa Abeysinghe > > > wrote: > > > > In the mean time, please send the valgrind log. > > > > > > I did send the valgrind log to the list > > > > > > Sorry, I missed it (was a bit sleepy at the time I replied > > ;) ) > > > > Looking at the log, it is a newly introduced one, with > > Guththila parser. I remember Lahuri mentioning about this > > leak once, and I was under the impression that this was > > fixed. Anyway I will have a look. > > > > > > I had a more detailed look into the code and there are some > > leaks to be fixed. I am curretly at ApacheCon and do not have > > access to a Linux box, and would only have time to fix this > > next week. Can someone please look into this in the mean time. > > > > Thanks, > > Samisa... > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org > > > > For additional commands, e-mail: > > axis-c-user-help@ws.apache.org > > > > > > > > > > > > > > -- Samisa Abeysinghe Software Architect; WSO2 Inc. > > > > http://www.wso2.com/ - "Oxygenating the Web Service Platform." > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org > > > > For additional commands, e-mail: axis-c-user-help@ws.apache.org > > > > > > > > > > > > -- > > http://inf-dimensions.blogspot.com "Infinite Dimensions" > > http://wsaxc.blogspot.com "Web Services With Axis2/C" > > ------------------------------------------------------------------------ > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org > > For additional commands, e-mail: axis-c-user-help@ws.apache.org > > ------------------------------------------------------------------------ > > > > No virus found in this incoming message. > > Checked by AVG. Version: 7.5.519 / Virus Database: 269.22.11/1368 - > > Release Date: 4/9/2008 4:20 PM > > > > > -- > Samisa Abeysinghe Director, Engineering; WSO2 Inc. > > http://www.wso2.com/ - "The Open Source SOA Company" > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org > For additional commands, e-mail: axis-c-user-help@ws.apache.org > > -- http://inf-dimensions.blogspot.com "Infinite Dimensions" http://wsaxc.blogspot.com "Web Services With Axis2/C" ------=_Part_11049_32420998.1208327325820 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi,
I think the hack samisa proposed earlier is not working, because we didn't include any header files specific to guththila inside axiom code which related to om_stax_builder.c. If we include it in axiom_xml_reader.h, it worked well. But this hack is not acceptable due to it parser specific code inside axiom code (other than wrappers). Is there any specific '#define' for libxml. If we have one we can change the current code to check whether libxml is enabled, or we can simple define AXIS2_ENABLE_GUTHTHILA at configuration.

Other than the comment handling, there are many places in om_stax_builder.c which we have use AXIS2_GUTHTHILA_ENABLED. I think we must fix this before 1.3.1 release.

Please feel free to comment in this.

Thanks
Milinda.

On Fri, Apr 11, 2008 at 10:44 PM, Samisa Abeysinghe <samisa@wso2.com> wrote:

Milinda Pathirage wrote:
Hi Alex and Samisa,

This bug was caused by recent change of default parser. In the om_stax_builder.c, we previously check whether guththila is enabled and free the comment vlaue when we encounter a comment. Now guththila is default we don have AXIS2_GUTHTHILA_ENABLED defined at the compile time.

hmm, Good point. The whole trouble is because of a design flow, how come a parser specific thing came to a parser independent logic? :)

As an immediat efix, we can define AXIS2_GUTHTHILA_ENABLED in some Guththila header. However that is a hack, and not a neat fix. In the long run, we need to find why we have to treat comments form different parsers differently and fix that issue.

Please raise a Jira on this.

Thanks,
Samisa...


#ifdef AXIS2_GUTHTHILA_ENABLED*/

   AXIS2_FREE(env->allocator,comment_value);

#else

   axiom_xml_reader_xml_free(om_builder->parser,env,comment_value);

#endif

I changed the above lines to following

/*#ifdef AXIS2_GUTHTHILA_ENABLED*/

   AXIS2_FREE(env->allocator,comment_value);

/*#else*/
#ifdef AXIS2_LIBXML_ENABLED
   axiom_xml_reader_xml_free(om_builder->parser,env,comment_value);

#endif

and now definitely lost: 690 bytes in 46 blocks.

I have attached the valgrind log. I don't know the correct way to handle LIBXML enabling. Please can some one change the 'axiom_stax_builder_create_om_comment' function in om_stax_builder.c file to reflect recent changes in default parser.

Thanks
Milinda


On Thu, Apr 10, 2008 at 6:01 PM, Samisa Abeysinghe <samisa@wso2.com <mailto:samisa@wso2.com>> wrote:

   Alex,
     In the mean time, try with libxml2 paarser.
   Samisa...


   Samisa Abeysinghe wrote:

       Samisa Abeysinghe wrote:


           Alex Bolgarov wrote:

               On Wed, Apr 9, 2008 at 3:36 PM, Samisa Abeysinghe
               <samisa@wso2.com <mailto:samisa@wso2.com>> wrote:
               
                   In the mean time, please send the valgrind log.
                     

               I did send the valgrind log to the list


           Sorry, I missed it (was a bit sleepy at the time I replied
           ;) )

           Looking at the log, it is a newly introduced one, with
           Guththila parser. I remember Lahuri mentioning about this
           leak once, and I was under the impression that this was
           fixed. Anyway I will have a look.


       I had a more detailed look into the code and there are some
       leaks to be fixed. I am curretly at ApacheCon and do not have
       access to a Linux box, and would only have time to fix this
       next week. Can someone please look into this in the mean time.

       Thanks,
       Samisa...


       ---------------------------------------------------------------------
       To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
       <mailto:axis-c-user-unsubscribe@ws.apache.org>

       For additional commands, e-mail:
       axis-c-user-help@ws.apache.org
       <mailto:axis-c-user-help@ws.apache.org>






   --    Samisa Abeysinghe Software Architect; WSO2 Inc.

   http://www.wso2.com/ - "Oxygenating the Web Service Platform."


   ---------------------------------------------------------------------
   To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
   <mailto:axis-c-user-unsubscribe@ws.apache.org>

   For additional commands, e-mail: axis-c-user-help@ws.apache.org
   <mailto:axis-c-user-help@ws.apache.org>





--
http://inf-dimensions.blogspot.com "Infinite Dimensions"
http://wsaxc.blogspot.com "Web Services With Axis2/C"
------------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org
------------------------------------------------------------------------

No virus found in this incoming message.
Checked by AVG. Version: 7.5.519 / Virus Database: 269.22.11/1368 - Release Date: 4/9/2008 4:20 PM


--
Samisa Abeysinghe Director, Engineering; WSO2 Inc.

http://www.wso2.com/ - "The Open Source SOA Company"



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org




--
http://inf-dimensions.blogspot.com "Infinite Dimensions"
http://wsaxc.blogspot.com "Web Services With Axis2/C" ------=_Part_11049_32420998.1208327325820--