[New-bugs-announce] [issue27908] del _limbo[self] KeyError
Dima Tisnek
report at bugs.python.org
Wed Aug 31 03:27:39 EDT 2016
New submission from Dima Tisnek:
To reproduce:
```
import threading
import time
class U(threading.Thread):
def run(self):
time.sleep(1)
if not x.ident:
x.start()
x = U()
for u in [U() for i in range(10000)]: u.start()
time.sleep(10)
```
Chance to reproduce ~20% in my setup.
This script has a data race (check then act on x.ident).
I expected it to occasionally hit `RuntimeError: threads can only be started once`
Instead, I get:
```
Unhandled exception in thread started by <bound method Thread._bootstrap of <U(Thread-1, started 139798116361984)>>
Traceback (most recent call last):
File "/usr/lib64/python3.5/threading.py", line 882, in _bootstrap
self._bootstrap_inner()
File "/usr/lib64/python3.5/threading.py", line 906, in _bootstrap_inner
del _limbo[self]
KeyError: <U(Thread-1, started 139798116361984)>
```
----------
components: Library (Lib)
messages: 274005
nosy: Dima.Tisnek
priority: normal
severity: normal
status: open
title: del _limbo[self] KeyError
versions: Python 3.6
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27908>
_______________________________________
More information about the New-bugs-announce
mailing list