From: John Spray Date: Thu, 8 Jun 2017 12:46:33 +0000 (-0400) Subject: mgr: drop PyModules::lock around module shutdown calls X-Git-Tag: v12.1.0~211^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=040e8cf306f2c4ae1315f8dcec0d498d4823340d;p=ceph.git 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 --- diff --git a/src/mgr/PyModules.cc b/src/mgr/PyModules.cc index b9596bb5f972..9f52a01f621c 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; }