From: Sage Weil Date: Tue, 1 Aug 2017 13:58:28 +0000 (-0400) Subject: osd: initialize shardedwq osdmap references on startup X-Git-Tag: ses5-milestone10~6^2^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F16535%2Fhead;p=ceph.git 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 --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 3e721e9bc984..e6eb9325be20 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();