axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samisa Abeysinghe <sam...@wso2.com>
Subject Re: Memory leak in mod_axis2?
Date Wed, 16 Apr 2008 08:16:26 GMT
Milinda Pathirage wrote:
> Hi,
> I think Dinesh's solution will be a quick fix for this. But we have to 
> concentrate on the pareser specific code inside om_stax_builder.c also.

+1 for fixing it this way for the time being.

Thanks,
Samisa...
>
> Thanks
> Milinda...
>
> On Wed, Apr 16, 2008 at 12:05 PM, Dinesh Premalal <xydinesh@gmail.com 
> <mailto:xydinesh@gmail.com>> wrote:
>
>     Hi,
>
>           Other solution may be we could define AXIS2_LIBXML2_DEFINED
>     with --enable-libxml2 and modify the logic according to it. There
>     are only 4 or 5 places that need to be changed.
>
>     +1 for fixing this before 1.3.1 release.
>
>     thanks,
>     Dinesh
>
>
>     On Wed, Apr 16, 2008 at 11:58 AM, Milinda Pathirage
>     <milinda.pathirage@gmail.com <mailto:milinda.pathirage@gmail.com>>
>     wrote:
>
>         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 <mailto: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>
>                 <mailto: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> <mailto: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>
>                        <mailto: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>
>                        <mailto: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>
>                    <mailto: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>
>                    <mailto: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
>                 <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>
>                 ------------------------------------------------------------------------
>
>                 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
>             <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"
>
>
>
>
>     -- 
>     http://nethu.org/ 
>
>
>
>
> -- 
> http://inf-dimensions.blogspot.com "Infinite Dimensions"
> http://wsaxc.blogspot.com "Web Services With Axis2/C"
> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG. 
> Version: 7.5.524 / Virus Database: 269.23.0/1379 - Release Date: 4/15/2008 6:10 PM
>   


-- 
Samisa Abeysinghe 
Director, Engineering; WSO2 Inc.

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


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


Mime
View raw message