[Stackless] web.py

Matt Provost mprovost at termcap.net
Thu Jun 21 12:06:52 CEST 2007

On Thu, Jun 21, 2007 at 08:10:54AM +0000, Richard Tew wrote:
> On 6/21/07, Matt Provost <mprovost at termcap.net> wrote:
> > Has anyone gotten stackless to work with web.py? I'm trying to port some
> > CGIs over but it either segfaults or just hangs. Monkeypatching
> > stacklesssocket was causing problems but I think I fixed that (you have
> > to add:
> > fromfd = stdsocket.fromfd
> > getfqdn = stdsocket.getfqdn
> > to stacklesssocket).
> Ah, yes.  Will try and remember to add those, thanks.
> > Running some simple test scripts with tasklets works ok but some of my
> > more complicated programs fail so I'm not sure exactly where the problem
> > is. It looks like I call stackless.run() and that's the last I hear from
> > it.
> >
> > Looking at one of the core dumps it seems like it's looping trying to
> > kill a tasklet maybe:
> > #262061 0x080c809e in impl_tasklet_kill (task=0xb7976994) at Stackless/module/taskletobject.c:961
> > #262062 0x080c70a9 in tasklet_clear (t=0xb7976994) at Stackless/module/taskletobject.c:943
> ...
> > Segmentation fault (core dumped)
> >
> > That's the longest backtrace I've ever seen; the final coredump is gdb
> > dying. It all looks the same, just alternating between those two calls.
> What version of Stackless are you running?  Is this on Windows, MacOS
> or what?  Did you compile it yourself?  Where did you obtain the source
> code from?  Was it from the release25 branch or from the release25 tag,
> one of the 2.4.x branches, the trunk?

Python 2.5 Stackless 3.1b3 060516 (python-2.5:51933, Mar 29 2007, 21:21:10) 
[GCC 3.4.3 20050227 (Red Hat 3.4.3-22.1)] on linux2

I have a custom compile to fix the issue with send_sequence not pickling,
but I assume that made it into the 2.5.1 release so I'll upgrade to that

> To be honest, I would hazard a guess and assume the fact that the
> call stack claims tasklet_clear is on line 943 is an indication of problems
> with the version you compiled.  It gets impl_tasklet_kill right.  Do the
> Python unit tests and the Stackless unit tests all pass for you?
> Stackless when working on different platforms is pretty reliable in having
> the same bugs reproducible on whichever one is involved.  The best
> scenario would be you being able to provide a reproducibility case.

Yes I'll make sure I have everything up to date including
stacklesssocket and try to isolate which specific code is causing this
problem (or maybe it will go away!). I just thought I'd check and see if
anyone else had similar problems or tales of success before I got too


Stackless mailing list
Stackless at stackless.com

More information about the Stackless mailing list