← Back to Pull requests

UCT/IB/MLX5: Count consumed error CQEs as progress #12546

Open
unknown opened this pull request with 221 lines diff across 2 files
View on GitHub
unknown unknown commented on Dec 02, 2026 16:51 UTC
Author

What?


Report an error CQE consumed by the rc_mlx5 and dc_mlx5 poll functions as progress.

Why?


uct_ib_mlx5_poll_cq() passes an error CQE to the check callback, which consumes it, runs the failure handler and returns NULL. The rc_mlx5 and dc_mlx5 TX polls and the rc_mlx5 RX poll, also used by dc_mlx5, then returned 0, so uct_iface_progress() reported no progress although it completed operations with an error.

A caller which arms the iface when the progress returns 0 armed the CQ while more error CQEs were pending. The CQ did not generate an event for them, so the remaining canceled operations did not complete. UCP does this in ucp_worker_iface_check_events_do() when the iface is not activated, for example after ucp_ep_close_nbx() with UCP_EP_CLOSE_FLAG_FORCE deactivates the ifaces while the discarded lanes are flushed with cancel.

This was seen in the CI of #12381 (build 148755, Tests/gpu): in rcx/test_ucp_rma_stalled_lane_peer.force_close_parked_flush/1, 2 of 32 puts did not complete after the force close, and the discarded RC QP still held them at worker destroy.

How?


  • Add uct_ib_mlx5_cq_consumed(), which checks whether the poll advanced the CQ consumer index, and return it from the polls when no CQE is returned.

  • Add uct_cancel_test.put_zcopy_wakeup. It cancels 16 put/zcopy operations, lets their error CQEs reach the CQ, and then progresses the sender in an event-driven loop: progress, arm when the progress returns 0, and wait for an event. Without the fix the test fails on rc_mlx5, where 15 of 16 operations stay outstanding. It also fails on dc_mlx5, where the progress completes the operations without reporting it, so the event wait times out.
  • Diff: 221 lines (+165 / -56) across 2 files Reviewer: rakhmets Review duration: 963m
    All Vouch review confidence checks passed
    Residual risk 0.20 = Change Risk (0.37) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 221 lines diff across 2 files
    0.37
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    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
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.323
    Real PR Conversation Timeline
    1 comments
    "Review active on #12546"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% 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: 36.8% (MEDIUM) · Higher = larger blast radius
    36.8%
    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: 46.7% · Lower = rushed or shallow review
    46.7%
    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: 19.6% · Safe to merge
    19.6%
    Repository