mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[GH-ISSUE #2684] rdma+hip multi-protocol KV transfer fails on single-node disaggregation (Corrupted segment descriptor / Failed to get kvcache) #699
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#699
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 @Lzy17 on GitHub (Jun 30, 2026).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/2684
Originally assigned to: @amd-arozanov on GitHub.
Summary
On a single node with both an RDMA NIC and the HIP intra-node transport installed, prefill/decode (PD) disaggregation fails to transfer KV cache. Every P/D session dies right after warmup and the decode side reports
Failed to get kvcache from prefill instance. This is the configuration AMD single-node disaggregation runs in (ENABLE_MULTI_PROTOCOL=ON, ROCm/MI355X), where the device KV pool should move over HIP (intra-node XGMI) and the host-resident metadata/aux buffers over RDMA.Environment
USE_HIP=ON -DENABLE_MULTI_PROTOCOL=ON.batch_register.Symptoms
Warmup succeeds, then the first real request fails. Logs:
decode side:
prefill side:
The curl through the router returns:
Root cause
On a single node the transfer engine registers every buffer into all installed transports and publishes them under one shared local segment. With
rdma+hipinstalled, three things break:Host-memory registration rolls back the batch. The PD metadata/aux buffers (e.g.
output_ids,bootstrap_room) are host (CPU) tensors —hipPointerGetAttributesreturns memory type0(not Device), addresses in the0x5555...range.HipTransport::registerLocalMemoryrejects them withUnsupported memory typeand returns-1, which rolls back the whole multi-transport batch and tears down sessions. (HIP IPC can only export device memory; these host buffers should simply be left to RDMA/TCP.)The local segment protocol is overwritten. Each transport's
install()overwritesLOCAL_SEGMENT_ID; HIP installs last, so the segment protocol collapses fromrdmato a singlehipinstead ofrdma,hip.rdma+hipis not a recognized multi-protocol combination. The multi-protocol segment encode/decode allow-list is hardcoded toCXL+TCP/CXL+RDMA(max 2, CXL required) atencodeSegmentDesc/decodeSegmentDesc. So the node is not encoded via the multi-protocol path; it collapses to a single-protocolhipdescriptor whose buffer list still contains the RDMA-registered KV buffers (these carry rkey/lkey, noshm_name). The single-protocolhipdecoder requires every buffer to have a non-emptyshm_name, so the rdma-origin KV entries tripCorrupted segment descriptor→ the remote segment is unusable → KV transfer dies.Note (3) is the primary blocker: even after fixing (1) so host buffers are skipped, end-to-end transfer still fails at the
Corrupted segment descriptorcheck.Why it wasn't seen before
Cross-node disaggregation uses the pure
rdmapath (RDMA can register host memory), which is unaffected. The failure only appears on a single node where thehiptransport is invoked on the shared segment alongsiderdma.Expected behavior
A single node with
rdma+hipinstalled should advertise both protocols on its local segment, register the device KV pool with HIP and the host aux buffers with RDMA, and route each transfer to the transport that owns the target buffer (device KV over HIP/XGMI, host aux over RDMA).Fix
Proposed in #2682.
Downstream CI reproduction (SGLang)
This was first hit by SGLang PR sgl-project/sglang#27730 (bump Mooncake + enable
ENABLE_MULTI_PROTOCOLfor AMD single-node disaggregation). CI run 28375167699 (ROCm 7.2), suitestage-b-test-large-8-gpu-mi35x-disaggregation-amd, fails — both prefill and decode on the same node (10.42.9.21, single node):Transfer-engine errors (exactly the failure described above):
surfaced to the client as:
The line numbers (
hip_transport.cpp:671,transfer_metadata.cpp:768) differ slightly from the local repro above because of build/version offsets, but the signatures and ordering are identical: host (type-0) buffers rejected withUnsupported memory type, then therdma+hipsegment collapses to single-protocolhipand the rdma-origin KV buffers (noshm_name) tripCorrupted segment descriptor.@github-actions[bot] commented on GitHub (Jun 30, 2026):
Thanks for opening this issue, @Lzy17!
36555117A maintainer will triage this when possible. To help us respond faster, please include:
Useful links: Documentation · Contributing guide
@github-actions[bot] commented on GitHub (Sep 29, 2026):
This issue has had no activity for 90 days and will be closed in 7 days if there is no further activity. Please comment or react if it should stay open.
@amd-arozanov commented on GitHub (Sep 29, 2026):
Closing the issue since https://github.com/kvcache-ai/Mooncake/pull/2682 was merged