aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python
diff options
context:
space:
mode:
authorLars Amsel <lars.amsel@ni.com>2021-02-12 17:16:53 +0100
committerAaron Rossetto <aaron.rossetto@ni.com>2021-02-18 07:26:05 -0600
commitecbb24505dc2662ecee9da1de95cf8f99dec0c9e (patch)
treec0cdb26f1d56a485677c07f50ea0471aefc36f79 /mpm/python
parent91073787b1a292d038bf1bd4d460aa8ddcfc8b16 (diff)
downloaduhd-ecbb24505dc2662ecee9da1de95cf8f99dec0c9e.tar.gz
uhd-ecbb24505dc2662ecee9da1de95cf8f99dec0c9e.tar.bz2
uhd-ecbb24505dc2662ecee9da1de95cf8f99dec0c9e.zip
MPM: prevent dead lock in timer kill during unclaim
MPM server needs to be reclaimed in regular intervals. This is monitored by the server using a timer. If the timer hits, the server unclaims itself assuming the client process died for whatever reason. In previous versions of `gevent.greenlet` the timer was killed in a non blocking manner. This changed in version 0.13.0 (see http://www.gevent.org/api/gevent.greenlet.html#gevent.Greenlet.kill) which now leads to a dead lock in `timer.kill`. The kill command is therefore now called explicitly with `block=False`.
Diffstat (limited to 'mpm/python')
-rw-r--r--mpm/python/usrp_mpm/rpc_server.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mpm/python/usrp_mpm/rpc_server.py b/mpm/python/usrp_mpm/rpc_server.py
index f1d2620f5..de4989fbc 100644
--- a/mpm/python/usrp_mpm/rpc_server.py
+++ b/mpm/python/usrp_mpm/rpc_server.py
@@ -340,7 +340,7 @@ class MPMServer(RPCServer):
"Deinitializing device and releasing claim on session `{}'"
.format(self.session_id))
# Disable unclaim timer, we're now finished with reclaim loops.
- self._timer.kill()
+ self._timer.kill(block=False)
# We might need to clear the method registry
if self.periph_manager.clear_rpc_registry_on_unclaim:
self.clear_method_registry()