UCP/DT: Fix use of freed IOV memory handles on request restart #12448
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 362 lines diff across 4 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.353
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #12448"
general
weight: 0.35
tvegas1
What?
Reset the pointer to the IOV memory handle array after
ucp_datatype_iter_iov_cleanup()frees the array.Why?
On a failover endpoint, a zero-copy request whose operation fails is cleaned
up and then restarted. With
UCP_DATATYPE_IOVthe cleanup frees the memoryhandle array but keeps the pointer, so the restart passes this check,
deregisters handles from the freed array and then registers new ones into it:
https://github.com/openucx/ucx/blob/cdc194bba6c1158689a3c4962fd8a732b3b4228e/src/ucp/dt/datatype_iter.inl#L805-L808
<details>
<summary>The new test without the fix</summary>
</details>
How?
Set the pointer to NULL after the free, as the contiguous and SGL cleanups
do. The new test sends an IOV put or get once to find a lane of its protocol,
invalidates that lane on rc_x and sends the request again, so it restarts.