Entity-lifecycle stress tests; fix a discovery/teardown UAF - #77
Merged
Conversation
Greptile SummaryThe PR adds lifecycle stress coverage and strengthens entity ownership during concurrent discovery callbacks and teardown.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the previously reported mutable third-party action reference is now pinned to a full commit SHA throughout the changed workflows. Important Files Changed
|
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DjSMCfwAYbhV2soLT9vSic
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DjSMCfwAYbhV2soLT9vSic
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DjSMCfwAYbhV2soLT9vSic
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.
Motivation
zzdds has no concurrency- or lifecycle-under-load tests — the roadmap and DCPS coverage audit both call for an OpenDDS-EntityLifecycleStress-shaped stress tier. Standing up the first scenario immediately exposed a real use-after-free: rapid concurrent create/delete of DataWriters and Publishers on one participant crashes the SEDP receive thread mid-on_publication_matched dispatch.
Description of changes
a. onReaderDiscovered / onWriterDiscovered / the two announceMatched* paths released participant.mu before firing matched_notify while pinning only the RTPS proto, not the target DataWriterImpl/DataReaderImpl. MatchedNotify now carries is_reader + quiesce hooks, acquired while mu is held and held across the notify.
b. PublisherImpl / SubscriberImpl gained an EntityQuiesce; each child DataWriter/DataReader holds a lifetime reference on its parent, so the DDS §2.2.4.1.5 listener-fallback chain (writer → publisher → participant) can never read a freed enclosing entity. Owned-child teardown moved from reallyDeinit into deinit to break the resulting ref cycle; a parent_pinned flag keeps hand-built test impls (which skip init()) balanced.