[Stackless] assert in schedule_task_destruct

Manley, Tom Tom.Manley at spectrumdsi.com
Thu May 7 17:00:21 CEST 2009


Hi,

We are hitting this assert in scheduling.c with a win32 debug build:

assert(ts->recursion_depth == 0 || ts->st.main == NULL && ts->st.current == NULL && prev == next);

We have tried both the release26-maint branch (assert is on line 1034) and the trunk (line 1037). This code will trigger the assert:

def InfiniteLoop(i):
    while 1:
        print "schedule", i

stackless.tasklet(InfiniteLoop)(1)
stackless.tasklet(InfiniteLoop)(2)

# The current main thread of execution counts as one running tasklet, so
# we know that if it is the only one remaining, we can exit.
while stackless.getruncount() != 1:
   t = stackless.run(1000)
   # If we got a tasklet back, it was the one that was interrupted.
   # we need to reinsert it for rescheduling.
   if t:
       t.insert()

The assert fires because ts->st.current is not NULL. This issue was also reported back in January (http://www.stackless.com/pipermail/stackless/2009-January/003838.html). It was mentioned in one of the replies that there was a fix but I haven't been able to find it. Is there a fix available? Or is it safe to comment out that part of the assert?

Thanks,
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stackless.com/pipermail/stackless/attachments/20090507/49a7fad1/attachment.htm>


More information about the Stackless mailing list