mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
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#589
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 @mustafayildirim on GitHub (May 19, 2026).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/2145
Originally assigned to: @alogfans on GitHub.
Bug Report
Hi @alogfans — filing a fresh report to add reproduction + production-impact data on top of #1267 (CLOSED 2026-03-03). #1267 was closed by the cosmetic
static_cast<const void*>(addr)logging change, but its underlying use-after-free inClientSession::writeBodyis unfixed and reproduces deterministically on0.3.10.post2.Environment
mooncake-transfer-engine-non-cuda==0.3.10.post2(pip wheel)vllm==0.21.0with the built-inMooncakeStoreConnector(vLLM PR #40900) —kv_role: kv_both,kv_connector: MooncakeStoreConnectorprotocol: tcpMC_TCP_ENABLE_CONNECTION_POOL=1(the env added in #1508)10.151.0.0/16). Mooncake master + etcd at cluster DNS names.Crash signature (matches #1267 byte-for-byte)
Note
datapointer ==bufferpointer in every log line — consistent with the upper layer freeing the buffer before asio'sasync_writecompletes (matches @ykwd's diagnosis in #1267).What's new vs #1267
1. Production impact is worse than #1267 documented
Because the Mooncake client is loaded as a Python extension inside the vLLM worker process, the SIGSEGV doesn't just lose KV cache data — it kills the engine core entirely. vLLM's
output_handlerpropagates the death asEngineDeadError:Every concurrent HTTP streaming request fails with 500, not just the in-flight Mooncake put. The pod recycles (~2-3 minutes) before the API server is reachable again.
2. We can reproduce on demand
Sustained synthetic chat traffic (Mistral 24B, fp8 KV cache, ~250-token inputs, max_tokens=20) reliably triggers the segfault within minutes. Both client pods in our test crashed; the second crashed within the next 5-minute monitoring window after the first.
What we'd like
MC_TCP_ENABLE_CONNECTION_POOL=1in troubleshooting.md explicitly noting it can cause SIGSEGV in the consumer process. The current text discusses fd leaks + a circular-wait hang hypothesis but does not mention the actual UAF that crashes the process.tcp_hptransport) or as a targeted patch to the existing transport? Knowing the plan helps operators pin to a version once it's available.Happy to collect more data (gdb dump, asan build) if helpful — let me know what would be most useful.
Cross-referenced upstream issues / PRs:
tcp_hptransport replacement (OPEN)@alogfans commented on GitHub (May 21, 2026):
Thanks for the error report! We will fix & validate TCP transport to be pointer-safe.
@alogfans commented on GitHub (May 22, 2026):
We develop a PR that postpone socket reuse and buffer free until the last async_write is fully done via boost::post. I think it will be helpful for your environment.