Repository navigation
osd: free the stack of an EC coroutine op and keep its sync reads in it - #73193
Conversation
|
I have tested in Teuthology with and without this fix and have seen promising results: The jobs on the main branch all show Leak_DefinitelyLost for the boost coroutine that is spawned in PrimaryLogPG::do_op(). The jobs on this branch show no signs of these memory leaks. |
|
This PR has been added to wip-bharath15-testing-20261102.042818-main. |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
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. Rebasing this commit required the resolution of a merge conflict. The merge conflict was in the definitions of do_op_impl() and do_op() in src/osd/PrimaryLogPG.h which both now have an extra parameter. The resolution was to keep the extra parameters from main. Fixes: https://tracker.ceph.com/issues/81777 Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Kyle Bader <[email protected]> Signed-off-by: Matty Williams <[email protected]>
8b4f7ed to
a78e2f8
Compare
|
This force push was a rebase. There was a minor conflict which I've described in the commit message. I don't believe that QA needs to be redone. |
|
jenkins test api |
|
jenkins test windows |
1 similar comment
|
jenkins test windows |
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/81777
Assisted-by: Claude:claude-opus-5-5
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
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.