mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[GH-ISSUE #4662] [Bug]: TENT remote NIC selection can pair a rail NIC with a peer NIC it cannot reach; each such pair costs an RC retry timeout before the rail is paused #1188
Labels
No labels
ascend
auto-closed
bug
bug
CI/Build
Common
documentation
enhancement
feature request
good first issue
help wanted
high priority
MetaX
nightly-failure
pull-request
PyTorch Backend
question
RFC
Roadmap
stale
Store
Tests
Transfer Engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/Mooncake#1188
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @xiaodouzi666 on GitHub (Oct 14, 2026).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/4662
Bug Report
What happens
Workers::selectOptimalDevicepicks the remote device from the rail mapping (findBestRemoteDevice, by position/NUMA) or from the target's device list at a random start, preferring the same NUMA node (src/transport/rdma/workers.cpp:1540-1590, as of342c8aee). Nothing in the selection asks whether the local and the remote NIC are on networks that reach each other. On hosts with a front-end NIC (mlx5_0, overlay network) and four rail NICs (separate rail subnets), with all five NICs enabled on both sides, the selector pairs a rail NIC with the peer'smlx5_0: the QP's RC retries exhaust after ~3.7 s (IBV_WC_RETRY_EXC_ERR), the rail monitor pauses that pair, and the slice is retried on another pair. Requests that cannot complete within the 10 s budget fail. The rail monitor state is per worker, so each worker pays the timeout once for the same unreachable pair.Measured (two hosts, five NICs each:
mlx5_0on the management network,mlx5_1-4on four rail subnets with policy routing between them): a 5×5 NIC-pair matrix, each cell an engine restricted to that one pair, agrees withib_write_bwin both directions on all 25 pairs — the 16 rail↔rail pairs work (cross pairs included),mlx5_0↔mlx5_0works over the management network, and the 8 pairs betweenmlx5_0and a rail NIC do not (transport retry counter exceeded, thenRail paused). With automatic selection and all five NICs enabled on both sides, the sametest-runsession spent an extra ~18 s (A→B) and ~33 s (B→A) on those pairs before its transfers completed, and a transfer with a 10 s deadline fails outright. On a single host the position-based mapping likewise pairs a rail NIC with the localmlx5_0.Why it matters
Default deployments usually leave all NICs enabled; the cost shows up as multi-second stalls and timeouts right after start, and the only trace is a
Rail paused: local_nic=<id> remote_nic=<id>line after the retry timeout, with NIC indices rather than names. Users work around it withMC_TE_FILTERSor a rail file, but only after finding out.Possible directions
When choosing the remote NIC, prefer candidates whose published GID (IPv4-mapped RoCE v2 GIDs carry the subnet) is in the same subnet as, or routable from, the local NIC's address — the descriptor already carries every device's GID; or let the rail file express "no path" pairs; and share an unreachable-pair verdict across workers so the timeout is paid once per pair rather than once per worker. We can prepare a patch if one of these is acceptable.
Reproduction
Two hosts with a front-end NIC on a different network than the rail NICs; all NICs enabled; start transfers and watch "Rail paused: local_nic=… remote_nic=…" after ~3.7 s. Our #2864 diagnostics tool shows the matrix with
tent diagnostics test-run --rail-matrix.Environment: commit
342c8aee; Linux x86_64 hosts with mlx5 RoCE v2 NICs: a front-end NIC on the management network and four rail NICs on separate subnets with policy routing.Before submitting...
@github-actions[bot] commented on GitHub (Oct 14, 2026):
Thanks for opening this issue, @xiaodouzi666!
77219630A maintainer will triage this when possible. To help us respond faster, please include:
Useful links: Documentation · Contributing guide