mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[GH-ISSUE #3428] [Bug]: Mooncake crashes under high concurrency (512 vs 64) due to suspected stack corruption in store.batch_* functions #875
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#875
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 @marxpengdc-crypto on GitHub (Aug 13, 2026).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/3428
Bug Report
Description
The Mooncake service crashes when the concurrent load increases from 64 to 512. The crash is suspected to be caused by the C++ functions store.batch_is_exist, store.batch_put_from_multi_buffers, and store.batch_is_exist. The stack trace shows an invalid address 0xffffffffffffffff, which is a strong indicator of stack corruption (e.g., a buffer overflow)
The main bug is
(ApiServer_7 pid=172807) INFO: 127.0.0.1:44928 - "GET /metrics HTTP/1.1" 200 OK
!!!!!!! Segfault encountered !!!!!!!
File "", line 0, in std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_append(char const*, unsigned long)
File "", line 0, in _PyObject_MakeTpCall
File "", line 0, in _PyEval_EvalFrameDefault
File "", line 0, in 0xffffffffffffffff
vllm version:v0.24.0
mooncake-transfer-engine-cuda13 0.3.11.post1
MOONCAKE_CONFIG_PATH=/tmp/mc_dp8_ssd_v2/mooncake_config.json
PYTHONHASHSEED=0
FLASHINFER_DISABLE_VERSION_CHECK=1
vllm serve deepseek-ai/DeepSeek-V4-Flash
--served-model-name deepseek-v4 --host 0.0.0.0 --port 8000
--tensor-parallel-size 1 --data-parallel-size 8 --data-parallel-size-local 8
--enable-expert-parallel --enable-ep-weight-filter
--all2all-backend deepep_high_throughput --kv-cache-dtype fp8
--gpu-memory-utilization 0.70 --enable-prefix-caching --enforce-eager
--max-model-len 256000 --max-num-seqs 16 --max-num-batched-tokens 8192
--enable-chunked-prefill --enable-cumem-allocator
--kv-transfer-config '{"kv_connector":"MooncakeStoreConnector","kv_role":"kv_both","kv_connector_extra_config":{"load_async":true,"lookup_async":true,"cache_prefix":"mc_dp8_ssd_v2"}}'
mooncake_master
--rpc_port=50051 --rpc_address=0.0.0.0
--enable_offload=true --offload_on_evict=true --promotion_on_hit=true
--enable_disk_eviction=true --allocation_strategy=ssd_free_ratio_first
--root_fs_dir=/tmp/mooncake_offload --quota_bytes=536870912000
aiperf profile
--model deepseek-v4
-deepseek-ai/DeepSeek-V4-Flash
--url http://127.0.0.1:9001 --endpoint-type chat
--streaming --use-server-token-count
--custom-dataset-type multi_turn
--input-file multi_turn.jsonl
--concurrency 512 --workers-max 256 --benchmark-duration 600
--connection-reuse-strategy sticky-user-sessions
--wait-for-model-timeout 0 --export-level raw
--artifact-dir /data-cfs/aiperf_runs/mt512_256k_dp8_mooncake_ssd_v2
--profile-export-prefix mt512_256k_dp8_mooncake_ssd_v2 --ui none
vllm.log
client.log
master.log
mooncake_config.json
mooncake_metrics.log
@github-actions[bot] commented on GitHub (Aug 13, 2026):
Thanks for opening this issue, @marxpengdc-crypto!
277691891A maintainer will triage this when possible. To help us respond faster, please include:
Useful links: Documentation · Contributing guide
@LujhCoconut commented on GitHub (Aug 14, 2026):
I went through the attached logs.
First, I noticed in
vllm.log:This looks RDMA-MR-related. From my experience it's worth checking whether
nvidia-peermemis loaded (lsmod | grep nvidia_peermem), or whether the CUDA driver matches themooncake-transfer-engine-cuda13wheel.Second, I don't see any actual data reads/writes in the logs —
Mem StorageandSSD Storagestay at 0 B, and the connector's prefix-cache counters arerequests=0, queries=0, hits=0. So the Mooncake data path seems idle at crash time.What I'm confused about is whether this same deployment actually runs fine at 64 concurrency. The
register_buffer failed -600andBad address [14]errors are emitted at startup, independent of load — if missingnvidia-peermemwere the cause, they should appear at 64 concurrency too. Confirmation of the 64-concurrency behavior would help narrow this down.@whn09 commented on GitHub (Aug 14, 2026):
This was routed to me as the EFA transport code owner, but this deployment does not use the EFA transport, so I'm not the right owner for it.
From the attachments:
mooncake_config.jsonsets"protocol": "rdma"and"device_name": "mlx5_0", and the logs go throughrdma_transport.cpp/rdma_context.cpp(Found 1 HCAs,RDMA device: mlx5_0, GID_Index 3).mooncake-transfer-engine-cuda13 0.3.11.post1is the generic PyPI CUDA 13 wheel, built withUSE_EFA=OFF, soefa_transportisn't compiled into it at all.efa/libfabricreference anywhere invllm.log.So this belongs to the RDMA transport + mooncake-store owners rather than to the EFA path: cc @alogfans @ykwd for reassignment.
Two notes that may save the next person some time:
mooncake-transfer-engineversion in the report doesn't match the binary that produced these logs.PLOG(ERROR) << "Failed to register memory "is atrdma_context.cpp:346inv0.3.11.post1and at:588inv0.3.12.post1, but the log saysrdma_context.cpp:521— so the loadedengine.sois some intermediate build. @marxpengdc-crypto, could you post the exact commit SHA (orpip show -f/ the wheel filename) for the module that is actually loaded?store.batch_*hypothesis in the issue title; happy to post it here if the new assignee wants it, just ping me.@ykwd commented on GitHub (Aug 14, 2026):
@whn09 Sorry, I accidentally assigned you the wrong issue. Could you take a look at this one when you have a chance? https://github.com/kvcache-ai/Mooncake/issues/3434
@marxpengdc-crypto commented on GitHub (Aug 17, 2026):
After modprobe nvidia-peermem we fix the problem thanks