apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <...@covalent.net>
Subject Re: Buckets destroy not cleaning up private structures?
Date Sun, 29 Apr 2001 02:11:51 GMT

It is unnecessary.  All of the private structures are allocated out of
pools, and thus they are cleaned automatically.  Having the buckets close
their own structures has other implications.

1)  We end up closing resources in the middle of sending out a request,
which is a bad thing IMHO.

2)  We end up having multiple ways to close the same resource, which means
we will be unlikely to spot some bugs, because we have built-in
safety-nets, which we may not really want or need.

BTW, closing the resource during the request has performance implications,
because we also have to kill the cleanup that was registered previously.


On Sat, 28 Apr 2001, Justin Erenkrantz wrote:

> Aren't some of the resource leakages in httpd coming from the fact
> that the buckets aren't cleaning up after themselves?  They do
> reference counting, but my guess is that they should close their
> private structures as well when they are no longer around.
> mod_core opens a file and gives it apr_bucket_file_create.  After
> that point, shouldn't the bucket "own" the fd and close it when
> it is done?
> Someone (Cliff?) thought about this in apr_buckets_mmap.c - there
> is an XXX comment about deleting the mmap structure.  So, I can't
> be the only one who has spotted this.  AFAICT, no mention in the
> previous conversations about buckets talked about closing the
> private structures.
> I'm going to implement this in my local tree and see if it blows
> up things spectacularly.  -- justin

Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131

View raw message