[Stackless] Segmentation fault when running example wsgi app in linux/win

OvermindDL1 overminddl1 at gmail.com
Thu Mar 11 23:03:09 CET 2010

-----Original Message-----
From: Kristján Valur Jónsson <kristjan at ccpgames.com>
Sent: Thursday, March 11, 2010 9:46 AM
To: The Stackless Python Mailing List <stackless at stackless.com>
Subject: Re: [Stackless] Segmentation fault when running example wsgi app in	linux/win

During finalize, orphaned tasklets may be killed.  And for them to be killed, they have to be woken up.
Something is breaking during this process.  gc is very dangerous territory.
I have seen this too but not been able to put my finger on it exactly.

I have experienced the *exact* same thing when embedding stackless python as a game mission scripting language (old game, BZ2, missions were C++ only before, stackless was awesome for this purpose).  But yes, during Py_Finalize it just crashes hard, and I am *certain* there are no tasklets still running, I managed everything very close.  I just worked around it by forcing my DLL to stay loaded and clean itself between missions and just never call Py_Finalize, but this was back with Python/Stackless 2.4 was brand new, so that bug has been around for a very long time.  As stated though, never bugged me as I just never called it.

More information about the Stackless mailing list