[TENT] Fix TaskInfo dangling pointers, data races, stage buffer leaks - #3380
Open
RuiqingFeng wants to merge 2 commits into
Open
[TENT] Fix TaskInfo dangling pointers, data races, stage buffer leaks#3380RuiqingFeng wants to merge 2 commits into
RuiqingFeng wants to merge 2 commits into
Conversation
RuiqingFeng
requested review from
00fish0,
alogfans,
chestnut-Q,
doujiang24,
dtcccc and
staryxchen
as code owners
August 11, 2026 09:29
Add test coverage in progress_worker_test.cpp for ProxyManager concurrent buffer allocations, worker task buffer reclamation, in-flight batch draining on progress errors, and batch capacity overflow rejection. Signed-off-by: Ruiqing Feng <ruiqing.feng@broadcom.com>
Fix dangling TaskInfo pointers, data races, and stage buffer leaks by reserving task_list capacity, using atomic loads and mutex locks, scoping buffer caches to tasks, and replacing LOG(FATAL) with recoverable errors. Signed-off-by: Ruiqing Feng <ruiqing.feng@broadcom.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fix several critical staging runtime bugs in ProxyManager and TransferEngineImpl:
Module
mooncake-transfer-engine)mooncake-store)mooncake-ep)mooncake-pg)mooncake-integration)mooncake-p2p-store)mooncake-wheel)mooncake-common)mooncake-rl)Type of Change
How Has This Been Tested?
Added 4 new unit test cases in
mooncake-transfer-engine/tent/tests/progress_worker_test.cpp:ProxyManager.ConcurrentFirstAllocationIsBoundedProxyManager.ReclaimsStageBuffersBetweenWorkerTasksProxyManager.DrainsInflightBatchesAfterProgressErrorTransferEngineImpl.DirectSubmitRejectsBatchCapacityOverflowTest commands:
Test results:
Ran unit tests on TENT Linux build environment; all 4 newly added unit tests passed.
Checklist
./scripts/code_format.shpre-commit run --all-filesand all hooks passAI Assistance Disclosure
Used Cursor Agent for root cause analysis of TENT staging memory leaks & data races, patch verification, and drafting unit test coverage.