[Zope-dev] Zope Server hanging :-(

Dieter Maurer dieter@handshake.de
Wed, 6 Jun 2001 01:11:34 +0200 (CEST)


 > Erik Enge wrote:
 > > On Sun, 29 Apr 2001, Erik Enge wrote:
 > > I figured it out, I think.  Let's say I have these two methods:
 > > 
 > >  def a():
 > >         b()
 > > 
 > >  def b():
 > >         a()
 > > 
 > > If I call a(), then Zope dies and restarts without giving me any error
 > > at all.  Anyone got a clue?
This is an infinite recursion.

I once had such a situation.

   Usually Python protects itself against such recursions by limiting
   the depth of its runtime stack. It raises a "RuntimeError: runtime
   stack limit exceeded" when its stack overflows.

   But in my case, the thread's runtime stack (maintained
   by the C runtime not Python) was more limited
   than the Python stack limit. When the thread's stack overflew,
   the process was killed by Solaris.
   Python did not have any chance to raise an exception
   as the death was immediate.


We may need to ask the Python maintainers to increase the
thread stack size or to more severely restrict the
Python runtime stack.


Dieter