[Zope-Coders] Signal forwarding

Toby Dickenson tdickenson@geminidataloggers.com
Thu, 10 Oct 2002 09:41:30 +0100


On Thursday 10 Oct 2002 2:51 am, Chris McDonough wrote:
> On Wed, 2002-10-09 at 21:59, Jeremy Hylton wrote:
> >   CM> What would cause the method to not finish?  It's running in a
> >   CM> separate thread, no?  Is its execution held up as a result of
> >   CM> the signal?
> >
> > It's just a question of luck.  What if the thread that holds the lock
> > is also the thread that runs the signal handler?  That thread can't
> > wait fot itself.
>
> The thread that handles the signal is always the main thread.  The main
> thread never handles any ZODB functions (its tied up in asyncore).

Not quite always. The main thread definitely performs some ZODB work duri=
ng=20
startup.=20

I wouldnt be suprised if some bugs could cause per-transaction ZODB work =
to=20
leak into that thread too. Im sure you would have to be creative to find =
a=20
workable exploit.... Something along the lines of=20
RESPONSE.write(some_persistent_object_not_yet_loaded) might do it.

Yes, all of those would be bugs that could cause Zope to terminate. Thats=
=20
still not as bad as a deadlock.