Skip to content

crimson/osd: Admin Socket fixes - #63523

Merged
Matan-B merged 9 commits into
ceph:mainfrom
Matan-B:wip-matanb-crimson-asock-race-fixes
Jun 25, 2025
Merged

Matan-B merged 9 commits into
ceph:mainfrom
Matan-B:wip-matanb-crimson-asock-race-fixes

Conversation

@Matan-B

@Matan-B Matan-B commented May 27, 2025 •

Copy link
Copy Markdown
Contributor
  • Added logs
  • Coroutines
  • Life management in fix reactor_map_seq
  • cleanup sharded_map_seq

Fixes: https://tracker.ceph.com/issues/71457

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 x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

@Matan-B Matan-B added this to Crimson May 27, 2025
@Matan-B Matan-B moved this to In Progress in Crimson May 27, 2025
@Matan-B
Matan-B force-pushed the wip-matanb-crimson-asock-race-fixes branch 2 times, most recently from fe3b4dd to f233b9e Compare May 28, 2025 11:08
@Matan-B

Matan-B commented Jun 11, 2025

Copy link
Copy Markdown
Contributor Author

note: should be retested with #63673

@Matan-B
Matan-B force-pushed the wip-matanb-crimson-asock-race-fixes branch from 275dee0 to b5c2560 Compare June 22, 2025 10:35
@Matan-B Matan-B changed the title crimson/osd: start_asok_admin only once all shards are active crimson/osd: Admin Socket fixes Jun 22, 2025
@Matan-B
Matan-B force-pushed the wip-matanb-crimson-asock-race-fixes branch 2 times, most recently from 68ac55e to 24e3136 Compare June 22, 2025 10:49
@Matan-B Matan-B moved this from In Progress to Awaits review in Crimson Jun 22, 2025
@Matan-B
Matan-B marked this pull request as ready for review June 22, 2025 10:50
@Matan-B
Matan-B requested a review from a team as a code owner June 22, 2025 10:50
Matan-B referenced this pull request in Matan-B/ceph Jun 22, 2025
Signed-off-by: Matan Breizman <[email protected]>
@Matan-B
Matan-B force-pushed the wip-matanb-crimson-asock-race-fixes branch 3 times, most recently from 6050b8d to 6eb9306 Compare June 22, 2025 14:48

@cyx1231st cyx1231st left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment thread src/crimson/admin/admin_socket.cc Resolved
Comment thread src/crimson/common/smp_helpers.h Resolved
Comment thread src/crimson/common/smp_helpers.h Resolved
Matan-B added 8 commits June 23, 2025 10:38
Copy f into reactor_map_seq which would be kept alive
due to this method being a coroutine. That way, we can ensure
the lambdas passed to each core that are capturing f by
reference would be safe.
Alternatively, we can also copy f by using it's copy ctor and
pass a copy to each shard:
co_await crimson::submit_to(core, F(f))
However, avoiding the copy is possible here due to the sequential
traversal. Note, seastar's invoke_on_all do copy each callback to
every shard and is running the invocation in parallel.

The above would have fixed f's captures to be invalid and result
in a segfaults on diffrent shards.

Fixes: https://tracker.ceph.com/issues/71457

Signed-off-by: Matan Breizman <[email protected]>
Let PGShardManager::invoke_on_each_shard_seq pass the local shard_services
instance instead of using an additional helper.

The downside of dropping the generic sharded_map_seq helper is that it is
able to support *any* (seastar::)sharded object. However, as shard_services
is the only user of it - directly using the local instance without the
helper seems easier to read.

Signed-off-by: Matan Breizman <[email protected]>
@Matan-B
Matan-B force-pushed the wip-matanb-crimson-asock-race-fixes branch from 6eb9306 to 87d2085 Compare June 23, 2025 10:53
@Matan-B
Matan-B requested a review from cyx1231st June 23, 2025 10:54
@Matan-B

Matan-B commented Jun 23, 2025 •

Copy link
Copy Markdown
Contributor Author

@cyx1231st, I've addressed the comments above.
changeset:

  • comments
  • rebase
  • renames
  • cleanup sharded_map_seq (last commit)

@Matan-B

Matan-B commented Jun 23, 2025

Copy link
Copy Markdown
Contributor Author

@Matan-B Matan-B moved this from Awaits review to Needs QA in Crimson Jun 23, 2025
@Matan-B

Matan-B commented Jun 25, 2025

Copy link
Copy Markdown
Contributor Author

jenkins restest this please

@Matan-B

Matan-B commented Jun 25, 2025

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

@Matan-B

Matan-B commented Jun 25, 2025

Copy link
Copy Markdown
Contributor Author

@Matan-B
Matan-B merged commit 19b19a4 into ceph:main Jun 25, 2025
@Matan-B Matan-B moved this from Needs QA to Merged (Main) in Crimson Jun 25, 2025
Comment thread src/crimson/common/smp_helpers.h Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Merged (Pre Umbrella cutoff)

Development

Successfully merging this pull request may close these issues.

3 participants