]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd-mirror: assertion failure during pool replayer shut down 16704/head
authorJason Dillaman <dillaman@redhat.com>
Mon, 31 Jul 2017 14:20:02 +0000 (10:20 -0400)
committerJason Dillaman <dillaman@redhat.com>
Mon, 31 Jul 2017 14:20:02 +0000 (10:20 -0400)
Fixes: http://tracker.ceph.com/issues/20644
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/tools/rbd_mirror/PoolReplayer.cc

index fd0b21b1847d84fa67b84a5e1c4b3186d09444c7..34b679a83f87f0cc66721a9f68330d036a42a253 100644 (file)
@@ -357,12 +357,15 @@ void PoolReplayer::shut_down() {
   }
   if (m_leader_watcher) {
     m_leader_watcher->shut_down();
+    m_leader_watcher.reset();
   }
   if (m_instance_watcher) {
     m_instance_watcher->shut_down();
+    m_instance_watcher.reset();
   }
   if (m_instance_replayer) {
     m_instance_replayer->shut_down();
+    m_instance_replayer.reset();
   }
 
   assert(!m_local_pool_watcher);
@@ -471,7 +474,9 @@ void PoolReplayer::run()
       break;
     }
 
-    m_cond.WaitInterval(m_lock, utime_t(1, 0));
+    if (!m_stopping) {
+      m_cond.WaitInterval(m_lock, utime_t(1, 0));
+    }
   }
 }