Bug #79574
closedmon crash: OSDMap.h: 1435: FAILED ceph_assert(i != pool_name.end())
0%
Description
Any error return in prepare_new_pool() after the new pool has been inserted into pending_inc.new_pools and pending_inc.new_pool_max has been incremented, but before pending_inc.new_pool_names is set, leaves pending_inc in an inconsistent state: the pool ID is present in new_pools but absent from new_pool_names.
On the next encode_pending() call, apply_incremental() adds the unnamed pool to tmp.pools but not to tmp.pool_name. check_health() then iterates pools and calls get_pool_name() on the unnamed ID, hitting ceph_assert(i != pool_name.end()) and crashing the monitor.
I think we can fix by adding an abort_pool lambda that erases the pool from pending_inc.new_pools and decrements pending_inc.new_pool_max. This lambda can be called before every error return between the pool allocation and the new_pool_names assignment.
JP Updated by Jamie Pryde 4 months ago
Recipe on a crimson vstart cluster:
ceph osd erasure-code-profile set clay_profile plugin=clay k=4 m=2 d=5
ceph config set mon osd_pool_default_crimson true
ceph osd pool create bad_ec_pool erasure clay_profile <--- Fails and injects error state
ceph osd pool create crimson_data 32 32 replicated <--- Crashes the monitor
JP Updated by Jamie Pryde 4 months ago
- Pull request ID set to 71130
PD Updated by Patrick Donnelly 3 months ago
- Status changed from New to Fix Under Review
- Target version set to v22.0.0
- Backport set to umbrella,tentacle,squid
UB Updated by Upkeep Bot 28 days ago
- Copied to Backport #82697: tentacle: mon crash: OSDMap.h: 1435: FAILED ceph_assert(i != pool_name.end()) added
UB Updated by Upkeep Bot 28 days ago
- Copied to Backport #82698: umbrella: mon crash: OSDMap.h: 1435: FAILED ceph_assert(i != pool_name.end()) added
UB Updated by Upkeep Bot 28 days ago
- Copied to Backport #82699: squid: mon crash: OSDMap.h: 1435: FAILED ceph_assert(i != pool_name.end()) added
UB Updated by Upkeep Bot 28 days ago
- Status changed from Fix Under Review to Backporting
- Merge Commit set to 46873b8e7681b1ea428cfdb3fd04f9b30dc2d4c0
- Fixed In set to v22.0.0-457-g46873b8e76
- Upkeep Timestamp set to 2026-11-04T22:24:28+00:00