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
As soon as the server starts, the main thread runs and exits immediately (main call) leaving the child threads (handlers) running in an orphan state.
This can have several consequences, including resource leakage (orphan threads may continue to consume system resources, leading to potential performance degradation) and unpredictable behavior (the behavior of orphan threads can be unpredictable since they are no longer under the control of their parent). In specific, one of the issues can be unhandled thread exceptions, as demonstrated in the section that follows.
Reproduce
Run locally:
python3 s2s_pipeline.py --recv_host 0.0.0.0 --send_host 0.0.0.0 # wait for server to start..
python3 listen_and_play.py
kill -2 <server_PID> # send KeyboardInterrupt to server
# Press Enter in client session to terminate client
# Exception message is shown in the server session
The script above will cause the following error:
....
... - connections.socket_sender - INFO - Sender waiting to be connected...
... - connections.socket_receiver - INFO - receiver connected
... - connections.socket_sender - INFO - sender connected
Exception ignored in: <module 'threading' from '/usr/lib/python3.10/threading.py'>
Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 1567, in _shutdown
lock.acquire()
KeyboardInterrupt:
Implementation as well as a description of the fix can be found in pull request #138 .
The text was updated successfully, but these errors were encountered:
Description
As soon as the server starts, the main thread runs and exits immediately (main call) leaving the child threads (handlers) running in an orphan state.
This can have several consequences, including resource leakage (orphan threads may continue to consume system resources, leading to potential performance degradation) and unpredictable behavior (the behavior of orphan threads can be unpredictable since they are no longer under the control of their parent). In specific, one of the issues can be unhandled thread exceptions, as demonstrated in the section that follows.
Reproduce
Run locally:
python3 s2s_pipeline.py --recv_host 0.0.0.0 --send_host 0.0.0.0 # wait for server to start..
python3 listen_and_play.py
kill -2 <server_PID> # send KeyboardInterrupt to server
# Press Enter in client session to terminate client
# Exception message is shown in the server session
The script above will cause the following error:
Implementation as well as a description of the fix can be found in pull request #138 .
The text was updated successfully, but these errors were encountered: