← Back to Pull requests

UCP/PROTO: Repost an AM short as bcopy if it is too long for the lane #12462

Closed
unknown closed this pull request without merging on Nov 26, 2026 16:22 UTC
View on GitHub
unknown unknown commented on Nov 24, 2026 19:28 UTC
Author

What?


With token failover, repost an AM short as AM bcopy when it is longer than
the repost lane takes as AM short.

Why?


The purge of a failed lane reports an AM short with the length that this lane
took, and the repost protocol posted it again with uct_ep_am_short() on its
own lane. rc_mlx5 takes an AM short of up to about 2 KB with device memory, and
of up to about 230 bytes without it. Device memory is allocated per worker and
device and may be unavailable, so when the failed lane had it and the repost
lane did not, the repost failed and the AM was lost. Without parameter checks,
rc_mlx5 builds an inline WQE larger than the maximal WQE size instead.

Since #12371 enabled AM short on failover endpoints, the 1 KB AM variants of
test_ucp_fault_tolerance_tf fail on it on some CI hosts, for example:

  • Build 147116,

  • roce on worker 3 (swx-rain03-08):
    rcx/test_ucp_fault_tolerance_tf.target_failure/14 <rc_x/PUT|AM|FLUSH>
  • Build 146767,

  • roce on worker 1 (swx-rain04-08):
    rcx/test_ucp_fault_tolerance_tf.worker_flush_during_recovery/9 <rc_x/AM|MSG_MEDIUM>
  • Build 146875,

  • roce on worker 2 (swx-rain04-09):
    rcx/test_ucp_fault_tolerance_tf.teardown_with_outstanding_probe/9 <rc_x/AM|MSG_MEDIUM>

    [ RUN      ] rcx/test_ucp_fault_tolerance_tf.target_failure/14 <rc_x/PUT|AM|FLUSH>
    [1795461341.249350] [swx-rain03:27017:4]      rc_mlx5_ep.c:158  UCX  ERROR Invalid am_short length: 1034 (expected: <= 236)
    

    How?


    When the header and the payload do not fit cap.am.max_short of the repost
    lane, send them with uct_ep_am_bcopy(), up to ucp_ep_get_max_bcopy(). The
    peer receives the same data.

    No new test: the existing tests above hit the bug on hosts where the failed
    lane has device memory and the repost lane does not.

    Diff: 280 lines (+210 / -70) across 3 files Reviewer: tvegas1 Review duration: 2694m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 280 lines diff across 3 files
    0.40
    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.337
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #12462"
    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: 39.6% (MEDIUM) · Higher = larger blast radius
    39.6%
    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: 15.7% · Safe to merge
    15.7%
    Repository