mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[GH-ISSUE #546] Missing address validation on receiver side leads to core dump; unclear TransferRequest field naming in Rust SDK #184
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#184
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 @ActivePeter on GitHub (Jun 24, 2025).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/546
The receiver side currently does not validate the target address before performing a write operation. If the sender mistakenly provides an invalid or unmapped address, the receiver will attempt to write to it directly, resulting in an immediate core dump.
In addition, the TransferRequest struct in the Rust SDK has the following issues:
The field name target_offset is misleading — it actually represents a full address rather than an offset. A more appropriate name would be target_address.
The struct lacks proper documentation or inline comments, making it difficult for users to understand the purpose, units, and constraints of each field.
There are no links or references to related documentation, making the interface harder to use correctly.
@stmatengss commented on GitHub (Jun 24, 2025):
Address checking overhead:
Comprehensive address validation does introduce substantial overhead, particularly given that a single Transfer Engine may manage numerous large memory regions. However, we agree that an optional configuration to enable these checks would be a reasonable addition.
Rust API compatibility:
Since Rust APIs aren't widely adopted in state-of-the-art LLM engines (e.g., sglang/vLLM), we currently maintain these interfaces with lower priority. We'd welcome community contributions here – feel free to submit a PR if you'd like to improve this functionality.
@ActivePeter commented on GitHub (Jun 24, 2025):
In practice, I believe the overhead of address validation is relatively minimal—on the node holding the memory, it usually only involves comparing the requested address against local metadata structures. In contrast, in distributed environments, incorrect target addresses are more likely to occur—for example, due to inconsistent views of memory lifetimes across nodes, or missing consensus on allocation state. In such cases, the cost of a failed assumption can be severe (e.g., a segmentation fault or data corruption), while the cost of a check is relatively low. Therefore, enabling basic address checks by default could significantly improve system robustness with negligible performance impact in most scenarios.
@github-actions[bot] commented on GitHub (Jul 4, 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.
@github-actions[bot] commented on GitHub (Jul 13, 2026):
Closing due to 3 months of inactivity. If this is still relevant, please comment and we can reopen.