Repository navigation
Conversation
|
Thank you for your contribution. Since you are not yet a member of the Ceph organization with write permissions on ceph/ceph.git, our CI will not automatically run. Any member of the Ceph organization may label this PR |
Contributor
|
This PR has been added to wip-bharath11-testing-20261114.052454-main. |
Contributor
Contributor
|
@evkuzin Kindly address the PR check failure and proceed with merging the PR once the issue has been resolved. Should further QA validation be required, please re-add the |
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.
NVMeofGwMon::check_beacon_timeout()erases the timed-out gateway's entry fromlast_beacon(astd::map) while iterating it with a range-based for. Erasing the element the loop is positioned at and then letting the loop increment is undefined behaviour. It runs on every beacon timeout, so on every NVMe-oF gateway failover. libstdc++ with-D_GLIBCXX_DEBUGaborts on this shape with "attempt to increment a singular iterator"; release builds survive by luck because the freed node's links are usually still readable.The fix iterates with an explicit iterator and advances with
it = last_beacon.erase(it)on the timeout branch, the same idiom used elsewhere insrc/mon(for exampleMDSMonitor.cc). Behaviour is otherwise unchanged.process_gw_map_gw_down()has no access tolast_beacon, so the single pass remains valid.Introduced by b49ac69 ("nvmeofgw: fast-failover changes"), shipped in v21.0.0 and backported to tentacle 20.2.1, so this needs backports to tentacle and umbrella.
Verification: no unit harness can construct
NVMeofGwMonwithout a live monitor, so there is no new test. A standalone reproduction of both loop shapes over astd::mapbuilt with-D_GLIBCXX_DEBUGaborts on the old shape and completes on the new one.A second instance of the same pattern exists in
NVMeofGwMap::check_all_gws_in_deleting_state()(src/mon/NVMeofGwMap.cc:209), reached throughnvme-gw delete; it will follow in a separate PR.Introduced by b49ac69 ("nvmeofgw: fast-failover changes")
Checklist