mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[GH-ISSUE #4382] [Bug][TENT] Terminal destructors discard failed RDMA teardown and release retained owners #1099
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#1099
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 @feichai0017 on GitHub (Sep 29, 2026).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/4382
Originally assigned to: @TTThanos on GitHub.
Bug report
Confirmed on current
main,1ad008bc41c6de7c74e02fb1d48713309b880c0d, with injected verbs failures through TENT's existing per-context verbs table. This is a terminal-destruction ownership gap, distinct from normal endpoint retirement/CQ draining.RdmaEndPoint::deconstructUnlocked()correctly keeps its notification QP, MRs and backing vectors whenibv_destroy_qp()oribv_dereg_mr()fails.RdmaContext::disable()likewise returns an error and preserves the context resources when the endpoint store cannot clear. Those paths allow explicit callers to retry.However, both destructors discard that error:
After the endpoint destructor body returns, the notification vectors are destroyed even if a QP/MR is still live. After the context destructor returns, its store and context object disappear even if the store retained failed endpoints; an externally held endpoint can retain a pointer to a destroyed context. Logging that resources are preserved for retry does not preserve their C++ owners past terminal destruction.
Source at the tested revision: endpoint destructor, context destructor.
Reproduction
CPU-only Linux x86_64, Clang 20,
USE_TENT=ON, no RDMA hardware required. A regression uses the existing friend test access and per-context verbs table:ibv_destroy_qp()returnEIO. Explicitdeconstruct()returns failure and retains both vectors without calling MR deregistration.ibv_dereg_mr()fail. Explicit teardown again retains the vectors.shared_ptrwhile either failure persists: the current destructor returns normally.On unmodified production code, both explicit retry tests pass and all three terminal-destructor death tests fail with “failed to die.” A fix is prepared that retains explicit retry behavior but fails the process at terminal destruction if native teardown still fails. It does not pretend that a timeout, failed verb, or destructor entry proves DMA quiescence.
Related work checked
The current-main versions were inspected. I also searched open/closed destructor, teardown,
deconstruct, and QP-destruction issues/PRs; no matching terminal-error check was found.The proposed scope is deliberately limited to endpoint-owned notification resources and context failure propagated from endpoint-store teardown. This is CPU fault-injection evidence, not RNIC/provider fault-injection qualification.
Prepared with Codex assistance; baseline and corrected native tests were executed.
@github-actions[bot] commented on GitHub (Sep 29, 2026):
Thanks for opening this issue, @feichai0017!
132118805A maintainer will triage this when possible. To help us respond faster, please include:
Useful links: Documentation · Contributing guide