From 37961c6be885704639e3fd9b19321287c61bc4d2 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 20 Jan 2019 13:05:26 +0800 Subject: [PATCH] osd: unmount store after service.shutdown() in service.shutdown(), the store's cache is accessed, so we need to destroy the store after service.shutdown() Fixes: http://tracker.ceph.com/issues/37975 Signed-off-by: Kefu Chai --- src/osd/OSD.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 0444aab500a8f..439003826c91d 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -3859,11 +3859,6 @@ int OSD::shutdown() store->flush_journal(); } - store->umount(); - delete store; - store = 0; - dout(10) << "Store synced" << dendl; - monc->shutdown(); osd_lock.Unlock(); @@ -3873,6 +3868,13 @@ int OSD::shutdown() s->shard_osdmap = OSDMapRef(); } service.shutdown(); + + std::lock_guard lock(osd_lock); + store->umount(); + delete store; + store = nullptr; + dout(10) << "Store synced" << dendl; + op_tracker.on_shutdown(); class_handler->shutdown(); -- 2.39.5