uhd/mpm/python/usrp_mpm
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
..
chips uhd: mpm: update all license header w/ "-or-later" 2019-03-08 00:43:07 +01:00
cores cmake: Update coding style to use lowercase commands 2018-11-14 14:10:09 -08:00
dboard_manager mpm: Look for pca953x based devices by device/name 2020-06-11 10:39:05 -05:00
periph_manager fpga, mpm: Bump FPGA compat number 2020-07-24 15:24:14 -05:00
sys_utils mpm,mpmd: Add iface type and mtu info for UDP links 2020-07-16 10:00:12 -05:00
xports mpm: Don't index empty forwarding interface list 2020-07-24 15:24:14 -05:00
__init__.py mpm: Add __mpm_device__ as usrp_hwd module variable 2018-10-09 17:11:08 -07:00
aurora_control.py mpm: Update all license headers 2018-02-19 16:55:08 -08:00
bfrfs.py mpm: Update all license headers 2018-02-19 16:55:08 -08:00
bist.py mpm/mpmd: Expose APIs to drive GPIO sources 2020-01-23 11:37:51 -08:00
CMakeLists.txt uhd: remove liberio 2020-07-20 16:01:03 -05:00
components.py mpm: n3xx: Factor out component updating 2018-07-11 12:42:45 -07:00
discovery.py mpm: Fix some Pylint warnings 2018-03-06 15:45:15 -08:00
e31x_legacy_eeprom.py e310: Fix issues in MPM and UHD 2019-11-26 12:21:33 -08:00
eeprom.py mpm: Add MB-EEPROMv3 2019-05-10 16:59:58 -07:00
ethdispatch.py mpm: Add support for internal Ethernet interface 2020-07-16 10:00:12 -05:00
fpga_bit_to_bin.py mpm: Update all license headers 2018-02-19 16:55:08 -08:00
gpsd_iface.py mpm: e310: Enable GPS sensors 2019-11-26 12:21:34 -08:00
mpmlog.py mpm: Update all license headers 2018-02-19 16:55:08 -08:00
mpmtypes.py mpm: types: Add getters for dst_ep and dts_block to SID 2018-04-30 16:57:45 -07:00
mpmutils.py mpm: utils: print error on minor compat number mismatch conditionally 2020-07-13 15:22:59 -05:00
prefs.py docs: Add comments on mpm.conf 2020-07-09 00:39:11 -07:00
rpc_server.py mpm: Fix gevent errors on SIGTERM 2020-07-24 15:26:36 -05:00
test_bfrfs.py mpm: Update all license headers 2018-02-19 16:55:08 -08:00
user_eeprom.py mpm: Factor out user EEPROM code into own module 2018-12-20 14:57:54 -08:00