From 040e8cf306f2c4ae1315f8dcec0d498d4823340d Mon Sep 17 00:00:00 2001 From: John Spray Date: Thu, 8 Jun 2017 08:46:33 -0400 Subject: [PATCH] mgr: drop PyModules::lock around module shutdown calls This deadlocked if the module's shutdown call was trying to take a pythonland lock that was held by a thread that was in turn trying to call into C++ land and take PyModules::lock. Signed-off-by: John Spray --- src/mgr/PyModules.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mgr/PyModules.cc b/src/mgr/PyModules.cc index b9596bb5f97..9f52a01f621 100644 --- a/src/mgr/PyModules.cc +++ b/src/mgr/PyModules.cc @@ -433,7 +433,9 @@ void PyModules::shutdown() auto module = i.second.get(); const auto& name = i.first; dout(10) << "waiting for module " << name << " to shutdown" << dendl; + lock.Unlock(); module->shutdown(); + lock.Lock(); dout(10) << "module " << name << " shutdown" << dendl; } -- 2.39.5