Repository navigation
Conversation
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]>
This was referenced Oct 27, 2026
Contributor
|
This PR is a duplicate of #73193 |
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.
Summary
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. If an op before the CALL started those reads before any sync read, the coroutine waits for them too. At shutdown, the PG now also frees a suspended coroutine.
The open #72704 fixes the first leak in the same way. Its tracker is 81777. #72704 does not fix the handles, the async reads or the shutdown. The two conflict in
Coroutines.h,PrimaryLogPG.ccandsrc/test/osd/CMakeLists.txt.Fixes: https://tracker.ceph.com/issues/82192
Testing
On main 169a0fb, with the other seven P0 fixes, the new
unittest_ec_coroutinespasses its 5 tests:FinishWithoutYieldFreesStackFinishAfterYieldFreesStackStoppedWhileSuspendedFreesStackManyOpsKeepNoStacksNoHandlesOutliveTheCoroutineChecklist