Repository navigation
osd: Fix bugs with EC sync reads coroutine lifecycle - #71327
Conversation
5ba6b43 to
94a6d2a
Compare
|
jenkins test windows |
|
jenkins test api |
|
jenkins test make check |
|
jenkins test make check arm64 |
bill-scales
left a comment
There was a problem hiding this comment.
Agree that this fixes both the issues found by valgrind
|
This PR has been added to wip-bharath10-testing-20260903.050751-main. |
|
@MattyWilliams22 I am seeing a new failure in the test run - https://pulpito.ceph.com/skanta-2026-09-03_10:37:47-rados-wip-bharath10-testing-20260903.050751-main-distro-default-trial/534759/ I think it might be related, could you check it out? |
…ange Bug 1: The coroutine lambda called `coro_resumer = nullptr` from inside its own body. Fix: Instead, reset coro_resumer from the caller's stack immediately after `(*coro_resumer)() returns. Or reset it lazily at the top of do_op() during the next op. Bug 2: use-after-free of resume token in the on_finish callback. Fix: Have a shared pointer to the resume token. The callback derives a weak pointer and attempts to lock the weak pointer before resuming the coroutine. If on_change() already reset the resume token, the lock fails and the resume is skipped. The token is freed when the last shared pointer is released. Fixes: https://tracker.ceph.com/issues/79515 Signed-off-by: Matty Williams <[email protected]> Assisted-by: IBM-Bob-2.0.2:Claude/GPT
94a6d2a to
94103bb
Compare
|
I believe this issue is related and I have recreated it locally on this branch. I have pushed a fix which is working locally. |
|
This PR has been added to wip-bharath10-testing-20260910.230227-main. |
Fixes: https://tracker.ceph.com/issues/79515
Valgrind encountered some memory leaks related to the coroutine that is used for synchronous reads in EC pools.
Bug 1: The coroutine lambda called
coro_resumer = nullptrfrom inside its own body.Fix: Instead, reset coro_resumer from the caller's stack immediately after `(*coro_resumer)() returns. Or reset it lazily at the top of do_op() during the next op.
Bug 2: use-after-free of resume token in the on_finish callback.
Fix: Have a shared pointer to the resume token. The callback derives a weak pointer and attempts to lock the weak pointer before resuming the coroutine. If on_change() already reset the resume token, the lock fails and the resume is skipped. The token is freed when the last shared pointer is released.
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.