Repository navigation
Conversation
Track native registrations until handshake publication, clean partial descriptor and peer state on setup failure, and retain failed cleanup for retry. Co-authored-by: OpenAI Codex <codex@openai.com> Signed-off-by: xijiade.aihemaiti <3146335281@qq.com>
xijiaat
requested review from
ApostaC,
NickLucche,
ivanium,
wzhao18 and
xuechendi
as code owners
October 1, 2026 01:00
This was referenced Oct 3, 2026
6 tasks done
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Roll back resources acquired by a NIXL handshake that fails before publishing
the peer. Today, failed setup can leave native metadata and descriptor state
outside the published-peer cleanup path.
Failure workflow
descriptors before publishing the peer in
_remote_agents.some resources have already been acquired.
_remote_agentstherefore misses the incomplete registration.The ownership gap is between native registration and Python-side publication.
The fix tracks registrations from acquisition until publication or successful
rollback, so an unsuccessful handshake does not leave them unaccounted for.
The native/API reproducer confirmed leftover metadata, but subsequent baseline
requests also succeeded. This fixes incomplete cleanup, not a demonstrated
permanent outage or inevitable deadlock.
This complements #50047's published-peer replacement cleanup and is distinct
from #55471's recovery after NIXL invalidates an already-published peer.
AI assistance was used. The human submitter has reviewed every changed line and
personally run the relevant tests for this change.
Claims
notification-only peers and earlier ranks in a partially completed handshake.
resources if cleanup itself raises so a retry can finish cleanup.
Validation
Base:
8fb16ea5a66f0ef362e728f0ff025f2845927fd5.The serving test ran on two H20 GPUs, TP1 + TP1, eager, short token-ID prompts,
256 MiB KV per engine and dummy weights. It injects one exception after native
registration and real handshake validation, then checks native metadata and
subsequent API requests. Main Python sources used v0.30.0 native extensions and
NIXL 1.4.1. This is not a fresh CUDA build of main. The native transport tests use
UCX TCP/CUDA-copy/CUDA-IPC, not cross-node RDMA fault injection. Dummy weights are
not a quality evaluation. The baseline also recovers on retry in this setup;
the demonstrated defect is incomplete resource cleanup, not inevitable deadlock.
All applicable pre-commit checks passed, including mypy.
Details
A pending registration journal records native agents immediately after
registration, including notification-only peers and earlier ranks of a partial
handshake. It is discarded after successful publication, when the existing
published-peer cleanup takes ownership. Failed setup reuses the existing
per-engine cleanup to release descriptors and registrations.
Cleanup removes each resource's bookkeeping only after the corresponding native
operation succeeds. If rollback itself raises, the remaining entries stay
tracked; subsequent setup first retries the unfinished rollback. The original
handshake failure remains visible.
The change is limited to connector resource ownership; it does not retry failed
requests, change scheduling, change model output, or promise recovery of a broken
UCX context. The original failure remains visible. Tests extend existing peer
replacement fixtures. No steady-state GPU synchronization is added. Concurrent
integration with #55471 has not been validated.
Duplicate-work checks also covered #56852 (checkpoint/reinitialization hooks),
#56341 (explicit router-driven peer retirement) and #54757 (listener hardening).
They do not cover rollback of an incomplete worker-side registration.
Pull Request Checklist
/pr-checklistskill. (Mandatory for agents, optional for humans).