Skip to content

Warn when receiver locator mutation succeeds - #6568

Open
devinhuang2001 wants to merge 1 commit into
eProsima:masterfrom
devinhuang2001:fix/6528-receiver-port-mutation-warning
Open

devinhuang2001 wants to merge 1 commit into
eProsima:masterfrom
devinhuang2001:fix/6528-receiver-port-mutation-warning

Conversation

@devinhuang2001

@devinhuang2001 devinhuang2001 commented Oct 9, 2026 •

Copy link
Copy Markdown

Description

When a configured receiver locator cannot be opened and a retry succeeds on another port, participant creation previously continued without reporting the move. This makes port contention difficult to diagnose, especially in Release builds where the transport's Info logs are disabled.

Emit one RTPS_PARTICIPANT Warning after a successful mutation, including the requested and actual listening locators. Add regression tests using real loopback UDP sockets for no mutation, one mutation, multiple mutations, and exhausted retries. The tests check the actual bound locator and the warning's level, count, and contents.

Fixes #6528.

Suggested backport: 3.6.x. The complete patch passes git apply --check against that branch; a separate backport build has not been run.

Validation

Windows x64, MSVC 19.41, Release, static libraries, SECURITY=OFF:

  • Verified the regression tests against the original implementation: only the two successful-mutation cases fail because the warning is missing.
  • RTPSParticipantTests: 5/5 pass, both directly and via CTest.
  • Four receiver mutation cases repeated 20 times: 80/80 pass.
  • Both changed C++ files pass Uncrustify with the eProsima cpp-style configuration.
  • git diff --check passes.

Contributor Checklist

  • Commit messages follow the project guidelines; the commit includes a DCO sign-off.
  • The code follows the style guidelines of this project.
  • Regression tests checking the bug and its fix have been added and pass locally.
  • N/A: New/modified methods require Doxygen documentation; no runtime method signatures or contracts are added or changed.
  • N/A: New configuration API requires an equivalent XML API; no configuration API is added.
  • Changes are backport compatible and do not break ABI or change port selection behavior.
  • Changes are API compatible.
  • N/A: New feature entry in versions.md; this is a diagnostic bug fix.
  • N/A: New feature documentation; no feature or configuration semantics change.
  • Applicable backport target is included in the description.

Reviewer Checklist

  • The PR has a milestone assigned.
  • The title and description correctly express the PR's purpose.
  • Check contributor checklist is correct.
  • Check CI results and coverage comparison.

Signed-off-by: mike66612 <mike66612@users.noreply.github.com>
@devinhuang2001
devinhuang2001 marked this pull request as ready for review October 9, 2026 14:54

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants