mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[GH-ISSUE #2197] [Bug]: 华为昇腾,开启ascend_use_fabric_mem时,使用dummy-client卸载ssd,出现unmap 崩溃 #604
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#604
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 @xuyucheng220 on GitHub (May 23, 2026).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/2197
Bug Report
初步分析原因:
mooncake-store/src/real_client.cpp中在 FabricMem=1 时跳过RegisterLocalMemory:
if (!globalConfig().ascend_use_fabric_mem) {
auto result = client_->RegisterLocalMemory(mapped_va, mem_size, "npu",
false, true);
if (!result.has_value()) {
LOG(ERROR) << "Failed to register memory";
(void)aclrtIpcMemClose(ipc_key_bytes.data());
return tl::unexpected(result.error());
}
LOG(INFO) << "RegisterLocalMemory for ipc shm, va:" << mapped_va;
}
但是Unmap 时 teardown_ascend_shm_buffer始终调 unregisterLocalMemory,没有判断是否开启了fabricMem:
void RealClient::teardown_ascend_shm_buffer(MappedShm &shm) {
#ifdef USE_ASCEND_DIRECT
(void)ContextManager::getInstance().setCurrentContextByPhysicalId(
shm.device_id);
if (shm.shm_size > 0 && client_) {
auto res = client_->unregisterLocalMemory(shm.shm_buffer, true);
if (!res) {
LOG(WARNING)
<< "Failed to unregister local memory for shared memory: "
<< shm.shm_name << ", error: " << toString(res.error());
}
}
Before submitting...
@ascend-direct-dev commented on GitHub (May 25, 2026):
unregisterLocalMemory has special handling — if the memory was not registered, it is skipped and will not cause problems. However, we suggest identifying the root cause.