Repository navigation
Conversation
|
Review: the handshake is sound, but it needs four fixes and a two-machine run before landing. The crypto checks out:
All four TCP rank paths are covered, and one machine with several GPUs still meets without a key. To land:
Two-machine run, as we'll do it: two GB10s at TP=2 over the network, on the Flash Next pair, GLM or Nemotron, and the
This is a breaking change for multi-machine setups, and the changelog line should say so.
|
|
Review fixes pushed (41354b8):
Also fixed: Results:
Lean: 345 before and after. Still owed before landing: the two-machine run on two GB10s at TP=2.
|
|
Two-GB10 run at TP=2 on 41354b8 against main, GLM-5.3-Flash NVFP4:
Ready, and queued to land. Setups that run ranks on more than one machine need a key from this release; the changelog line says so.
|
d4d101a to
051bbf0
Compare
f78ed60 to
85da6c9
Compare
…tocol byte The TCP links between the ranks of a multi-GPU group took whichever host connected first. Both ends now send a fresh nonce and an HMAC-SHA256 over the nonces, the link, the rank and the group size, on the bootstrap, the liveness lines, the HIP link and the Flash Next pair. A connection that fails is closed and cannot stop the group. Ranks with no key meet on one host only. TF_RANK_SECRET_FILE or --rank-secret names the key file. Later frames are not signed and the links are not encrypted.
… gets 2 s - The key file opens through symbolic links, as secret mounts give it; the type and mode checks still run on the opened file, so a link to a file others can read is refused. - Rank keys need 32 bytes after trailing whitespace. The shared loader takes the minimum from its caller: rank links pass 32 and the stage ring keeps its 16, so every stage ring that starts today keeps starting. - A missing, different or short key's error names serve --rank-secret FILE and a one-line command that makes a key. - Rank 0 logs each refused connection with the peer's address and the reason. - An acceptor waits 2 s for the hello, so a silent connection no longer holds the serial accept for the whole 10 s budget. - The Flash Next CUDA rank device test passes the new secret argument to Link.open.
test-gradient-serving pins the bytes of the maintained serving sources; the train CI for this branch (#3168) stopped at zig/src/cuda/root.zig, but four differ: - zig/src/cuda/root.zig: tp_line.zig's tests are imported. - zig/src/cuda/tp_watch.zig, zig/src/families/flashnext/cuda_rank_engine.zig and cuda_rank_wire.zig: rank connections prove a shared key before their first protocol byte (b83c447). Each row takes its file's new hash, with the change named beside it.
Share one cumulative deadline across accepting and proving rank connections, closing accepted followers if formation expires. Cover it with a short-budget loopback host regression.
85da6c9 to
bf1d50b
Compare
What this changes
Before: rank 0 of a multi-GPU group took the first TCP connection as its peer on four paths: the
fabric/tpbootstrap, the GLM and Nemotron liveness lines, the HIP link and the Flash Next pair. A host that reached the port first was sent the checkpoint identity, the NCCL or RCCL id and then prompts, or could stop the group. After: both ends send a fresh 32-byte nonce and an HMAC-SHA256 over the nonces, the link, the rank and the group size before any other byte. A connection that fails is closed and cannot stop the group. Ranks with no key meet on one host only.SECURITY.mdasks for private reports, so there is no public issue.atc overlap --json: not run.Checks on this head
b83c447d088df47821ba18d1e94a84ca74e41a08python3 tools/zig/lean_check.py, on the base and on this head: 345 on the base, 345 on this head, 0 new.zig fmt --checkon 27 files: passesgit diff --check: passeszig build test-rank-auth-host test-tp test-stage test-stage-compile test-cli: 88/88 steps succeeded; 254/272 tests passed (18 skipped)zig build -Dhip=true check-native-hip-host test-native-hip-host test-environment-hip-host test-hip-family-offers-host test-qwen3-hip-host test-rank-link-hip-host: 22/22 steps succeeded; 60/60 tests passedzig build check-native-cuda-host compile-flashnext-mtp-parity-host compile-glm-native-open: 11/11 steps succeededzig build native: 66/66 steps succeededzig build test-server-cpu: 5/5 steps succeeded; 1326/1333 tests passed (7 skipped)zig build test-cuda-host: 391/391 steps succeeded; 6266/6306 tests passed (40 skipped)zig build test-golden test-server-security test-pull-security: 76/76 steps succeeded; 34/34 tests passedsecurity: a connection that proves no key is no liveness line and is sent nothingsecurity: a rank with another key and a second line for one rank are not linesstage secret: a proof's bytes are the ones the ring has always sentsecurity: a connection that proves no key cannot end the group or take a rank's placesecurity: a rank with another key or with none joins no keyed groupsecurity: rank 0 takes only the peer that proves the key, and a stranger that came first gets no framesecurity: a rank 1 with another key is refused and rank 0 keeps waiting for its peersecurity: a stranger that says a rank's hello first hears nothing and takes no placesecurity: a rank with another key or with none is refused by name, and rank 0 still takes its ownrank auth: a group across hosts needs a key, and each end is told sorank auth: this host is loopback, a local socket, or the address the connection reachedrank auth: ranks with one key prove both ways, keep one session key, and rank 0 learns who camerank auth: ranks with no key meet on one hostrank auth: a rank with another key is refused, and so is a key at one end onlyrank auth: a link, rank or world rank 0 does not take is refused before it answersrank auth: a stranger without the key gets a challenge and nothing morerank auth: a recorded proof replayed, rank 0's proof sent back, and a proof for another rank are refusedrank auth: other bytes, a short hello and a silent peer end inside the budget, with nothing sentrank auth: a connector tells an older build and a stranger from a rank, and sends them no proofrank auth: a proof binds the key, the end, the link, the rank, the world and both noncesrank auth: the key comes from the file the setting names, and no setting means no keyrank key: a mac changes with the key, with any part, and with the order of the partsrank key: a key file is a regular file only its owner can read, never a link, and holds 16 bytes to 4 KiBsecurity: --rank-secret takes only a key file its owner alone can read, and names it for every rank linkzig build testand every step that runs on a GPU were not run: this Mac's GPU was serving a model, and no CUDA, ROCm or Intel hardware was available.Receipt
--tpwith--master,TF_TP_*, the GLM and Nemotron liveness lines, the Flash Next pair) and on ROCm.TF_RANK_SECRET_FILE, orserve --rank-secret FILE. Default unset, and then ranks meet on one host only. Accepted: a path without control characters to a regular file only its owner can read, holding 16 bytes to 4 KiB. It has a row inplatform/environment.zigand indocs/environment.md. No profile row.Checklist
b38a4dd02. On this base only the passing side was rerun.For a change that reaches inference:
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo. Not measured: no served run.Notes for the reviewer
zig/tests/fixtures/gradient-serving.tsvneeds their lines re-pinned after merge (hashes below). The fixture is not edited here because itszig/src/cuda/experts.zigline is already stale on main.zig/build/hip.zigis at 600 lines with this change.zig/src/cuda/root.zigab1760e269f72b970ecf5f0a2b808777ff31001918b7d1134c3f083c20d12852;zig/src/cuda/tp_watch.zig4de1a9f14d514f1cbb5576b1db33cc11bd504b5a434ad3e7787af6d3a40c91a7;zig/src/families/flashnext/cuda_rank_engine.zige229100dc45d140a1ce138e22f7014527a38d900bbd8b0a62281a65ae7e956c7;zig/src/families/flashnext/cuda_rank_wire.zig5beb7662040418d09fd18400edcf0c1761b7ef9d157c43b847fef8178ddc13bd.Suggested changelog line
Multi-GPU ranks: every rank connection proves a shared key (
TF_RANK_SECRET_FILE, orserve --rank-secret FILE) before any other byte. Ranks with no key meet on one host only, so a group across hosts needs the key file on each.