Skip to content

UCP/FT: rebuild failed lanes on recovery via LANES_ADDR exchange - #11562

Merged
evgeny-leksikov merged 3 commits into
openucx:masterfrom
evgeny-leksikov:ft-split/06-recovery-rebuild-upstream
Jul 6, 2026
Merged

evgeny-leksikov merged 3 commits into
openucx:masterfrom
evgeny-leksikov:ft-split/06-recovery-rebuild-upstream

Conversation

@evgeny-leksikov

@evgeny-leksikov evgeny-leksikov commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

What?

Complete failed-lane recovery on top of the recovery foundation and the
keepalive-driven state machine (#11545):

How?

  • Rebuild failed p2p/iface lanes: install wireup proxies over failed stubs,
    recreate the inner UCT endpoints, and drive them to READY so the lane
    resumes serving traffic.
  • Wire the LANES_ADDR_REQUEST/REPLY handlers to exchange peer addresses and
    rebuild the requested lanes, including local failover for asymmetric
    failures, and free the recovery state once all lanes recover.
  • Pin a recovered iface lane to its original peer device.
  • UCX_RESOLVE_REMOTE_EP_ID = auto by default.
  • Add end-to-end fault-tolerance gtests (initiator/target failure incl. the
    all-lanes-failed case) using the keepalive-driven recovery cadence.

@evgeny-leksikov evgeny-leksikov changed the title Ft split/06 recovery rebuild upstream UCP/FT: rebuild failed lanes on recovery via LANES_ADDR exchange Jun 17, 2026
Complete failed-lane recovery on top of the recovery foundation and the
keepalive-driven state machine (openucx#11545):

- Rebuild failed p2p/iface lanes: install wireup proxies over failed stubs,
  recreate the inner UCT endpoints, and drive them to READY so the lane
  resumes serving traffic.
- Wire the LANES_ADDR_REQUEST/REPLY handlers to exchange peer addresses and
  rebuild the requested lanes, including local failover for asymmetric
  failures, and free the recovery state once all lanes recover.
- Pin a recovered iface lane to its original peer device.
- Resolve the remote id on the RMA multi path under
  UCP_ERR_HANDLING_MODE_FAILOVER.
- Add end-to-end fault-tolerance gtests (initiator/target failure incl. the
  all-lanes-failed case) using the keepalive-driven recovery cadence.
@evgeny-leksikov
evgeny-leksikov force-pushed the ft-split/06-recovery-rebuild-upstream branch from 6e82a8e to 31d5003 Compare June 17, 2026 21:28
@evgeny-leksikov
evgeny-leksikov marked this pull request as ready for review June 17, 2026 21:29
Comment thread src/ucp/proto/proto_multi.inl Resolved
@evgeny-leksikov
evgeny-leksikov requested a review from shasson5 July 1, 2026 08:07

@william-gallagher-nv william-gallagher-nv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed with @evgeny-leksikov in person. Looks good.

Comment thread src/ucp/wireup/wireup.c
* see as failed go through local failover first, so subsequent rebuild
* steps encounter proper failed stubs and the reply rides the new
* am_lane. */
peer_unaware = lanes_info->provided_lane_map & ~ucp_ep_get_failed_lanes(ep);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if heterogenous EP config -> wrong lanes are rebuilt? It assumes here peer/local indices are identical..

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

per offline discussion, heterogenous EP case will be handled in separate PR

Comment thread src/ucp/wireup/wireup.c Resolved
Comment thread src/ucp/core/ucp_ep.c Resolved
- Added assertions to ensure proper state checks for UCT endpoints during recovery.
- Simplified the recovery path by removing unnecessary checks and ensuring that wireup endpoints are correctly marked as ready.
- Updated the randomization logic in the fault tolerance tests to use a more efficient method.
- Improved error handling in wireup connection processes to ensure robust endpoint management.
@evgeny-leksikov
evgeny-leksikov force-pushed the ft-split/06-recovery-rebuild-upstream branch from ef69773 to 458f386 Compare July 3, 2026 14:10
@evgeny-leksikov
evgeny-leksikov requested a review from gleon99 July 3, 2026 19:10
@evgeny-leksikov
evgeny-leksikov merged commit 9db2e48 into openucx:master Jul 6, 2026
161 checks passed
wilsonliu-b10 added a commit to basetenlabs/ucx that referenced this pull request Sep 21, 2026
Brings the fork's UCP fault-tolerance work under the device plane: probe-gated
lane recovery (openucx#11563), lane rebuild via LANES_ADDR (openucx#11562), and the fix that
stops progressing an exhausted recovery instead of asserting on it. The device
work was forked before all three, so until now the two could not be pinned
together and a trt-llm image had to choose.

One conflict, in ucp_wireup_ep_connect_aux: both sides changed how the
auxiliary transport is selected, for the same reason and by different means.
The device plane narrows the tl_bitmap to the endpoint's device pin, so an
auxiliary cannot land on a device no lane is on; master added local and remote
device bitmaps to the same selector. Resolved as the device pin plus UINT64_MAX
for both new bitmaps -- the tl_bitmap already excludes every other device's
resources, so restricting again by device index would be redundant, and
UINT64_MAX is what master passes at this site.

Master's own new call site, in ucp_ep_recovery_create_aux_ep, needs nothing:
it already sets local_dev_bitmap to UCS_BIT of the failed lane's dev_index, so
recovery keeps an auxiliary on the lane's device. The two mechanisms encode the
same invariant and do not fight.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Wilson Liu <wilson.liu@baseten.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants