From c3aa866dcaf3014993167c75412591dba231f9cc Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 1 Aug 2017 09:58:28 -0400 Subject: [PATCH] osd: initialize shardedwq osdmap references on startup The _process methods assumes the shard osdmap refs are non-null, but that leaves a window between startup and the first call to prune_pg_waiters (via consume_map()), which can lead to a seg fault. Calling prune during startup, before we have any work, will initialize those references. Fixes: http://tracker.ceph.com/issues/20748 Signed-off-by: Sage Weil --- src/osd/OSD.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 3e721e9bc9843..e6eb9325be20d 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -2515,6 +2515,9 @@ int OSD::init() clear_temp_objects(); + // initialize osdmap references in sharded wq + op_shardedwq.prune_pg_waiters(osdmap, whoami); + // load up pgs (as they previously existed) load_pgs(); -- 2.39.5