[Zope] Zope-killer: zSQL method that crashes Zope

Shane Hathaway shane@digicool.com
Thu, 20 Jul 2000 17:57:45 -0400


Chris Withers wrote:
> 
> Andy Gates wrote:
> > The poison SQL is this:
> >
> >         select (<dtml-var field>, field2)
> >         from tablename
> >         where (field1= <dtml-sqlvar parameter1 type=string>
> >                and <dtml-var field> <> '')
> >
> 
> Now I guess our code wasn't like this, but I do remember that we've had
> similar problems with lethal SQL methods that cause Zope to die silently
> and leave nothing in the logs.
> 
> However, our setup was quite different:
> 
> Zope 2.1.4-2.1.6, Redhat Linux, MySQL
> 
> The problem is that ZSQL Methods don't seem to be very robust, to the
> point of actualyl killing Zope rather than returning an exception.
> 
> I'd guess this is something that needs to be looked at but it's probabyl
> one of those bugs that's hideous to track down (ZCAtalog index bug
> anyone? ;-)

I have a strong suspicion that nearly all bugs like this are the result
of a stack overflow.  It may be worth the effort to either:

(1) Create a modified Python that would catch stack overflows before
they happen
(2) Get Zope running on microthreads/stackless Python (has anyone
tried?) and gain a little more control over the stacks.

Shane