From: Vinayak Tiwari Date: Sun, 8 Feb 2026 08:24:29 +0000 (+0530) Subject: osd: avoid ceph_abort in build_incremental_map_msg when newest_map is missing X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F67253%2Fhead;p=ceph.git osd: avoid ceph_abort in build_incremental_map_msg when newest_map is missing When sharing OSD maps with a peer (e.g. during heartbeat in maybe_share_map), we may have already trimmed the requested range or newest_map (e.g. trim race, or store read failure). In that case the panic path tried to send newest_map; if it could not be loaded, the code called ceph_abort() and crashed the OSD. Log and return an empty MOSDMap instead of aborting. The receiver drops such messages (last <= superblock.get_newest_map()) and can re-request from the mon. Fixes: https://tracker.ceph.com/issues/74800 Signed-off-by: Vinayak Tiwari --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index e3b5641a248a..37ac2b52effe 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -1474,18 +1474,17 @@ MOSDMap *OSDService::build_incremental_map_msg(epoch_t since, epoch_t to, // send what we have so far return m; } - // send something + // send something if we can bufferlist bl; if (get_inc_map_bl(m->newest_map, bl)) { m->incremental_maps[m->newest_map] = std::move(bl); - } else { - derr << __func__ << " unable to load latest map " << m->newest_map << dendl; - if (!get_map_bl(m->newest_map, bl)) { - derr << __func__ << " unable to load latest full map " << m->newest_map - << dendl; - ceph_abort(); - } + } else if (get_map_bl(m->newest_map, bl)) { m->maps[m->newest_map] = std::move(bl); + } else { + derr << __func__ << " unable to load latest map " << m->newest_map + << ", sending empty map message (peer will drop or re-request from mon)" + << dendl; + } return m; }