This is not likely to be a 3.3 issue, but a problem with all branches. The code that is trying to kill all tasklets on exit is incorrect when there are tasklets on other threads that need to be killed. I'll try to come up with a way to do this more nicely. K
> -----Original Message----- > From: [email protected] [mailto:stackless- > [email protected]] On Behalf Of Y. Sapir > Sent: 31. janúar 2013 22:48 > To: [email protected] > Subject: [Stackless] crash on exit while daemon thread is still running > > I'm running the 3.3-slp branch on Ubuntu 12.10. The script below gives me a > segfault. Is this a known problem? > > > import threading > import stackless > > chan = stackless.channel() > > def producer(): > while True: > chan.send(1) > > def consumer(): > while True: > chan.receive() > > def run_tasklet(func, iterations): > stackless.tasklet(func)() > for i in range(iterations): > stackless.run() > > thread = threading.Thread( > target=run_tasklet, > args=(producer, 1000000), > daemon=True) > thread.start() > > run_tasklet(consumer, 10) > > > And here's the stacktrace I get from gdb: > > #0 0xb7e43850 in slp_kill_tasks_with_stacks (ts=ts@entry=0x0) at > Stackless/core/stacklesseval.c:364 > #1 0xb7e4397a in PyStackless_kill_tasks_with_stacks > (allthreads=allthreads@entry=1) at Stackless/core/stacklesseval.c:397 > #2 0xb7e70f4a in Py_Finalize () at Python/pythonrun.c:506 > #3 Py_Finalize () at Python/pythonrun.c:485 > #4 0xb7e89e44 in Py_Main (argc=argc@entry=2, > argv=argv@entry=0x804b008) at Modules/main.c:761 > #5 0x080488a2 in main (argc=2, argv=0xbffff174) at ./Modules/python.c:66 > > > Thanks. > > _______________________________________________ > Stackless mailing list > [email protected] > http://www.stackless.com/mailman/listinfo/stackless _______________________________________________ Stackless mailing list [email protected] http://www.stackless.com/mailman/listinfo/stackless
