mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[GH-ISSUE #4350] [Documentation]: [TransferEngine] GPU memory registration fails with "Bad address" on DMA-BUF-only hosts: WITH_NVIDIA_PEERMEM defaults to true, with no fallback or hint #1090
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#1090
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 @cloudomate on GitHub (Sep 28, 2026).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/4350
Documentation Feedback
Hi Mooncake team, and thanks for the DMA-BUF registration path. It works well for us once enabled. We lost some time finding out that it has to be enabled explicitly, so here are a few suggestions that may help others.
Environment
mooncake-transfer-engine-cuda13==0.3.13.post1(PyPI) in a CUDA 13.0 image; also checked currentmain(16b7ba3)3g.71gband1g.18gbGPU instances), ConnectX-7 over RoCEnvidia-peermem: GPU Operator withdriver.rdma.enabled=false. Per NVIDIA's GPU Operator docs, peermem needs MLNX_OFED/DOCA-OFED, while DMA-BUF only needs the open kernel modules and Linux ≥ 5.12.MooncakeStoreConnector(standalone store), which registers its GPU KV cacheWhat happens
WITH_NVIDIA_PEERMEM. The engine keeps serving, so the only visible symptom is that nothing is ever stored.Root cause
mooncake-common/src/environ.cpp:201reads the variable with a default oftrue:So
RdmaContext::exportDmabufpickskHostReg, and GPU memory goes to plainibv_reg_mr(). That call needsnvidia-peermemand fails withEFAULTwithout it.Setting
WITH_NVIDIA_PEERMEM=0fixes it completely. We checked with a small probe on the same MIG slice:CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPPORTEDcuMemGetHandleForAddressRange(DMA_BUF_FD)ibv_reg_mron the GPU bufferibv_reg_dmabuf_mr(with and withoutIBV_ACCESS_RELAXED_ORDERING)TransferEngine.register_memoryon the GPU bufferWITH_NVIDIA_PEERMEM=0Documentation
docs/source/design/transfer-engine/index.md) say "By default (unset or0), Mooncake uses the DMA-BUF path". That was the opposite of the code for the release we ran. We seemainhas since corrected the English page, thank you.docs/source/zh_archive/transfer-engine.md:427anddocs/sorce/zh_archive/run-examples.md:42onmainstill say the default is DMA-BUF.Suggestions (any one would have saved us the debugging; your call which fits best)
ibv_reg_mr()on device memory fails withEFAULTwhileWITH_NVIDIA_PEERMEMis unset (not explicitly1), retry once through the DMA-BUF export. If DMA-BUF also fails, report both errors.nvidia_peermemisn't loaded (/sys/module/nvidia_peermemabsent) and the device reportsDMA_BUF_SUPPORTED=1.ibv_reg_mr, log a hint such as "GPU memory registered via ibv_reg_mr (WITH_NVIDIA_PEERMEM unset/true), which requires nvidia-peermem; set WITH_NVIDIA_PEERMEM=0 to use DMA-BUF." An INFO line at startup saying which registration path is in use would also help.Before submitting a new issue...
@github-actions[bot] commented on GitHub (Sep 28, 2026):
Thanks for opening this issue, @cloudomate!
38678537A maintainer will triage this when possible. To help us respond faster, please include:
Useful links: Documentation · Contributing guide