-
Notifications
You must be signed in to change notification settings - Fork 29
feat(rtps): endpoint priority — banded channels, dedicated SEDP-advertised ports, deferred dispatch (phase 2) #737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
finger563
wants to merge
51
commits into
main
Choose a base branch
from
feat/rtps-endpoint-priority
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
f2af644
feat(rtps): banded transport channels + dedicated per-endpoint unicas…
finger563 414af11
feat(rtps): band + dscp on the espp facade configs, deferred banded d…
finger563 e675dca
feat(rtps): band/dscp on the python RtpsParticipant bindings
finger563 f7d1833
test(rtps): dedicated-port SEDP locator, banded loopbacks, deferred d…
finger563 919aa47
fix(rtps): esp32 GCC 15 -Wfree-nonheap-object + cppcheck style findings
finger563 4aa03b9
doc(rtps): document priority bands, dedicated endpoint ports, and the…
finger563 d4cdd1e
test(rtps): banded-subscriber entry in the FastDDS/ROS 2 interop matrix
finger563 245afcc
doc(rtps): RtpsParticipant class doc covers priority scheduling; drop…
finger563 c573c39
fix(socket): bound the reactor's UDP receive so a stale/spurious read…
finger563 d7aef80
fix(rtps): make runtime endpoint deletion teardown-safe (CI shutdown …
finger563 45594f4
test(rtps): teardown-under-load stress (rtps_banded_churn) + interop …
finger563 ef323f4
fix(rtps): PR review - add_reader docstring covers dscp; validate int…
finger563 057d3a5
feat(socket): removal-completion notification on SocketReactor::remove()
finger563 c4544b5
fix(rtps): destroy retired sockets promptly via the reactor's removal…
finger563 18d617b
fix(socket): a bounded read is a REQUIREMENT of add_udp_receiver regi…
finger563 46a01fd
fix(rtps): dedicated-port ration is a true fd bound; failed probe win…
finger563 2663af3
fix(rtps): exception boundary on deferred deliveries; transactional s…
finger563 d376d78
test(rtps): churn iterations REQUIRE live samples on their dedicated …
finger563 94b1558
test(rtps): run rtps_service_rollback in the interop matrix
finger563 48fc862
fix(rtps): hold m_mutex across the whole StatefulWriter::heartbeatTick
finger563 2b68a3e
fix(rtps): deferred-work lifetime model + guaranteed arm recovery + p…
finger563 c495df4
test(rtps): deferred-arm recovery, duplicate-action precision, rollba…
finger563 8623e7c
test(rtps): make rtps_deferred_recovery's saturation deterministic
finger563 0b63854
fix(rtps): band writer progress end-to-end; guaranteed submit; engine…
finger563 6c970ab
test(rtps): make the banded queue-jump phase robust (CI flake)
finger563 9487baf
test(rtps): drop redundant order[0] recheck (cppcheck knownConditionT…
finger563 1cea109
fix(rtps): race-free retry, lossless guaranteed arming, quiesce handl…
finger563 057673f
fix(rtps): remove_reader must not hold mutex_ across deferred close()
finger563 d43d80a
fix(rtps): quiesce writer progress() jobs on delete; Winsock SO_RCVTIMEO
finger563 f3b9ea7
fix(rtps): generation-guard writer progress() jobs; clamp Winsock sub…
finger563 da3e400
fix(rtps): fair, priority-aware guaranteed-job retry drain
finger563 9aa985c
fix(rtps,socket): guard rollback thread/endpoint lifetimes; contain r…
finger563 81a9585
fix(rtps): band-agnostic retry admission; lock writer init(); atomic …
finger563 652f39d
test(rtps,socket): CI regression tests + sanitizer leg; fix bugs they…
finger563 865d1c3
fix(rtps): pin engine across unlocked removals; generation-guard inbo…
finger563 50a1b69
fix(rtps): resolve the lock-order inversions found by the TSan CI leg
finger563 846ec16
test(rtps): fix cv notify-vs-destroy races; defer TSan deadlock detector
finger563 e010e21
fix(rtps): callback-delivery lifecycle + pinned action transactions; …
finger563 e93d74e
style(rtps): use std::find_if for the proxy claim lookup (static anal…
finger563 f5831c3
feat(rtps): actionable endpoint-capacity diagnostics
finger563 e4e2579
test(thread_pool): fix lost-wakeup hangs exposed by the TSan CI leg
finger563 70be208
feat(rtps): per-limit capacity overrides on top of the limits profiles
finger563 a822853
fix(rtps): best-effort saturation must degrade, not silently collapse
finger563 1cd63c8
test(rtps): fix unguarded join of deferred-reply workers (TSan CI)
finger563 e95dee3
fix(rtps): validate limit overrides; reset drop counter on reuse; sha…
finger563 bd34010
fix(rtps): self-removal-safe teardown; override export + ranges; stat…
finger563 a5f2819
fix(rtps): reentrant-removal-safe callbacks; builtin-aware override m…
finger563 954c99c
fix(rtps): cross-limit participant-budget validation + null-safe buil…
finger563 58a6934
fix(rtps): bounded drain-mode writer pokes; DSCP validation; endpoint…
finger563 673ae02
fix(rtps): SEDP-order stale-participant removal; participant-id cap b…
finger563 34c90b3
fix(rtps): channel-pool cross-limit validation + host channel default…
finger563 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,119 @@ | ||
| name: Host sanitizers (TSan / ASan) | ||
|
|
||
| # Build the host library + pc test suite under ThreadSanitizer and | ||
| # AddressSanitizer and run the standalone (non-interop) tests. The RTPS stack | ||
| # is heavily concurrent (transport worker pool, socket reactor, protocol | ||
| # scheduler, deferred dispatchers), and most defects found in review have been | ||
| # data races, deadlocks, and use-after-frees - exactly the classes these | ||
| # sanitizers detect mechanically. Runs whenever RTPS or its concurrency | ||
| # building blocks change. | ||
|
|
||
| # Minimal token scope: build + run tests, never writes. | ||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - "components/rtps/**" | ||
| - "components/socket/**" | ||
| - "components/thread_pool/**" | ||
| - "components/task/**" | ||
| - "components/timer/**" | ||
| - "components/cdr/**" | ||
| - "lib/espp.cmake" | ||
| - "pc/tests/rtps_*" | ||
| - "pc/tests/socket_reactor.cpp" | ||
| - "pc/tests/thread_pool.cpp" | ||
| - ".github/workflows/host_sanitizers.yml" | ||
| workflow_dispatch: | ||
|
|
||
| # Supersede in-progress runs (same rationale as rtps_interop.yml): keyed by | ||
| # workflow + PR number; never runs on push to main, so cancel is always safe. | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| sanitize: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 45 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - sanitizer: thread | ||
| cflags: "-fsanitize=thread -fno-omit-frame-pointer" | ||
| ldflags: "-fsanitize=thread" | ||
| - sanitizer: address | ||
| cflags: "-fsanitize=address -fno-omit-frame-pointer" | ||
| ldflags: "-fsanitize=address" | ||
| name: ${{ matrix.sanitizer }} | ||
| steps: | ||
| - uses: actions/checkout@v7 | ||
| with: | ||
| submodules: "recursive" | ||
|
|
||
| - name: Build library (${{ matrix.sanitizer }}) | ||
| run: | | ||
| cmake -S lib -B lib/build \ | ||
| -DCMAKE_BUILD_TYPE=RelWithDebInfo \ | ||
| -DESPP_INSTALL=ON \ | ||
| -DESPP_BUILD_PYTHON=OFF \ | ||
| -DCMAKE_INSTALL_PREFIX="$PWD/install" \ | ||
| -DCMAKE_C_FLAGS="${{ matrix.cflags }}" \ | ||
| -DCMAKE_CXX_FLAGS="${{ matrix.cflags }}" \ | ||
| -DCMAKE_EXE_LINKER_FLAGS="${{ matrix.ldflags }}" \ | ||
| -DCMAKE_SHARED_LINKER_FLAGS="${{ matrix.ldflags }}" | ||
| cmake --build lib/build --target install --parallel 4 | ||
|
|
||
| - name: Build pc tests (${{ matrix.sanitizer }}) | ||
| run: | | ||
| cmake -S pc -B pc/build \ | ||
| -DCMAKE_BUILD_TYPE=RelWithDebInfo \ | ||
| -DCMAKE_PREFIX_PATH="$PWD/install" \ | ||
| -DCMAKE_CXX_FLAGS="${{ matrix.cflags }}" \ | ||
| -DCMAKE_EXE_LINKER_FLAGS="${{ matrix.ldflags }}" | ||
| cmake --build pc/build --parallel 4 | ||
|
|
||
| - name: Run standalone tests under ${{ matrix.sanitizer }} sanitizer | ||
| run: | | ||
| # halt_on_error=0: report every finding, fail via the exit code. | ||
| # detect_leaks=0: the engine deliberately holds pooled/static | ||
| # allocations for its lifetime; LSan end-of-process reports would be | ||
| # noise. ASan still catches use-after-free / overflow. | ||
| # | ||
| # The lock-order (deadlock) detector is ENABLED. Its first runs found | ||
| # four real ABBA cycles, all now fixed: checkAndResetHeartbeats | ||
| # agent->participant order, addBuiltInEndpoints lock scope, | ||
| # executeCallbacks snapshot-invoke, and StatefulReader delivering | ||
| # user callbacks under a leaf delivery mutex instead of the proxies | ||
| # mutex (which user callbacks could cycle back into via the | ||
| # facade/SEDP lock chain). | ||
| export TSAN_OPTIONS="second_deadlock_stack=1" | ||
| export ASAN_OPTIONS="detect_leaks=0" | ||
| fails=0 | ||
| # The interop client/server binaries need a FastDDS/ROS 2 peer (the | ||
| # docker matrix covers them); everything else runs standalone. The | ||
| # generous per-test timeout absorbs the sanitizer's slowdown; a hang | ||
| # (e.g. a deadlock TSan cannot see) still fails the job. | ||
| for t in pc/build/rtps_* pc/build/socket_reactor pc/build/thread_pool; do | ||
| [ -x "$t" ] || continue | ||
| name=$(basename "$t") | ||
| case "$name" in *interop*) continue;; esac | ||
| echo "::group::$name" | ||
| if timeout 300 "$t"; then | ||
| echo "PASS: $name" | ||
| else | ||
| rc=$? | ||
| echo "FAIL: $name (exit $rc)" | ||
| fails=$((fails+1)) | ||
| fi | ||
| echo "::endgroup::" | ||
| done | ||
| echo "==================== ${{ matrix.sanitizer }} summary ====================" | ||
| if [ "$fails" -ne 0 ]; then | ||
| echo "FAILED: $fails test(s) under ${{ matrix.sanitizer }} sanitizer" | ||
| exit 1 | ||
| fi | ||
| echo "ALL PASS under ${{ matrix.sanitizer }} sanitizer" |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.