[Zope-dev] Zope crash in select_trigger
Anthony Baxter
Anthony Baxter <anthony@interlink.com.au>
Wed, 07 Nov 2001 23:10:26 +1100
One of the uglies we found was that an extension did a os.popen() or
suchlike, and the sigchild was getting delivered to the main thread -
this was hitting the select at a bad place and causing brokenness.
The patch we were using was something like the following (this is
against ZServer/medusa/asyncore.py)
hth,
Anthony
--- asyncore.py 2000/01/11 09:33:18 1.1
+++ asyncore.py 2000/05/18 03:48:19 1.2
@@ -52,7 +52,16 @@
if s.writable():
w.append (s)
=
- (r,w,e) =3D select.select (r,w,e, timeout)
+ try:
+ (r,w,e) =3D select.select (r,w,e, timeout)
+ # on solaris, something causes a signal to get here
+ # sometimes - sigpipe? sigchld? stupid truss doesn't
+ # say - so this is the approach we take. ow.
+ except KeyboardInterrupt:
+ raise # convenience when running interactively
+ except:
+ print "select interrupted!"
+ return
=
for x in r:
try:
>>> Andre Schubert wrote
> Hi,
> =
> I'am using DA's especially the ZPsycopgDA.
> We use our DB very much.
> We have change from ZPygres to ZPsycopg the last month, but the errors
> always occur.
> =
> question: do have any other problems with Zope-DAs, i had one with
> DB-Authentication???
> =
> thanks as
> =
> Dario Lopez-K=E4sten schrieb:
> > =
> > From: "Andre Schubert" <andre.schubert@geyer.kabeljournal.de>
> > > our Zope has the same problem, he dies unexpectly with Error-Code 1=
3.
> > > Can i use the pymalloc-hint for me... RedHat 6.2 Immunix and Zope 2=
=2E3.3
> > > and python 1.5.2.
> > =
> > the --without-pymalloc thing is only relevant to Python 2.1, IIRC, th=
us onl
y
> > if you use newr Zopes.
> > =
> > A question: you that are experiencing these problems, are you using d=
atabas
e
> > adapters?
> > if so, what adapters? How much do you make use of them?
> > =
> > > And are there some docs or how-tos about the pymalloc-hint??????
> > =
> > the INSTALL doc in the Python src has some info. I got help from Stev=
a A wh
o
> > pointed me in the right direction.
> > =
> > /dario
> > =
> > _______________________________________________
> > Zope-Dev maillist - Zope-Dev@zope.org
> > http://lists.zope.org/mailman/listinfo/zope-dev
> > ** No cross posts or HTML encoding! **
> > (Related lists -
> > http://lists.zope.org/mailman/listinfo/zope-announce
> > http://lists.zope.org/mailman/listinfo/zope )
> =
> _______________________________________________
> Zope-Dev maillist - Zope-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zope-dev
> ** No cross posts or HTML encoding! **
> (Related lists - =
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope )
> =
-- =
Anthony Baxter <anthony@interlink.com.au> =
It's never too late to have a happy childhood.