Repository navigation
squid: mds: fix crash and shutdown hang when ephemeral pins active and max_mds is 0 - #69485
Merged
Merged
Conversation
Contributor
Author
|
jenkins test make check |
2 similar comments
Contributor
Author
|
jenkins test make check |
Contributor
Author
|
jenkins test make check |
vshankar
force-pushed
the
wip-77259-squid
branch
from
June 19, 2026 04:04
d3a56c1 to
f587c22
Compare
Contributor
Author
|
jenkins test make check |
Contributor
Author
|
jenkins retest this please |
Member
|
@vshankar Please rebase and push? |
vshankar
force-pushed
the
wip-77259-squid
branch
from
June 26, 2026 04:51
f587c22 to
0e8d825
Compare
Contributor
Author
Done. |
Contributor
Author
|
jenkins retest this please |
Contributor
Author
|
jenkins retest this please |
Contributor
|
This PR has been added to wip-yuri7-testing-20261007.155121-squid. |
Contributor
Author
|
Reviewed-by: Venky Shankar [email protected] |
When a CephFS cluster is paused (e.g. via `ceph fs set <fs> down true` or `ceph fs pause`) the MDS map's max_mds is set to 0. Any subsequent call to hash_into_rank_bucket() with max_mds == 0 triggers a crash: the jump-consistent-hash loop never executes (j starts at 0, condition j < max_mds is immediately false), leaving b = -1, so the final assert(result >= 0 && result < max_mds) aborts the daemon. Fixes: https://tracker.ceph.com/issues/76059 Signed-off-by: chungfengz <[email protected]> (cherry picked from commit de9db7c)
During shutdown, `ceph fs set <fs> down true` sets max_mds to 0 before the MDS daemons have finished exporting their subtrees. shutdown_pass() iterates over auth subtrees and skips any dir whose inode is ephemerally pinned, expecting handle_export_pins() to re-place them. However, handle_export_pins() calls hash_into_rank_bucket() which (after the companion fix) now returns MDS_RANK_NONE when max_mds == 0. With no valid target rank the export is never scheduled, so the ephemerally- pinned dirs are skipped by shutdown_pass() indefinitely and the daemon loops. Fixes: https://tracker.ceph.com/issues/76059 Signed-off-by: chungfengz <[email protected]> (cherry picked from commit 039eba3)
batrick
force-pushed
the
wip-77259-squid
branch
from
October 26, 2026 19:25
0e8d825 to
9f4afd5
Compare
batrick
approved these changes
Oct 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
backport tracker: https://tracker.ceph.com/issues/77259
backport of #68413
parent tracker: https://tracker.ceph.com/issues/76059
this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh