]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr: drop PyModules::lock around module shutdown calls
authorJohn Spray <john.spray@redhat.com>
Thu, 8 Jun 2017 12:46:33 +0000 (08:46 -0400)
committerJohn Spray <john.spray@redhat.com>
Thu, 8 Jun 2017 14:03:55 +0000 (10:03 -0400)
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>
src/mgr/PyModules.cc

index b9596bb5f972f14d40a4ca8756d398d0d1799adf..9f52a01f621cb468844790e6f8ba0226cf968dbd 100644 (file)
@@ -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;
   }