httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <mt...@apache.org>
Subject Re: Events, Destruction and Locking
Date Tue, 07 Jul 2009 05:56:53 GMT
Paul Querna wrote:
> Can't sleep, so finally writing this email I've been meaning to write
> for about 7 months now :D
> 
> Pools don't help, but don't really make it worse, and are good enough
> for the actual cleanup part -- the difficultly lies in knowing *when*
> you can cleanup an object.
>

Pool pre cleanup is meant to deal with such issues.
You register a pre-cleanup and it will run before any of the
pool objects are actually destroyed.

In your case pre-cleanup callback could break the wait loop
and make sure you don't reference a zombie object.
The only issue left is guarding thread access to a singleton
pollset interrupt (we even have pollset_interrupt with latest APR)
from a pre-cleanup callback (or simply using a queue to serialize
the objects that needs to get removed from the pollset)

The exact problem we have/had with Tomcat native where shutting
down the server can lead to JVM crash in case the connections
are still in the pool waiting for the network event to happen.


Regards
-- 
^(TM)

Mime
View raw message