mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[GH-ISSUE #2156] [Bug]: Assertion `sizes[i] <= kMaxSliceSize' failed when using SSD offload #594
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#594
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 @TrafalgarZZZ on GitHub (May 20, 2026).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/2156
Originally assigned to: @LujhCoconut on GitHub.
Bug Report
Bug Description
I'm following the Mooncake SSD Offloading Benchmark doc to verify Mooncake store's KV cache offloading feature. It consistently fails with the following error:
Steps to Reproduce
Here's my steps following the "Mooncake SSD Offloading Benchmark" doc:
Initially, the system works well when there's no eviction in Mooncake store. When the 20 GiB Memory (set by
--global_segment_size) runs out, it reports something like:but some short time later (I think it's the time SGLang trying to get the offloaded object), mooncake client complains the error and crashed:
Meanwhile, SGLang reports errors like:
Is it a bug? Or maybe I missed something that need to be pre-configured.
Before submitting...
@LujhCoconut commented on GitHub (May 21, 2026):
I briefly looked into this. This is a size-limit inconsistency bug in Mooncake Store's SSD offloading:
master_service.cpp:917only enforces thekMaxSliceSize(~4MB) limit when using theCACHELIBallocator — other allocators likeOffsetAllocatorare allowed to put slices larger than 4MB.FileStorage::AllocateBatch(file_storage.cpp:617) enforcesassert(sizes[i] <= kMaxSliceSize)unconditionally, regardless of allocator type.When the put side accepts a large object (e.g., a KV cache page from a 35B model with
--page-size=64can easily exceed 4MB), the get side will crash upon reading it back from SSD.Fix: Removing this assertion should suffice, as
OffsetAllocatorcan handle larger allocations andBatchLoadreads contiguous data from the bucket file correctly regardless of size. Will dig deeper to confirm and submit a fix.@TrafalgarZZZ commented on GitHub (May 21, 2026):
@LujhCoconut Glad to hear that! I can try again after #2165 merges.