Fix SharedMem self-deadlock in blocked-processing recovery - #6497
Open
zacheryasc wants to merge 1 commit into
Open
Fix SharedMem self-deadlock in blocked-processing recovery#6497zacheryasc wants to merge 1 commit into
zacheryasc wants to merge 1 commit into
Conversation
get_and_remove_blocked_processing() already holds node_->empty_cv_mutex when it calls listener_processing_stop(), which attempts to lock the same non-recursive std::mutex again. This re-entrancy self-deadlocks and spins inside recover_blocked_processing() (issue eProsima#6485). Clear listeners_status[i].is_processing in place instead, since the mutex is already held. Adds a regression test that drives the recovery path and asserts the listener is cleared without re-blocking. Signed-off-by: Zachery Aaron Shores-Chmielewski <zacheryasc@gmail.com>
1 task
zacheryasc
marked this pull request as ready for review
August 4, 2026 20:08
|
thanks for your work! Hope the maintainers can get this merged soon. 👍 |
MiguelCompany
self-requested a review
August 10, 2026 05:41
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.
Description
get_and_remove_blocked_processing()already holdsnode_->empty_cv_mutexwhen it calls
listener_processing_stop(), which attempts to lock the samenon-recursive
std::mutexagain. This re-entrancy self-deadlocks and spinsinside
recover_blocked_processing()(issue #6485).Clear
listeners_status[i].is_processingin place instead, since the mutex isalready held. No mutex type or signature changed, so this is ABI- and
behavior-compatible and safe to backport. Adds a regression test that drives
the recovery path and asserts the listener is cleared without re-blocking.
@Mergifyio backport 3.2.x 2.14.x
Fixes #6485
Contributor Checklist
versions.mdfile (if applicable).Reviewer Checklist