SERVER-135020ClosedFixed

Memory leak: per-response CancellationSource child states accumulate unboundedly on long-lived parent tokens in exhaust command readers (ExhaustResponseReaderTL / AsyncDBClient::_withCancellation)

h3. Summary Every response received on a long-lived exhaust command session (oplog fetcher getMore, awaitable hello, change-stream getMore) constructs a new child CancellationSource from the reader's long-lived parent token. The child's onCancel() continuation is registered into the parent token's SharedPromise children list and strongly holds the child CancellationState. When the child source is destroyed after the response completes, only its own promise is dismissed; {*}the continuation en

Affected Versions
Versions known to exhibit this issue
8.1.08.2.08.3.28.3.89.0.0
Fixed Versions
Versions that include the fix
9.1.0-rc09.1.0-rc10259.0.9
Components
Server components related to this issue
ConcurrencyNetworkingReplication
Labels
Tags and classification
exhaustmemory-leaksp-customer-tickettcmalloc