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 <john.spray@redhat.com>
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;
}