[New-bugs-announce] [issue26037] Crash when reading sys.stdin.buffer in a daemon thread
eph
report at bugs.python.org
Thu Jan 7 07:43:44 EST 2016
New submission from eph :
I wrote a script to non-blocking reading binary data from stdin like this:
import sys, threading
def _thread():
data = sys.stdin.buffer.readline()
thread = threading.Thread(target=_thread)
thread.daemon = True
thread.start()
and the output is like this:
Fatal Python error: could not acquire lock for <_io.BufferedReader name='<stdin>'> at interpreter shutdown, possibly due to daemon threads
Thread 0x00007faf54ebf700 (most recent call first):
File "pipetcpadapter.py", line 8 in func
File "/usr/lib/python3.5/threading.py", line 862 in run
File "/usr/lib/python3.5/threading.py", line 914 in _bootstrap_inner
File "/usr/lib/python3.5/threading.py", line 882 in _bootstrap
Current thread 0x00007faf566da700 (most recent call first):
Aborted (core dumped)
----------
components: IO
messages: 257685
nosy: eph
priority: normal
severity: normal
status: open
title: Crash when reading sys.stdin.buffer in a daemon thread
type: crash
versions: Python 3.5
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26037>
_______________________________________
More information about the New-bugs-announce
mailing list