Repository navigation
squid: rgw/beast: use strand executor for timeout timer to prevent concurrent socket access - #68507
Merged
Merged
Conversation
…t socket access The timeout_timer in AsioFrontend::on_accept() was constructed with context.get_executor(), which dispatches the timeout handler to the raw io_context. Since each connection's coroutine runs on a strand (via make_strand(context)), this allowed the timeout handler to execute concurrently with the coroutine on a different thread. When the timeout fires, timeout_handler calls socket.cancel() and socket.shutdown() racing with the coroutine's async_read_header(), async_write(), or async_read_some() on the same socket and buffer. This can corrupt the flat_static_buffer's internal pointers, leading to SIGSEGV in the Beast HTTP parser. Fix by constructing the timeout_timer with yield.get_executor(), which returns the coroutine's strand executor. This ensures the timeout handler is serialized with the coroutine, preventing concurrent access to the socket and buffer. Fixes: https://tracker.ceph.com/issues/75031 Signed-off-by: Oguzhan Ozmen <[email protected]> (cherry picked from commit 86ad0b8)
cbodley
approved these changes
Apr 21, 2026
Contributor
|
pr testing completed and approved by @ivancich , more details In : https://tracker.ceph.com/issues/76715 |
Contributor
|
jenkins test api |
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.
backport tracker: https://tracker.ceph.com/issues/76150
backport of #67424
parent tracker: https://tracker.ceph.com/issues/75031
this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh