xiaoqianbaobao opened a new issue, #15752:
URL: https://github.com/apache/dubbo/issues/15752

   ### Pre-check
   
   - [x] I am sure that all the content I provide is in English.
   
   
   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Apache Dubbo Component
   
   Java SDK (apache/dubbo)
   
   ### Dubbo Version
   
   Dubbo Version: [3.2.18
   
   Operating System: [e.g., Linux]
   
   Java Version: [e.g., JDK 1.8.0_202]
   
   ### Steps to reproduce this issue
   
   We are experiencing memory leaks in the Dubbo QoS module, specifically in 
the HttpCommandDecoder class. The leak is caused by ByteBuf objects not being 
properly released when processing HTTP requests through the QoS interface.
   
   the Error Logs:
   
   [2025-11-02 08:56:45.424][ERROR][io.netty.util.ResourceLeakDetector][LEAK: 
ByteBuf.release() was not called before it's garbage-collected.
   Recent access records: 
   Created at:
       
io.netty.buffer.PooledByteBufAllocator.newDirectBuffer(PooledByteBufAllocator.java:403)
       
io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:188)
       
io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:179)
       
io.netty.buffer.AbstractByteBufAllocator.buffer(AbstractByteBufAllocator.java:116)
       
io.netty.handler.codec.http.multipart.HttpPostStandardRequestDecoder.offer(HttpPostStandardRequestDecoder.java:295)
       
io.netty.handler.codec.http.multipart.HttpPostStandardRequestDecoder.<init>(HttpPostStandardRequestDecoder.java:158)
       
io.netty.handler.codec.http.multipart.HttpPostRequestDecoder.<init>(HttpPostRequestDecoder.java:95)
       
io.netty.handler.codec.http.multipart.HttpPostRequestDecoder.<init>(HttpPostRequestDecoder.java:53)
       
org.apache.dubbo.qos.command.decoder.HttpCommandDecoder.decode(HttpCommandDecoder.java:58)
       
org.apache.dubbo.qos.server.handler.HttpProcessHandler.channelRead0(HttpProcessHandler.java:89)
   
   
   <img width="1255" height="755" alt="Image" 
src="https://github.com/user-attachments/assets/e1c6b07d-5701-465f-95c4-6099abaa6925";
 />
   
   <img width="1046" height="740" alt="Image" 
src="https://github.com/user-attachments/assets/1d932dda-0409-4c70-8c68-60d13fcd84cc";
 />
   
   ### What you expected to happen
   
   The memory leak occurs in:
   
   org.apache.dubbo.qos.command.decoder.HttpCommandDecoder.decode() at line 58
   
   When creating HttpPostRequestDecoder for HTTP command processing
   
   The allocated Direct ByteBuf objects are not properly released in certain 
code paths
   
   ### Anything else
   
   The memory leak is triggered whenever someone executes any QoS-related 
command on a production machine.
   
   ### Are you willing to submit a pull request to fix on your own?
   
   - [x] Yes I am willing to submit a pull request on my own!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to