From: Kefu Chai Date: Fri, 10 Jul 2026 06:17:12 +0000 (+0800) Subject: crimson/osd: start from `first` when older maps are trimmed X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ac4171291d2cd3bce913c3fb7a0a1c89d0d29bd4;p=ceph.git crimson/osd: start from `first` when older maps are trimmed _handle_osd_map() computes start = superblock.get_newest_map() + 1. A freshly created OSD has get_newest_map() == 0, so start stays 1. When such an OSD joins a cluster whose oldest map is already trimmed past epoch 1, the gap [start, first - 1] is entirely below the trim lower bound, so neither osdmap_subscribe guard above fires, and start stays 1. store_maps() then stores only [first..last], but committed_osd_maps() iterates from start=1 and calls get_local_map(1), which reads the never-stored osdmap.1, hits ENOENT, and aborts. The OSD crash-loops without ever activating a PG. Clamp start to first in that case: the maps below first are gone, and first is a full map, so it's a valid starting point. Classic OSD does the same unconditionally via start = std::max(superblock.get_newest_map() + 1, first). Signed-off-by: Kefu Chai --- diff --git a/src/crimson/osd/osd.cc b/src/crimson/osd/osd.cc index 791338db7ac..acc6f181511 100644 --- a/src/crimson/osd/osd.cc +++ b/src/crimson/osd/osd.cc @@ -1190,6 +1190,7 @@ seastar::future<> OSD::_handle_osd_map(Ref m) co_return co_await get_shard_services().osdmap_subscribe( m->cluster_osdmap_trim_lower_bound - 1, true); } + start = first; } ceph::os::Transaction t;