]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
OSD: fix deadlock in OSD::_committed_osd_maps 9103/head
authorXinze Chi <xinze@xsky.com>
Wed, 4 May 2016 01:49:40 +0000 (09:49 +0800)
committerAbhishek Varshney <abhishek.varshney@flipkart.com>
Wed, 8 Jun 2016 09:36:08 +0000 (15:06 +0530)
Fixes: http://tracker.ceph.com/issues/15701
Signed-off-by: Xinze Chi <xinze@xsky.com>
(cherry picked from commit 4fbf3891aab16347d02782f7c1c0400f9e0896af)

src/osd/OSD.cc

index 66aebb75e6bb77f92347178d5924f352d5b49e42..172a236d216d2896513f8792a46a9c894e65b61e 100644 (file)
@@ -6993,9 +6993,9 @@ void OSD::_committed_osd_maps(epoch_t first, epoch_t last, MOSDMap *m)
         failure_pending.erase(it++);
       }
     }
-    osd_lock.Unlock();
-    shutdown();
-    osd_lock.Lock();
+    // trigger shutdown in a different thread
+    dout(0) << __func__ << " shutdown OSD via async signal" << dendl;
+    queue_async_signal(SIGINT);
   }
   else if (is_preboot()) {
     if (m->get_source().is_mon())