uhd/mpm/python
Samuel O'Brien 97852aba23 mpm: Fix gevent errors on SIGTERM
Sometimes when running usrp_hwd.py in a terminal and then canceling it
with Ctrl+C, it prints a really large stacktrace into the terminal
resulting from an uncaught gevent BlockingSwitchOutError. It seems like
there was an attempt to catch this in usrp_hwd.py:kill_time(). This
try-except was surrounding a call to Process.join() which, to the best
of my knowledge, can't ever throw this exception.

Based on my troubleshooting, this error comes from the SIGTERM signal
handler of the RPC process. The handler (defined in
rpc_server.py:_rpc_server_process), is just a direct call to
RPCServer.stop(). When the server's backed is a thread pool, this call
may block when joining the thread pool, causing gevent to complain about
execution attempting to block in a signal handler.

This commit resolves this issue by simply triggering an event in the
signal handler which prompts a different thread to clean up the server
and end the process.

Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
2020-07-24 15:26:36 -05:00
..
pyusrp_periphs Remove proto-RFNoC files 2019-11-26 12:16:25 -08:00
tests mpm: Make contextmanagers exception-safe 2020-03-03 15:16:06 -06:00
usrp_mpm mpm: Fix gevent errors on SIGTERM 2020-07-24 15:26:36 -05:00
aurora_bist_test.py
CMakeLists.txt mpm: cmake: removing unnecessary destination prefix 2019-07-17 11:44:47 -07:00
copy_python_module.cmake cmake: Update coding style to use lowercase commands 2018-11-14 14:10:09 -08:00
e320_bist mpm: e320/e310: Expose APIs to drive GPIO source via UHD 2020-01-23 11:37:51 -08:00
n3xx_bist mpm/mpmd: Expose APIs to drive GPIO sources 2020-01-23 11:37:51 -08:00
setup.py.in
socket_test.py
test_lmk.py
usrp_hwd.py mpm: Fix gevent errors on SIGTERM 2020-07-24 15:26:36 -05:00
usrp_update_fs mpm: Add usrp_update_fs 2018-10-09 17:11:08 -07:00