mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[GH-ISSUE #4981] [Bug][PG]: multi-node init_process_group(backend="mooncake"/"mooncake-cpu") without set_host_ip() publishes 127.0.0.1; rank 0 then hangs forever #1262
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#1262
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 @0z5a on GitHub (Oct 27, 2026).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/4981
Describe the bug
MooncakePGContext::host_ipdefaults to"127.0.0.1"(mooncake-pg/include/mooncake_communicator.h) and is passed unchanged toengine->init(P2PHANDSHAKE, host_ip)(mooncake_communicator.cpp). In P2P-handshake mode the Transfer Engine publisheshost_ip:<rpc_port>as its segment name, and the coordinator listens on the same address. Unless the caller invokesmooncake.pg.set_host_ip(<routable IP>)(orset_transfer_engine) beforeinit_process_group, a multi-node job advertises loopback addresses to remote ranks.Observed on 2 nodes × 1 GPU (aarch64, InfiniBand),
mooncake-pg/benchmark/pgbench.py --collective all_reduce --backend mooncake-cpu --device cpu, torchrun-style env (RANK,WORLD_SIZE=2,MASTER_ADDR=<node0 IP>):mooncakePgCommCreate failed: operation timed out: timed out waiting for agent registration ... [initialize @ mooncake_communicator.cpp:722]Transfer Engine RPC using P2P handshake, listening on 127.0.0.1:<port>and never returns or errors; it had to be killed after 120 s.mooncake.pg.set_host_ip(<node IP>)beforeinit_process_grouppasses (21 sizes × 200 correctness checks, 0 wrong).Expected behavior
Either derive a routable address by default (as the non-P2P Transfer Engine path does from the hostname, or from the interface that reaches
MASTER_ADDR), or fail fast on rank 0 too, with a message that points atset_host_ip. The PG quick start (docs/source/api-reference/python/ep-backend.md) does not mention thatset_host_ipis required for multi-node runs.Related harness issue
pgbench.py(andpg_test_utils.py/ep_test_utils.py) map rank →cuda:<rank>or requiretorch.cuda.device_count() >= world_size, so--device cudarefuses to run on multi-node setups with one GPU per node ("Requested more ranks than available CUDA devices"). UsingLOCAL_RANKwould fix it.AI assistance disclosure
Found by AI-assisted code reading (Claude) and confirmed on the hardware above.
@github-actions[bot] commented on GitHub (Oct 27, 2026):
Thanks for opening this issue, @0z5a!
192209249A maintainer will triage this when possible. To help us respond faster, please include:
Useful links: Documentation · Contributing guide