Repository navigation
mds: populate rejoin_gather for newly active ranks - #71644
Conversation
|
lets call: R = recovering rank and N = new rank so basically R's old daemon failed and its new replacement was already promoted to R when N was still creating therefore the last mdsmap N processed (oldmap) already contained the replacement i.e. the oldmap's info.inc and the current mdsmap's info.inc are the same and since this rank is not down -- none of the |
|
@salieri11 this makes sense to me, looks good. Is a test case possible for this? a test case can be timed where basically you start the new mds when the recovering rank's new incarnation has already been promoted to that rank my mon? i think once the new rank sees that it's old mdsmap and the current one has both the inc's same for this recovering rank, it will be reproduced, right? |
vshankar
left a comment
There was a problem hiding this comment.
Good work in identifying the cause @salieri11
The changes in active_start() and set_recovery_set() isn't required since those changes do no fix the crash.
80d433f to
0eb7c78
Compare
|
@vshankar thanks for the review, all comments has been addressed |
A rank that goes creating -> active during max_mds scale-up never observes peer failures, so rejoin_gather stays empty while recovery_set is not. OP_WEAK then hits ceph_assert(rejoin_gather.count(from)). Grow gather from set_recovery_set and the survivor rejoin send path, refresh the recovery set at joint start, and add or ignore a missing sender instead of crashing. Fixes: https://tracker.ceph.com/issues/80402 Related-to: https://tracker.ceph.com/issues/54840 Signed-off-by: Igor Golikov <[email protected]>
Do not re-insert a rank into rejoin_gather after its OP_WEAK was already applied when a delayed rejoin_send_rejoins() retries. Drop gather updates from set_recovery_set() and active_start(); they do not fix the crash and can wait on peers that will never send again. Fixes: https://tracker.ceph.com/issues/80402 Related-to: https://tracker.ceph.com/issues/54840 Signed-off-by: Igor Golikov <[email protected]>
A second weak rejoin from a rank still in replay..rejoin is no longer in rejoin_gather, so handle_cache_rejoin_weak() applied it again. Skip senders already recorded in rejoin_weak_applied. handle_mds_failure() clears that bit when a new rejoin is required. Fixes: https://tracker.ceph.com/issues/80402 Signed-off-by: Venky Shankar <[email protected]>
OP_STRONG is sent only by a clientreplay, active, or stopping rank. Dropping it when the local map does not show that state yet loses the ack, because rejoin_sent prevents a resend. The same drop in handle_cache_rejoin_weak() loses the ack for a sender outside replay..rejoin. Wait for the next mdsmap and retry. Fixes: https://tracker.ceph.com/issues/80402 Signed-off-by: Venky Shankar <[email protected]>
Hold a new rank in creating while a peer fails over into replay, then let it become active before that peer leaves replay. OP_WEAK then reaches a survivor that never ran handle_mds_failure(). Fixes: https://tracker.ceph.com/issues/80402 Signed-off-by: Venky Shankar <[email protected]>
0eb7c78 to
d587b44
Compare
|
@salieri11 - most changes looks good. I added a couple of commits on top that fix another case that could lead to the MDS crash and a test reproducer. 2026-11-04T05:16:23.273 INFO:tasks.ceph.mds.c.trial056.stderr:/ceph/rpmbuild/BUILD/ceph-22.0.0-186-gf7ffd047/src/mds/MDCache.cc: 4698: FAILED ceph_assert(rejoin_gather.count(from)) 2026-11-04T05:16:23.273 INFO:tasks.ceph.mds.c.trial056.stderr: ceph version 22.0.0-186-gf7ffd047 (f7ffd047eb2b401f7b4c3e7a2188e6933af38fb4) vampire (dev - RelWithDebInfo) 2026-11-04T05:16:23.273 INFO:tasks.ceph.mds.c.trial056.stderr: 1: (ceph::__ceph_assert_fail(char const*, char const*, int, char const*)+0x12f) [0x7fe65ff96a61] 2026-11-04T05:16:23.273 INFO:tasks.ceph.mds.c.trial056.stderr: 2: ceph-mds() [0x4add6a] 2026-11-04T05:16:23.273 INFO:tasks.ceph.mds.c.trial056.stderr: 3: (MDCache::dispatch(boost::intrusive_ptr const&)+0x19a) [0x692a6a] 2026-11-04T05:16:23.273 INFO:tasks.ceph.mds.c.trial056.stderr: 4: (MDSRank::handle_message(boost::intrusive_ptr const&)+0x152) [0x528a52] 2026-11-04T05:16:23.273 INFO:tasks.ceph.mds.c.trial056.stderr: 5: (MDSRank::_dispatch(boost::intrusive_ptr const&, bool)+0x543) [0x52acf3] 2026-11-04T05:16:23.273 INFO:tasks.ceph.mds.c.trial056.stderr: 6: (MDSRankDispatcher::ms_dispatch(boost::intrusive_ptr const&)+0x55) [0x52b125] 2026-11-04T05:16:23.273 INFO:tasks.ceph.mds.c.trial056.stderr: 7: (MDSDaemon::ms_dispatch2(boost::intrusive_ptr const&)+0x13c) [0x517e2c] 2026-11-04T05:16:23.273 INFO:tasks.ceph.mds.c.trial056.stderr: 8: (DispatchQueue::entry()+0x4a8) [0x7fe6601fb6f8] 2026-11-04T05:16:23.273 INFO:tasks.ceph.mds.c.trial056.stderr: 9: /usr/lib64/ceph/libceph-common.so.2(+0x489f61) [0x7fe660289f61] 2026-11-04T05:16:23.273 INFO:tasks.ceph.mds.c.trial056.stderr: 10: /lib64/libc.so.6(+0x8b569) [0x7fe65f48b569] 2026-11-04T05:16:23.274 INFO:tasks.ceph.mds.c.trial056.stderr: 11: /lib64/libc.so.6(+0x110760) [0x7fe65f510760] With the fix: https://pulpito.ceph.com/vshankar-2026-11-04_05:02:02-fs:functional-wip-80402-distro-default-trial/709720/ (PASS) |
|
@salieri11 - once you ack the additional changes, I will run it through fs suite test. |
|
@vshankar LGTM, thanks for handling it! |
xiubli
left a comment
There was a problem hiding this comment.
Tested locally with vstart_runner and reproduced in base and this PR fixed it. LGTM. Thanks.
|
Thanks for the review folks. Appreciate it! |
|
This PR has been added to main integration testing by vshankar started 2026-11-06-10:30. |
A rank that goes creating -> active during max_mds scale-up never observes peer failures, so rejoin_gather stays empty while recovery_set is not. OP_WEAK then hits ceph_assert(rejoin_gather.count(from)). Grow gather from set_recovery_set and the survivor rejoin send path, refresh the recovery set at joint start, and add or ignore a missing sender instead of crashing.
Fixes: https://tracker.ceph.com/issues/80402
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.