You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been tasked with integrating debugging via Pydev into an application consisting of multiple Python scripts being executed within a C++ process. Every script runs in its own Python interpreter instance. I am using PyDev 9.3.0 on Linux.
When the process enters a certain "shutdown" phase, all interpreters should be terminated by calling Py_EndInterpreter(). When Pydev is enabled, the process is aborted with the following error traceback:
Fatal Python error: Py_EndInterpreter: not the last thread
Python runtime state: initialized
Thread [...] (most recent call first):
File "[...]/pysrc/pydevd.py", line 2250 in __wait_for_threads_to_finish
File "[...]/pysrc/pydevd.py", line 2315 in dispose_and_kill_all_pydevd_threads
File "[...]/pysrc/pydevd.py", line 1768 in process_internal_commands
File "[...]/pysrc/pydevd.py", line 210 in _on_run
File "[...]/pysrc/_pydevd_bundle/pydevd_daemon_thread.py", line 49 in run
File "[...]/python3/lib/python3.10/threading.py", line 1009 in _bootstrap_inner
File "[...]/python3/lib/python3.10/threading.py", line 966 in _bootstrap
Thread [...] (most recent call first):
File "[...]/pysrc/_pydevd_bundle/pydevd_comm.py", line 219 in _read_line
File "[...]/pysrc/_pydevd_bundle/pydevd_comm.py", line 238 in _on_run
File "[...]/pysrc/_pydevd_bundle/pydevd_daemon_thread.py", line 49 in run
File "[...]/python3/lib/python3.10/threading.py", line 1009 in _bootstrap_inner
File "[...]/python3/lib/python3.10/threading.py", line 966 in _bootstrap
Though dispose_and_kill_all_pydevd_threads() is being executed, it looks like the ReaderThread and the PyDBCommandThread are not being closed. They are daemon threads - so they are only ended when the program exits.
Are there any workarounds in order to "gracefully shutdown" those threads anyway, or suggestions as to how this issue can be solved?
The text was updated successfully, but these errors were encountered:
Hello everyone!
I have been tasked with integrating debugging via Pydev into an application consisting of multiple Python scripts being executed within a C++ process. Every script runs in its own Python interpreter instance. I am using PyDev 9.3.0 on Linux.
When the process enters a certain "shutdown" phase, all interpreters should be terminated by calling
Py_EndInterpreter()
. When Pydev is enabled, the process is aborted with the following error traceback:Though
dispose_and_kill_all_pydevd_threads()
is being executed, it looks like theReaderThread
and thePyDBCommandThread
are not being closed. They are daemon threads - so they are only ended when the program exits.Are there any workarounds in order to "gracefully shutdown" those threads anyway, or suggestions as to how this issue can be solved?
The text was updated successfully, but these errors were encountered: