Bug #80402
closedMDS standby-replay crash in MDCache::handle_cache_rejoin_weak with FAILED ceph_assert(rejoin_gather.count(from)) during max_mds scaling
0%
Description
Description¶
An MDS daemon crashed with FAILED ceph_assert(rejoin_gather.count(from)) in MDCache::handle_cache_rejoin_weak() during CephFS bring-up while scaling max_mds from 1 to 3 with allow_standby_replay enabled and client IO starting on the filesystem.
The daemon was restarted automatically. The filesystem stayed available and no client errors were observed. Seen once in automated testing; hit rate unknown.
This is a different assertion in the same function as #54840 (mds->is_rejoin()).
Cluster shape¶
- two CephFS filesystems, each
max_mds=3 allow_standby_replay=true- 6 active + 6 standby-replay + 12 standby MDS daemons
mds_count_per_host=3- kernel and FUSE clients starting concurrent IO (fio, smallfile, fsstress, vdbench)
Crash¶
assert_condition: rejoin_gather.count(from) assert_func: void MDCache::handle_cache_rejoin_weak(ceph::cref_t<MMDSCacheRejoin>&) assert_file: src/mds/MDCache.cc ceph_version: 19.2.1 (squid)
Sanitized backtrace:
raise() abort() ceph::__ceph_assert_fail() MDCache::handle_cache_rejoin_weak() MDCache::dispatch() MDSRank::_dispatch() MDSRankDispatcher::ms_dispatch() MDSDaemon::ms_dispatch2() DispatchQueue::entry()
Crash dump sample:
{
"assert_condition": "rejoin_gather.count(from)",
"assert_file": "src/mds/MDCache.cc",
"assert_func": "void MDCache::handle_cache_rejoin_weak(ceph::cref_t<MMDSCacheRejoin>&)",
"assert_msg": "src/mds/MDCache.cc: FAILED ceph_assert(rejoin_gather.count(from))",
"assert_thread_name": "ms_dispatch",
"backtrace": [
"raise()",
"abort()",
"(ceph::__ceph_assert_fail(char const*, char const*, int, char const*))",
"(MDCache::handle_cache_rejoin_weak(boost::intrusive_ptr<MMDSCacheRejoin const> const&))",
"(MDCache::dispatch(boost::intrusive_ptr<Message const> const&))",
"(MDSRank::_dispatch(boost::intrusive_ptr<Message const> const&, bool))",
"(MDSRankDispatcher::ms_dispatch(boost::intrusive_ptr<Message const> const&))",
"(MDSDaemon::ms_dispatch2(boost::intrusive_ptr<Message> const&))",
"(DispatchQueue::entry())"
],
"ceph_version": "19.2.1",
"process_name": "ceph-mds"
}
How to reproduce¶
- Deploy a multi-MDS cluster with two CephFS filesystems.
- Set
max_mds=3andallow_standby_replay=trueon both filesystems (scale up from 1). - Mount CephFS with kernel and FUSE clients and start concurrent IO (fio, smallfile, fsstress, vdbench).
- Crash is observed on an MDS during the cache rejoin phase.
Actual result¶
MDS crashes in handle_cache_rejoin_weak() on ceph_assert(rejoin_gather.count(from)).
Expected result¶
No MDS crash while scaling max_mds and starting client IO.
Notes¶
rejoin_gather is the set of ranks from which a weak rejoin is still expected. For a recovering MDS it is filled in MDCache::rejoin_start() from recovery_set. For a survivor it is filled by MDCache::handle_mds_failure() when a peer goes down.
During max_mds scale-up a new rank can go standby -> creating -> active while existing ranks are already in recovery. That new survivor never saw those peers fail, so rejoin_gather can be empty even though recovery_set is not. When rejoin_joint_start() runs and an MMDSCacheRejoin::OP_WEAK arrives, the assert fires.
MDCache::set_recovery_set() updates recovery_set but does not copy it into rejoin_gather.
IG Updated by Igor Golikov 3 months ago
- Status changed from New to Fix Under Review
- Pull request ID set to 71644
VS Updated by Venky Shankar about 1 month ago
- Category set to Correctness/Safety
- Source set to other
- Backport set to umbrella,tentacle
- Component(FS) MDS added
- Labels (FS) crash, multimds added
UB Updated by Upkeep Bot 23 days ago
- Copied to Backport #82978: umbrella: MDS standby-replay crash in MDCache::handle_cache_rejoin_weak with FAILED ceph_assert(rejoin_gather.count(from)) during max_mds scaling added
UB Updated by Upkeep Bot 23 days ago
- Copied to Backport #82979: tentacle: MDS standby-replay crash in MDCache::handle_cache_rejoin_weak with FAILED ceph_assert(rejoin_gather.count(from)) during max_mds scaling added
UB Updated by Upkeep Bot 23 days ago
- Status changed from Fix Under Review to Backporting
- Merge Commit set to d9985e24af1f8e7698808919b323051004c61d31
- Fixed In set to v22.0.0-631-gd9985e24af
- Upkeep Timestamp set to 2026-11-10T09:53:49+00:00