Repository navigation
umbrella: rgw: fix use-after-free on cancellation in shard_io::async_reads() - #71136
Merged
Merged
Conversation
when ReadHandler encounters an error and cancels other outstanding requests, its calls to emit() likely execute those cancellation handlers inline. these can cause async_reads() to wake up and co_return prematurely while the initial ReadHandler is still looping over the 'outstanding' list on its stack prevent this early return by leaving this initial shard in the 'outstanding' list during the cancellation loop adjust WaitCancellation to use a local variable for the loop condition. this way if the final cancellation wakes the calling coroutine and causes it to return, we don't try to access its stack memory again with 'i != outstanding.end()' Fixes: https://tracker.ceph.com/issues/79095 Signed-off-by: Casey Bodley <[email protected]> Co-authored-by: Shilpa Jagannath <[email protected]> (cherry picked from commit 977c9da)
smanjara
approved these changes
Aug 18, 2026
Contributor
|
This PR has been added to umbrella integration testing by anuchaithra started 2026-08-19-07:18. |
Contributor
Author
|
jenkins test windows |
Contributor
pr verified and approved by @ivancich, more details : https://tracker.ceph.com/issues/79604 |
Contributor
|
jenkins test api |
edwinzrodriguez
added a commit
to edwinzrodriguez/ceph
that referenced
this pull request
Sep 20, 2026
After set_balanced_budget() (tracker ceph#71136), Objecter::_throttle_op can block the calling thread until inflight OSD ops complete and free budget. OSD replies that release that budget are handled on ms_dispatch. When ms_dispatch (or the MDS completion finisher) itself blocks in the throttle — e.g. CDir::_omap_fetch during path_traverse, or _omap_commit_ops on mds-rank-fin — replies never run, the throttle never puts, and the MDS wedges (client creates stuck at journal_and_reply). Dropping mds_lock across Objecter submit is not enough: the dispatch thread must not wait on the same throttle that only it can advance. Keep balanced-budget throttling, but move Objecter submits that may block onto a dedicated objecter_finisher (mds-obj-fin) via queue_objecter(). ms_dispatch and the completion finisher stay free to process replies. Route dir/inode fetch and commit, backtrace batch commits, OpenFileTable, SessionMap, and MDSTable Objecter I/O through that path. Signed-off-by: Edwin Rodriguez <[email protected]>
edwinzrodriguez
added a commit
to edwinzrodriguez/ceph
that referenced
this pull request
Sep 20, 2026
After set_balanced_budget() (tracker ceph#71136), Objecter::_throttle_op can block the calling thread until inflight OSD ops complete and free budget. OSD replies that release that budget are handled on ms_dispatch. When ms_dispatch (or the MDS completion finisher) itself blocks in the throttle — e.g. CDir::_omap_fetch during path_traverse, or _omap_commit_ops on mds-rank-fin — replies never run, the throttle never puts, and the MDS wedges (client creates stuck at journal_and_reply). Dropping mds_lock across Objecter submit is not enough: the dispatch thread must not wait on the same throttle that only it can advance. Keep balanced-budget throttling, but move Objecter submits that may block onto a dedicated objecter_finisher (mds-obj-fin) via queue_objecter(). ms_dispatch and the completion finisher stay free to process replies. Route dir/inode fetch and commit, backtrace batch commits, OpenFileTable, SessionMap, and MDSTable Objecter I/O through that path. Signed-off-by: Edwin Rodriguez <[email protected]>
edwinzrodriguez
added a commit
to edwinzrodriguez/ceph
that referenced
this pull request
Sep 21, 2026
After set_balanced_budget() (tracker ceph#71136), Objecter::_throttle_op can block the calling thread until inflight OSD ops complete and free budget. OSD replies that release that budget are handled on ms_dispatch. When ms_dispatch (or the MDS completion finisher) itself blocks in the throttle — e.g. CDir::_omap_fetch during path_traverse, or _omap_commit_ops on mds-rank-fin — replies never run, the throttle never puts, and the MDS wedges (client creates stuck at journal_and_reply). Dropping mds_lock across Objecter submit is not enough: the dispatch thread must not wait on the same throttle that only it can advance. Keep balanced-budget throttling, but move Objecter submits that may block onto a dedicated objecter_finisher (mds-obj-fin) via queue_objecter(). ms_dispatch and the completion finisher stay free to process replies. Route dir/inode fetch and commit, backtrace batch commits, OpenFileTable, SessionMap, and MDSTable Objecter I/O through that path. Signed-off-by: Edwin Rodriguez <[email protected]>
edwinzrodriguez
added a commit
to edwinzrodriguez/ceph
that referenced
this pull request
Sep 21, 2026
After set_balanced_budget() (tracker ceph#71136), Objecter::_throttle_op can block the calling thread until inflight OSD ops complete and free budget. OSD replies that release that budget are handled on ms_dispatch. When ms_dispatch (or the MDS completion finisher) itself blocks in the throttle — e.g. CDir::_omap_fetch during path_traverse, or _omap_commit_ops on mds-rank-fin — replies never run, the throttle never puts, and the MDS wedges (client creates stuck at journal_and_reply). Dropping mds_lock across Objecter submit is not enough: the dispatch thread must not wait on the same throttle that only it can advance. Keep balanced-budget throttling, but move Objecter submits that may block onto a dedicated objecter_finisher (mds-obj-fin) via queue_objecter(). ms_dispatch and the completion finisher stay free to process replies. Route dir/inode fetch and commit, backtrace batch commits, OpenFileTable, SessionMap, and MDSTable Objecter I/O through that path. Signed-off-by: Edwin Rodriguez <[email protected]>
4 of 20 tasks
edwinzrodriguez
added a commit
to edwinzrodriguez/ceph
that referenced
this pull request
Sep 21, 2026
After set_balanced_budget() (tracker ceph#71136), Objecter::_throttle_op can block the calling thread until inflight OSD ops complete and free budget. OSD replies that release that budget are handled on ms_dispatch. When ms_dispatch (or the MDS completion finisher) itself blocks in the throttle — e.g. CDir::_omap_fetch during path_traverse, or _omap_commit_ops on mds-rank-fin — replies never run, the throttle never puts, and the MDS wedges (client creates stuck at journal_and_reply). Dropping mds_lock across Objecter submit is not enough: the dispatch thread must not wait on the same throttle that only it can advance. Keep balanced-budget throttling, but move Objecter submits that may block onto a dedicated objecter_finisher (mds-obj-fin) via queue_objecter(). ms_dispatch and the completion finisher stay free to process replies. Route dir/inode fetch and commit, backtrace batch commits, OpenFileTable, SessionMap, and MDSTable Objecter I/O through that path. Fixes: https://tracker.ceph.com/issues/80667 Signed-off-by: Edwin Rodriguez <[email protected]>
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/79558
backport of #70918
parent tracker: https://tracker.ceph.com/issues/79095
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