KeyError: <Thread(name_of_thread, stopped daemon 140519732250368)>
Hi,
ENV:
Ubuntu 20.04
Python 3.7.12 (44db26267d0a, Oct 24 2021, 14:21:50)
[PyPy 7.3.7 with GCC 7.3.1 20180303 (Red Hat 7.3.1-5)] on linux
We are running into KeyError
on one of the tests. Here is the stack trace. I am not sure what is happening here. I would really appreciate some help. To give more context, this is daemon thread that starts some background work and uses os.register_at_fork
hook to avoid the dead lock scenarios cause by fork+thread programs.
From thread 140519732250368 started by <bound method Thread._bootstrap of <Thread(name_of_thread, stopped daemon 140519732250368)>>:
Traceback (most recent call last):
File "/snap/pypy3/95/lib-python/3/threading.py", line 890, in _bootstrap
self._bootstrap_inner()
File "/snap/pypy3/95/lib-python/3/threading.py", line 918, in _bootstrap_inner
del _limbo[self]
KeyError: <Thread(name_of_thread, stopped daemon 140519732250368)>