[issue42717] The python interpreter crashed with "_enter_buffered_busy"

Steve Stagg report at bugs.python.org
Tue Dec 22 14:49:15 EST 2020


Steve Stagg <stestagg at gmail.com> added the comment:

Minimal test case:

====
import sys, threading

def run():
    for i in range(10000000):
        sys.stderr.write(' =.= ')

if __name__ == '__main__':
    threading.Thread(target=run, daemon=True).start()
===

I think this is expected behaviour.  My knowledge isn't complete here, but something similar to:

* During shutdown, the daemon threads are aborted
* In your example, the thread is very likely to be busy doing IO, so holding the io lock.
* The abort you're seeing is an explicit check/abort to avoid a deadlock (https://bugs.python.org/issue23309).

----------
nosy: +stestagg

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42717>
_______________________________________


More information about the Python-bugs-list mailing list