You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "qianye1001 (via GitHub)" <gi...@apache.org> on 2026/05/28 02:42:51 UTC
Re: [I] [BUG] Dynamic certificate reload does not release old certificates, causing native memory leak with OpenSSL [rocketmq]
qianye1001 commented on issue #10395:
URL: https://github.com/apache/rocketmq/issues/10395#issuecomment-4560396088
## PR Created
I've created a pull request to fix this issue: https://github.com/apache/rocketmq/pull/10396
**Title:** [ISSUE #10395] Fix native memory leak on TLS certificate hot-reload
**Changes (2 files, +12/-1):**
- `NettyRemotingServer.java`: Capture old `sslContext`, call `ReferenceCountUtil.release(old)` after new context is assigned
- `ProxyAndTlsProtocolNegotiator.java`: Same pattern + made `sslContext` field `volatile` for thread safety
**Safety:** "Build new, then release old" ordering ensures no null/premature release of in-flight connections. `ReferenceCountUtil.release()` is a safe no-op for JDK provider.
**Base:** develop
**Head:** qianye1001:fix/issue-10395
Please review the changes. The PR will be updated if any revisions are requested.
---
*This PR was automatically generated based on the fix proposal.*
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org