httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <...@covalent.net>
Subject Re: New post-log-transaction hook?
Date Wed, 19 Sep 2001 19:35:41 GMT
On Wednesday 19 September 2001 12:27 pm, Jon Travis wrote:
> On Wed, Sep 19, 2001 at 12:16:24PM -0700, Ryan Bloom wrote:
> > On Wednesday 19 September 2001 11:37 am, William A. Rowe, Jr. wrote:
> > > From: "Greg Stein" <gstein@lyra.org>
> > > Sent: Wednesday, September 19, 2001 1:26 PM
> > >
> > > > On Wed, Sep 19, 2001 at 01:52:12PM -0400, Rodent of Unusual Size wrote:
> > > > > Greg Stein wrote:
> > > > > > It isn't a bug. Cleanups are for just wrapping things up,
> > > > > > not doing work.
> > > > >
> > > > > If that's the authoritative answer, then we need to provide
> > > > > a supported way for 'doing work' at cleanup time.
> > > > >
> > > > > > You might not even be able to open and use that file if
> > > > > > your pool is n the process of being destroyed.
> > > > >
> > > > > That sounds like utter tripe.  If you can't depend on the
> > > > > pool lasting at least until your cleanup routine ends,
> > > > > then the whole cleanup mechanism is seriously borked.  AFAIK
> > > > > it isn't, so I think the above assertion *is*.
> > > >
> > > > The problem is cross-dependency between the cleanup actions. One can
> > > > destroy something another cleanup needs. If you restrict their
> > > > actions to "simple" things, then the cross-dependencies are
> > > > (hopefully!) removed.
> > >
> > > Really?  No.  Cleanups are run as a LIFO stack.  Anything that existed
> > > when something was added to the pool must exist when that something is
> > > removed from the pool.
> > >
> > > IMHO, we need to make subpool scrubbing an actual LIFO cleanup as well,
> > > so that will also be true of subpools.
> > >
> > > Considering how we use pools for dynamic libraries and the rest, it's
> > > absolutely vital that they are unspun from the pool in LIFO order of
> > > their creation.
> >
> > I agree with Bill.  Having reviewed the code quite deeply yesterday, pool
> > cleanups follow a very clean rule, and registering a cleanup from within
> > a cleanup will always work if done correctly.  If you have data in a pool
>
> BZzzzt.  The attached code registers a cleanup from within a cleanup, and
> does so 'correctly'.  See the program attached at the bottom, which behaves
> incorrectly.  It is simple code, but not knowing that a given
> function registers a cleanup can cause major problems (leaking
> file descriptors, etc. eventually).  The file should contain 'Cleanup',
> because the cleanup of the file should flush the buffer -- that
> cleanup is never run, though.
>
> > when the cleanup is registered, it is gauranteed to be there when the
> > cleanup is run.
> >
> > Anything else is completely broken.

Sorry Jon, I wasn't clear.  I didn't mean if the cleanup was registered correctly,
I meant if the pool_cleanup code worked correctly.  I was trying to say that if
we fixed the bug that you pointed out the "right" way, then we are safe.

Ryan

______________________________________________________________
Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Mime
View raw message