[Stackless] Destruction issue solved
tismer at stackless.com
Thu Jan 8 17:50:16 CET 2004
Giovanni Bajo wrote:
> Christian Tismer wrote:
>>>This enhancement fix it for me too. Thanks. I have one issue with
>>>this one, I am getting segmentation fault in the end (it runs my
>>>program way it should be). I will try to narrow down where it is
>>>coming from before sending you a small program which create this
>>I figured out that this was a bug with tasklets blocking
>>in a channel. They were not destructed correctly.
>>Also I had to enhance tasklet_clear to forget its
>>cstate's weak reference to the tasklet.
>>Corrected, uploaded new binaries.
> Does this fix my testcase as well? The one about tasklets holding objects with
> destructors being terminated through an exception?
Uh??? You didn't notice that? Ok, you don't read
stackless-checkins, and I should report more often what I'm doing.
Fixing your problem caused two new files checked into CVS
(bajo_crash.py and bajo_crash2.py), and I think I hacked
for three weeks only on that problem, Oct/Nov 2003.
This ended on 2003/11/13, when I finally ended up with
a rock-solid solution of killing tasklets, even in the
context of other tasklets being destroyed.
Later on, I started the huge change to remove f_tstate and
all cstack related fields from frames. They were moved into
the tasklets, instead. C stack structures were enhanced
to be able to track the taklet they belong to.
As a result, a dying thread will now automagically kill all
tasklets which have non-trivial C state from this thread.
This *should* ensure that there is no longer a chance to
attempt a jump to a tasklet with an invalid thread state.
cheers - chris
Christian Tismer :^) <mailto:tismer at stackless.com>
Mission Impossible 5oftware : Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a : *Starship* http://starship.python.net/
14109 Berlin : PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34 home +49 30 802 86 56 mobile +49 173 24 18 776
PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04
whom do you want to sponsor today? http://www.stackless.com/
Stackless mailing list
Stackless at stackless.com
More information about the Stackless