[issue20526] python: Modules/gcmodule.c:379: visit_decref: Assertion `((gc)->gc.gc_refs >> (1)) != 0' failed.
STINNER Victor
report at bugs.python.org
Tue Feb 11 18:30:49 CET 2014
STINNER Victor added the comment:
At the first CTRL+c, the main thread exit and enters Py_Finalize() which calls wait_for_thread_shutdown() (in Python: threading._shutdown()).
The problem is that the second call interrupted threading._shutdown() (still in the main thread).
> #9 0x000000000043d1d5 in PyGC_Collect () at Modules/gcmodule.c:1604
> #10 0x000000000041e959 in Py_Finalize () at Python/pythonrun.c:605
At this point, we can expect that only one Python thread is running because wait_for_thread_shutdown() has been called, but there are between 2 and 9 running Python threads.
If wait_for_thread_shutdown() is interrupted, maybe Python should kill all other threads with pthread_kill() or something like that.
Or wait_for_thread_shutdown() should maybe block SIGINT and SIGTERM signals using pthread_sigmark()?
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20526>
_______________________________________
More information about the Python-bugs-list
mailing list