mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[GH-ISSUE #5077] [Bug]: A3 Host registration breaks HBM reads with empty IPC key; buffered fallback rejected by HIXL CS #1279
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#1279
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 @lang-free on GitHub (Oct 29, 2026).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/5077
We reproduced a failure on Ascend A3 where adding a small Host allocation to a TransferEngine makes an otherwise successful HBM-to-HBM read fail with an empty IPC key. No model or router is needed to reproduce it.
This is related to #4916's buffered/CS backend selection question, but the failure stage differs: our small Host registration succeeds, then connection setup for a subsequent HBM read fails. We are not attributing this to the large-MR registration failure in that report.
Environment
cann-9.2.0; installed HIXL and Hcommversion.infofiles report 9.2.1, build timestamp20261021_221618020.ascend,P2PHANDSHAKE, HCCS path. No RoCE override in this comparison.ASCEND_ENABLE_USE_FABRIC_MEM=0,ASCEND_GLOBAL_RESOURCE_CONFIG={"comm_resource_config.qos":1},PYTORCH_NPU_ALLOC_CONF=expandable_segments:True;ASCEND_BUFFER_POOLunset.The Fabric setting above describes the actual probe environment. We are not assuming every Store code path interprets a present variable with value
0as disabled.Reproduction sequence
Use separate spawned processes and keep all allocations alive until the transfer finishes:
torch.uint8device tensor. Fill the source with 17 and the destination with 0, then synchronize.TransferEngine, callsinitialize(host_ip, "P2PHANDSHAKE", "ascend", ""), and registers its device tensor withregister_memory(ptr, size). Check each return value.posix_memalignandaclrtMallocHost; both fail at the later transfer step.get_rpc_port()and device tensor pointer to the destination through a multiprocessing pipe.The requested transfer is HBM-to-HBM in both cases. The three argument lists each contain one item; no Host address is in that read request.
Results
ret=0, destination bytes verified as 17posix_memalignHost allocation, same engineret=-1, empty IPC key / 107000aclrtMallocHostallocation, same engineret=0, bytes correctret=0, bytes correctStore setup with only the 1 MiB local buffer, or only the 64 MiB global segment, also reproduces the failure. An empty transfer-list control returns success without moving data or producing the IPC error.
Sanitized error chain:
In the original DeepSeek PD deployment, the same failure occurred with nonempty read descriptors (
op_descs size:50), after both workers had registered HBM and Host regions. It also appeared on a Store write (op_descs size:12). The standalone comparison removes the model, scheduler and router from the reproduction.Buffered path and backend selection
Our older deployment used:
Its logs showed
Ignore register host mem ... when buffer pool is enabled, and PD transfers completed. This is historical evidence, not a controlled version-only comparison.On the newer stack, keeping
4:8fails during initialization:The Mooncake executor source we inspected derives
client_server_modefrom capability detection and automatically suppliesadxl.LocalCommRes={"version":"1.3"}when no explicit value was provided. That branch does not check whether a nonzero buffer pool was requested. This appears relevant to why merely restoring the previous buffer-pool setting fails; we have not validated a fix.Possible lower-level error-handling defect
The public Hcomm IPC code has a separate field propagation gap:
LocalIpcRmaBufferImpl::Init()generates an IPC key for Device memory, while its Host branch maps the local address without generating that key.RemoteIpcRmaBuffer::Deserialize()reads the memory type into the outer object but does not propagate it to the inner implementation.RemoteIpcRmaBufferImpl::Open()checks the inner memory type for HOST. That field stays at its constructor defaultTYPE_NUM, so the Host rejection can be bypassed and an empty IPC key reaches the import call.We checked the corresponding constructor, deserialize and open instructions in the deployed
libhccl_plf.so, not just public master. The same field layout and missing propagation were present. Fixing this check alone would give an earlier rejection; it would not provide Host-over-HCCS support.Source references: local registration, outer deserialization, inner open.
Questions
ASCEND_BUFFER_POOL, or reject the combination before initializing HIXL with conflicting options?We have not tested a patched backend selector or claimed a working fix. Separating engines protects the HBM-only path in the comparison, but does not make the Host pool readable over the failing path.
@github-actions[bot] commented on GitHub (Oct 29, 2026):
Thanks for opening this issue, @lang-free!
143081744A maintainer will triage this when possible. To help us respond faster, please include:
Useful links: Documentation · Contributing guide
@lang-free commented on GitHub (Oct 29, 2026):
Adding an A2 deployment comparison, checked on 2026-10-29.
We inspected four running A2 nodes (8 × Ascend 910B4-1 per node), serving GLM-5.3-Flash with two prefill nodes and two decode nodes. All four model containers report
mooncake-transfer-engine==0.3.13; the installed package metadata does not record a source commit.The serving-process environment is consistent across the four nodes:
The Store configuration uses
protocol=ascend,metadata_server=P2PHANDSHAKE,global_segment_size=72GB, and SSD offload. The serving integration combinesMooncakeConnectorV2withAscendStoreConnector.Earlier serving probes on this deployment completed successfully. A correlated P→D request logged four successful KV read operations taking 5.98, 4.49, 3.51 and 3.47 ms. This deployment is not relying on the historical
4:8buffer-pool workaround.This is configuration and serving evidence, not a reproduction of the standalone HBM-plus-Host test above. We have not isolated Host-pool reads/writes in this check or verified the selected transport for every registration.
HCCL_INTRA_ROCE_ENABLE=1alone does not establish that all paths avoid HCCS/IPC. The same package version also does not establish identical binaries or HIXL/Hcomm versions.