[Stackless] crash on exit while daemon thread is still running
Y. Sapir
yasapir at gmail.com
Thu Jan 31 23:47:59 CET 2013
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 at entry=0x0) at
Stackless/core/stacklesseval.c:364
#1 0xb7e4397a in PyStackless_kill_tasks_with_stacks
(allthreads=allthreads at 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 at entry=2,
argv=argv at entry=0x804b008) at Modules/main.c:761
#5 0x080488a2 in main (argc=2, argv=0xbffff174) at ./Modules/python.c:66
Thanks.
More information about the Stackless
mailing list