mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[GH-ISSUE #1766] [Bug]: Failed to modify QP to RTR with Yunsilicon XScale (xsc-pci) RDMA NIC in SGLang PD disaggregation #510
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#510
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 @PaggyZhang on GitHub (Mar 29, 2026).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/1766
Bug Report
[Bug]: Failed to modify QP to RTR with Yunsilicon XScale (xsc-pci) RDMA NIC in SGLang PD disaggregation
Environment
sglang:maca-250822-deepep-250917-mcoplib-0923-stepmesh-0.0.1.dev0-source-c77e9e80-driver)c77e9e80)xsc-pci)xscale_0,xscale_1,xscale_2,xscale_3ibv_devinfo output
Network topology
xscale_0→172.23.168.0/22(net1)xscale_1→172.24.168.0/22(net2)xscale_2→172.25.168.0/22(net3)xscale_3→172.26.168.0/22(net4)ip addr showconfirmsinet 172.23.x.x/22 scope global net1)ib_write_bw/ custom RC testProblem
When SGLang uses mooncake Transfer Engine as the KV cache transfer backend for prefill-decode disaggregation, the RDMA QP handshake fails with
Invalid argument [22]duringibv_modify_qp(INIT→RTR).This happens even with single NIC (
device_name: "xscale_0") and same subnet (both endpoints on 172.23.x.x/22).Mooncake configuration
Environment variables:
Error logs
Decode side (rdma_endpoint.cpp:425)
Prefill side (rdma_endpoint.cpp:157)
Key observation:
peer.local_nic_pathandpeer.peer_nic_pathare empty, meaning the P2P handshake metadata exchange is incomplete — the decode side fails before it can send its NIC path back to the prefill side.Earlier in startup — MR registration also fails
Both heap addresses (
0x55...) and mmap addresses (0x7f...) fail. The buffer is first shrunk from its original size to 1GB (devicemax_mr_sizelimit), butibv_reg_mrstill returns EINVAL.Note: Despite MR registration failures, the SGLang server starts and serves HTTP requests. The failures surface when actual KV transfer is attempted.
What we've verified
ip routeconfirms same /22 subnet routing.ulimit -l unlimitedconfirmed — not a memlock limit issue.active_mtu: 4096,max_mtu: 4096— MTU is consistent.device_name: "xscale_0"only — same result.device_name: "xscale_0,xscale_1,xscale_2,xscale_3"— additional cross-subnet QP failures as expected (different subnets), but the same-subnet QP (xscale_0↔xscale_0) also failed.Analysis
The xsc-pci driver passes standalone
ib_write_bwtests but fails when mooncake creates QPs. This suggests that mooncake'sibv_modify_qpcall to transition QP from INIT→RTR uses parameters that are not accepted by the xsc-pci driver. Possible causes:ibv_qp_attrvalues that mooncake sets during INIT→RTR transition (e.g.,max_rd_atomic,min_rnr_timer,retry_cnt,rnr_retry,timeout,path_mtu, orah_attrfields).ibv_reg_mrfailure (EINVAL on both heap and mmap) may indicate the driver has stricter requirements for memory registration flags or alignment.Expected behavior
QP should transition to RTR successfully, enabling RDMA-based KV cache transfer between prefill and decode instances.
Workaround attempted
protocol: "tcp"instead of"rdma"in mooncake config as a temporary workaround to bypass RDMA QP creation entirely.Request
xsc-pci) is a tested/supported RDMA device for mooncake Transfer Engine?MC_MTU,MC_GID_INDEX) that could help with non-Mellanox RDMA NICs?rdma_endpoint.cpparound theibv_modify_qpcall to print the exactibv_qp_attrvalues being used (mtu, gid, dest_qp_num, rq_psn, max_rd_atomic, etc.)? This would greatly help diagnose driver-specific incompatibilities.Related
sglang.srt.disaggregation.mooncakeBefore submitting...
@alogfans commented on GitHub (Mar 30, 2026):
If the Yunsilicon XScale's doc has said that xsc-pci driver may not support certain ibv_qp_attr value, the first step is to vibe a minimized prototype that two nodes can communicate with each other. Can you use regular ib_write_bw testsuite?
@PaggyZhang commented on GitHub (Mar 30, 2026):
We have already verified basic RDMA connectivity using ib_write_bw. A full-mesh test across 6 nodes × 4 NICs (480 RDMA RC connection pairs) all passed successfully using standard perftest tools (ib_write_bw -d xscale_0 -x 5).
This confirms that the xsc-pci driver supports standard QP attributes used by ib_write_bw. The issue only occurs when mooncake's Transfer Engine creates QPs — suggesting that mooncake sets certain ibv_qp_attr values during the INIT→RTR transition that differ from what standard perftest tools use, and those specific values are not accepted by the xsc-pci driver.
If it would help narrow down the incompatibility, we can provide a side-by-side comparison of the QP attributes used by ib_write_bw vs. mooncake, or test with specific ibv_qp_attr overrides if mooncake exposes any configuration for them.
@JianDan0212 commented on GitHub (Apr 2, 2026):
The PD disaggregation feature implemented with Mooncake on vLLM-Metax is working normally, and we have not encountered the handshake failure issue mentioned above.
We are using our internally adapted version 0.3.6 of Mooncake, which has been fully tested and validated across vLLM versions 0.14 to 0.18 without any issues.
The network card information used in our testing is shown in the figure below:
Our startup commands are as follows: