apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Steiner <peter.stei...@hugwi.ch>
Subject Re: apr_pools leaking
Date Wed, 29 Nov 2006 09:14:57 GMT
(im not a subscriber to this list, so please CC to my address)

Joe Orton wrote:
> On Mon, Nov 13, 2006 at 01:40:46PM +0100, Peter Steiner wrote:
>> I have observed and opened a bug [1] in allocator_free() in apr_pools.c,
>> that was reported first by Brian Pane on dev@httpd [2]. Brian drafted a
>> patch:
> 
> The issues Brian reference look real but are entirely unrelated to the 
> symptoms you have described - they cannot cause a "memory leak" in your 
> app.  If the memory use in your app is increasing *indefinitely* then 
> that's a pool memory misuse problem.
> 
> Check that e.g. all pools you create are also destroyed and that no 
> memory is being allocated out of long-lived pools by whatever operation 
> it is you see consuming memory.

Thanks to Joe for directing my search in the right direction. I found
that my application (or rather log4cxx) didn't set the threshold with
apr_allocator_max_free_set() AND had some small allocation in its
long-lived pool.

I have proposed a patch for the original issue (the underflow of
current_free_index), see
http://issues.apache.org/bugzilla/show_bug.cgi?id=40955.

While hunting down my memory problems I did use the APR_POOL_DEBUG
switch and had to fix two small problems first. I'm proposing another
patch for these bugs, see
http://issues.apache.org/bugzilla/show_bug.cgi?id=41063

Regards, Peter
-- 
    _   _        Peter Steiner <peter.steiner@hugwi.ch>
  / /_/ /        Hug-Witschi AG <http://www.hugwi.ch/>
 /  _  /         Electronic Engineering
/_/ /_/  _   _   Auriedstrasse 10
   / / / / / /   CH-3178 Boesingen
  / /_/ /_/ /    Tel  +41 31 740 44 44
 /_ _ _ _ _/     Fax  +41 31 740 44 45

Mime
View raw message