Skip to content

osd: give the ops of a nested do_osd_ops() call finishers of their own - #73178

Open
mmgaggle wants to merge 2 commits into
ceph:mainfrom
mmgaggle:wip-kbader-nested-osd-ops-finishers
Open

mmgaggle wants to merge 2 commits into
ceph:mainfrom
mmgaggle:wip-kbader-nested-osd-ops-finishers

Conversation

@mmgaggle

Copy link
Copy Markdown
Member

Summary

do_osd_ops() numbered the ops of a nested call, such as the reads of a CALL's method, from 0, as for the request. On an optimized EC pool, the nested read of a CALL after a READ or a CHECKSUM ran the finisher of the request's op 0. The method then got no data.

A nested call now keeps its finishers for the op that made it, and gives the caller's loop its op number back.

This pull request is on top of #73174, because its test also needs that fix. Only the last commit is new here.

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

Testing

The new librados test LibRadosMiscECPP.ClassReadAfterAsyncRead in ceph_test_rados_api_misc_pp runs a CHECKSUM and then a CALL that reads the object. These runs were on a vstart cluster with 3 OSDs, on main 169a0fb:

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)

An op that ended without a yield dropped the last reference to its
coroutine inside the coroutine, so its 128 KiB stack leaked. Now
resume_coroutine() holds a reference across the resume. The op also kept
handles into the freed stack, and a later sync read yielded on them. Now
the coroutine clears them and waits for the op's async reads itself,
also when an op before the CALL started them before any sync read.

Fixes: https://tracker.ceph.com/issues/82192
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Kyle Bader <[email protected]>
do_osd_ops() numbered the ops of a nested call, such as the reads of a
CALL's method, from 0, as for the request. On an optimized EC pool the
nested read of a CALL after a READ or a CHECKSUM ran the finisher of
the request's op 0, and the method got no data. A nested call now keeps
its finishers for the op that made it, and gives the caller's loop its
op number back.

Fixes: https://tracker.ceph.com/issues/82195
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Kyle Bader <[email protected]>
@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant