Skip to content

UCP/FT: wireup msgs LANES_ADDR_REQUEST/REPLY and EP recovery state machine - #11545

Merged
evgeny-leksikov merged 5 commits into
openucx:masterfrom
evgeny-leksikov:ft-split/05-recovery-protocol
Jun 17, 2026
Merged

evgeny-leksikov merged 5 commits into
openucx:masterfrom
evgeny-leksikov:ft-split/05-recovery-protocol

Conversation

@evgeny-leksikov

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

Copy link
Copy Markdown
Contributor

What?

  • wireup msgs LANES_ADDR_REQUEST/REPLY
  • EP recovery state machine

Why?

Part of #11379 upstreaming

@evgeny-leksikov
evgeny-leksikov force-pushed the ft-split/05-recovery-protocol branch from 24ff1ed to 486ab2f Compare June 10, 2026 09:35
@evgeny-leksikov
evgeny-leksikov marked this pull request as ready for review June 10, 2026 09:37
@shasson5

Copy link
Copy Markdown
Contributor

CI failure looks relevant

@evgeny-leksikov
evgeny-leksikov force-pushed the ft-split/05-recovery-protocol branch from 486ab2f to 11c1b8a Compare June 10, 2026 14:33
Comment thread src/ucp/wireup/wireup.c Resolved
Comment thread src/ucp/core/ucp_ep.c Resolved
Comment thread src/ucp/wireup/wireup.c Resolved
Comment thread src/ucp/core/ucp_ep.c Resolved
Comment thread src/ucp/core/ucp_ep.c Outdated
}

now = ucs_get_time();
if (now < recovery_arg->next_time) {

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.

before next_time, the recovery requeues itself. As ucs_callbackq_add_oneshot allocs and makes it runnable on the next progress, this can spin for the default interval per failed endpoint.

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.

Reworked using KA progress callback

Comment thread src/ucp/wireup/wireup.c
ucp_tl_bitmap_t tl_bitmap;
ucs_status_t status;

tl_bitmap = ucp_wireup_get_ep_tl_bitmap(ep, provided_lane_map);

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.

provided_lane_map is reduced to a TL bitmap, but ucp_address_pack still packs EP addrs for all p2p_lanes on those resources.

Once rebuilding starts returning nonzero maps, this can include unrelated or failed lanes w same resource. The addr pack path needs a lane filter, not only a resource bitmap.

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.

I don't think so, for example, we may need ud iface addr in addition to rc qp. We can send full address, but reducing by failed resources looks to me reasonable optimisation here

Comment thread src/ucp/core/ucp_ep.c Resolved
Comment thread src/ucp/wireup/wireup.c Resolved
Comment thread src/ucp/wireup/wireup.c Resolved
Comment thread src/ucp/wireup/wireup.c Resolved
…y logic

- Removed the RECOVERY_INTERVAL configuration option from ucp_context_config.
- Updated recovery logic to utilize only the RECOVERY_RETRIES parameter.
- Simplified the recovery state management in ucp_ep_recovery_progress.
- ucp_ep_recovery_progress is managed by common KA engine
- Ensured proper memory management for recovery arguments during endpoint destruction.
Comment thread src/ucp/core/ucp_ep.h Resolved
Comment thread src/ucp/core/ucp_ep.c Resolved
Comment thread src/ucp/core/ucp_ep.c Resolved
Comment thread src/ucp/core/ucp_ep.c Resolved
Comment thread src/ucp/core/ucp_ep.c Resolved
- Updated comments to use block comment style for clarity.
- Adjusted formatting for better readability in the ucp_ep_recovery_arm and ucp_ep_recovery_progress functions.
@evgeny-leksikov
evgeny-leksikov enabled auto-merge (squash) June 17, 2026 16:47
evgeny-leksikov added a commit to evgeny-leksikov/ucx that referenced this pull request 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 added a commit to evgeny-leksikov/ucx that referenced this pull request Jun 17, 2026
…nucx#11545)

Squashed PR-5 (ft-split/05-recovery-protocol) - dependency base for the
recovery lane-rebuild commit. Drop once openucx#11545 is merged to master.
evgeny-leksikov added a commit to evgeny-leksikov/ucx that referenced this pull request 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 merged commit 6c7c8ff into openucx:master Jun 17, 2026
160 checks passed
evgeny-leksikov added a commit to evgeny-leksikov/ucx that referenced this pull request 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.
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.

4 participants