已开启
Endpoint multi-channel creation can leak channels after config cleanup fails #59
KaranocaVe创建于 14 天前
14 天前 关联了pull request:Destroy Endpoint channels when configuration cleanup fails
14 天前 修改了issue 的描述
11 天前 关联了pull request:docs(ain): 更正 AinBarrierSession::Sync 的 order 参数说明
Hyunbin
4 小时前 评论:
4 小时前 评论:
对应的 PR 请重新触发流水线 @KaranocaVe


4 小时前 添加了label:wait-feedback
Endpoint multi-channel creation can leak channels after config cleanup fails
HcommCreateSharedChannelscreates channels and then destroys their temporary configuration. If configuration destruction fails, it returns the error without destroying the channels it just created. The Endpoint overload then returns an error with a zero output handle, leaving the caller no way to release those channels.Repeated failures can retain Endpoint-owned channel resources. The fix attempts channel cleanup on this error path, logs a secondary cleanup failure, and preserves the original configuration-destroy error.
Validation
A focused Host probe compiles the production
hcomm_host_impl.hpath with test doubles for ACL memory operations and the Hcomm API boundary. It injects failure in configuration destruction and channel cleanup, plus a normal create/destroy control.On the baseline, the injected configuration-destroy failure returned
HCCL_E_RUNTIMEwith a zero output handle and no channel-destroy calls. With the fix, both failure cases call channel cleanup once and retain the originalHCCL_E_RUNTIME; the normal control still succeeds and destroys its channel once.Checks on
src/aicore/hcomm/host/hcomm_host_impl.hpassed:git diff --check,clang-format --dry-run --Werror, andpre-commit run --files src/aicore/hcomm/host/hcomm_host_impl.h. The target pre-commit hook uses clang-format 18.1.8; formatting, codespell, and OAT checks passed. Full repository build and device tests were not run.关联 PR: https://gitcode.com/cann/asc-comm/merge_requests/241