Do not acknowledge intraprocess DATA from an unmatched writer (backport #6636) #6641
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
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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
MiguelCompany
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_rosCI (test_load_composable_nodes.pyintest_launch_ros) loads nodes into a mock component container through a service, with client and server in the same process (separate participants).rmw_fastrtpswait_for_serviceonly 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:
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
versions.mdfile (if applicable).Reviewer Checklist
<hr>This is an automatic backport of pull request #6636 done by Mergify.