From ecbb24505dc2662ecee9da1de95cf8f99dec0c9e Mon Sep 17 00:00:00 2001 From: Lars Amsel Date: Fri, 12 Feb 2021 17:16:53 +0100 Subject: 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`. --- mpm/python/usrp_mpm/rpc_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() -- cgit v1.2.3