← Back to Pull requests

Do not acknowledge intraprocess DATA from an unmatched writer (backport #6636) #6641

Closed
unknown closed this pull request without merging on Nov 19, 2026 08:28 UTC
View on GitHub
unknown unknown commented on Nov 18, 2026 14:29 UTC
Author

Description

StatefulReader::process_data_msg() rejected DATA from a writer it had not matched yet, but returned true. An intraprocess StatefulWriter uses that value to decide whether the change was delivered, so it marked the change as acknowledged. When the reader matched the writer shortly after, the initial ACKNACK found nothing unacknowledged to resend, and the sample was lost for good.

This is a regression from #6490, which changed this path from false to true. Return false again, as documented for process_data_msg() when the message could be processed in the future. The writer then keeps the change unacknowledged and resends it on the initial ACKNACK.

Found in ROS 2 CI. ROS 2 launch_ros CI (test_load_composable_nodes.py in test_launch_ros) loads nodes into a mock component container through a service, with client and server in the same process (separate participants).
rmw_fastrtps wait_for_service only checks the client's own matches, so the client can send its request before the server's request reader has matched the client's request writer.
About 1 in 100 runs, the request was lost and the client waited forever (now a 60 s timeout in launch_ros).
Tracing the failing case showed the following order:

W-MATCH   writer=<client req writer> reader=<server req reader>
R-REJECT  reader=<server req reader> writer=<client req writer> seq=1   (writer not matched by reader)
W-DELIVER writer=<client req writer> reader=<server req reader> seq=1 delivered=1
R-MATCH   reader=<server req reader> writer=<client req writer>         (~60 ms later)
R-INITACK / W-ACKNACK(empty set) reader_proxy_found=1                   (nothing to re-send)

With the stock code: 3 failures in about 550 iterations of the test loop (8 loops in parallel).
With this change: 0 failures in 1200 iterations. The race was hit 11 times, and the change was re-sent and delivered every time.

@Mergifyio backport 3.2.x 2.14.x

Contributor Checklist

  • Commit messages follow the project guidelines.

  • The code follows the style guidelines of this project.

  • Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added; the added tests pass locally

  • _N/A_ Any new/modified methods have been properly documented using Doxygen.

  • _N/A_ Any new configuration API has an equivalent XML API (with the corresponding XSD extension)

  • Changes are backport compatible: they do NOT break ABI nor change library core behavior.

  • Changes are API compatible.

  • _N/A_ New feature has been added to the versions.md file (if applicable).

  • _N/A_ New feature has been documented/Current behavior is correctly described in the documentation.


  • Applicable backports have been 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.

  • If this is a critical bug fix, backports to the critical-only supported branches have been requested.

  • Check CI results: changes do not issue any warning.

  • Check CI results: failing tests are unrelated with the changes.

  • <hr>This is an automatic backport of pull request #6636 done by Mergify.

    Diff: 415 lines (+311 / -104) across 5 files Reviewer: MiguelCompany Review duration: 1078m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 415 lines diff across 5 files
    0.45
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.361
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #6641"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 44.9% (MEDIUM) · Higher = larger blast radius
    44.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 17.8% · Safe to merge
    17.8%