New submission from Stanisław Skonieczny (Uosiu) <stanislaw.skoniec...@gmail.com>:
Sometimes when thread is starting it raises "RuntimeError: release unlocked lock". That is when signal handler is invoked in the same time. Traceback (most recent call last): File "/usr/lib/python3.6/threading.py", line 551, in wait signaled = self._cond.wait(timeout) File "/usr/lib/python3.6/threading.py", line 304, in wait self._acquire_restore(saved_state) File "start_threads.py", line 12, in sighandler raise MyException("got signal") __main__.MyException: got signal During handling of the above exception, another exception occurred: Traceback (most recent call last): File "start_threads.py", line 28, in <module> thread.start() File "/usr/lib/python3.6/threading.py", line 851, in start self._started.wait() File "/usr/lib/python3.6/threading.py", line 552, in wait return signaled File "/usr/lib/python3.6/threading.py", line 243, in __exit__ return self._lock.__exit__(*args) RuntimeError: release unlocked lock I have attached to files that reproduce the problem. First runs python and starts noop threads in the loop. It uses signal handler that raises exception. Second is a bash script to run python script and send signal to it. After some time, when signal is handled in unfortunate place, python script breaks due to unreleased lock. ---------- components: Library (Lib) files: start_threads.py messages: 323998 nosy: Stanisław Skonieczny (Uosiu) priority: normal severity: normal status: open title: "RuntimeError: release unlocked lock" when starting a thread versions: Python 3.6 Added file: https://bugs.python.org/file47761/start_threads.py _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34486> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com