From: Xinze Chi Date: Wed, 4 May 2016 01:49:40 +0000 (+0800) Subject: OSD: fix deadlock in OSD::_committed_osd_maps X-Git-Tag: v10.2.2~33^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=64f15b3cfd15faa65e7a36c9779713ea2436cf16;p=ceph.git OSD: fix deadlock in OSD::_committed_osd_maps Fixes: http://tracker.ceph.com/issues/15701 Signed-off-by: Xinze Chi (cherry picked from commit 4fbf3891aab16347d02782f7c1c0400f9e0896af) --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 66aebb75e6bb..172a236d216d 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -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())