apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: apr_pool_clear fails if the cleanup handler is still running
Date Wed, 28 Jan 2004 21:57:24 GMT
Joe Orton wrote:
> On Sun, Jan 25, 2004 at 12:46:02PM -0800, Stas Bekman wrote:
> 
>>http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23238
> 
> ...
> 
>>Shouldn't apr_pool_clear set to ignore SIGTERMs and restore the handler at 
>>the end of its run? I suppose this will lose the signal if it's coming in 
>>the middle of clear run. So may be a handler that will remember that the 
>>signal was sent and then re-throw it once clear is done?
>>
>>But it's more than that. What if apr_pool_clear hasn't even started yet 
>>when SIGTERM has arrived? In this case we deterministically lose all 
>>cleanup functionality.
> 
> 
> Yes - really, it's wrong to try and solve this in APR... the caller
> should assume that no interfaces in APR are async-signal-safe since none
> are documented to be so.  The only way of getting well-defined behaviour
> outside APR would be to implement a "grafeful shutdown" in httpd as Colm
> has proposed.

Thanks for the follow up, Joe!

It doesn't seem like people are very excited about Colm's proposal. ;(

I guess I should at least document that pool cleanups and server shut-down 
don't go together. Which renders pool cleanups in apache as totally 
unreliable, and shouldn't be used for anything crucial.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Mime
View raw message