apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Fritsch ...@sfritsch.de>
Subject Re: Finding memory leaks in httpd and httpd modules
Date Wed, 17 Feb 2010 20:26:28 GMT
On Wednesday 17 February 2010, Joe Orton wrote:
> On Wed, Feb 17, 2010 at 09:12:03AM -0500, Jeff Trawick wrote:
> > a. get the server to steady state
> 
> ...
> 
> > b. see what causes the heap to expand (brk/sbrk)
> 
> This is what I do too, FWIW.  It's primitive but usually effective.

What about adding some code to apr-util's bucket debugging that logs 
when destroyed brigades (i.e. where the pool cleanup has been removed) 
are reused? I think this may be a common cause for memory leaks.

A simpler alternative would be to set bb->pool and bb->bucket_alloc to 
NULL in apr_brigade_destroy(). The latter could maybe even be enabled 
in some apr-util maintainer mode (just like httpd enables some 
debugging in maintainer mode).


Mime
View raw message