RockteMQ-AI commented on issue #11352:
URL: https://github.com/apache/rocketmq/issues/11352#issuecomment-6110394505

   **Issue Evaluation**
   
   Category: `type/bug` | Status: **Confirmed**
   
   The channel leak is well-analyzed. The eviction path in 
`excludeClientByLmqName` removes the `LiteSubscription` from 
`client2Subscription` but does not clean up `clientChannels`. All other removal 
flows go through `removeCompleteSubscription`, which cleans both maps. Once the 
eviction path has removed the subscription directly, the orphaned 
`clientChannels` entry is unreachable for any cleaner that only walks 
`client2Subscription`.
   
   **Root Cause:** Asymmetric cleanup — the eviction path only cleans 
`client2Subscription` but not `clientChannels`, while all cleaners 
(`cleanupExpiredSubscriptions`) iterate `client2Subscription`.
   
   **Impact:** Under exclusive-mode client churn, `clientChannels` grows 
unboundedly, retaining netty `Channel` references and their associated 
resources. Additionally, `notifyUnsubscribeLite` keeps resolving stale 
(typically closed) channels.
   
   **Severity:** Medium-High — netty Channel leak can lead to file descriptor 
exhaustion over time.
   
   **Note:** This and #11354 share the same root cause (asymmetric cleanup in 
the eviction path). A single fix in `excludeClientByLmqName` to also clean 
`clientChannels` when removing the last liteTopic would address both issues.
   
   An automated fix proposal can be generated. Reply `/approve` to proceed with 
PR generation.
   
   ---
   *Automated evaluation by RocketMQ-AI*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to