You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "xiaoqianbaobao (via GitHub)" <gi...@apache.org> on 2025/11/04 02:44:54 UTC
[I] [Bug]Memory leak in Dubbo QoS module - ByteBuf not released in HttpCommandDecoder [dubbo]
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: notifications-unsubscribe@dubbo.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [Bug]Memory leak in Dubbo QoS module - ByteBuf not released in HttpCommandDecoder [dubbo]
Posted by "xiaoqianbaobao (via GitHub)" <gi...@apache.org>.
xiaoqianbaobao commented on issue #15752:
URL: https://github.com/apache/dubbo/issues/15752#issuecomment-3483536392
<img width="1243" height="449" alt="Image" src="https://github.com/user-attachments/assets/8f8d5a36-9ca7-439a-8f7c-bb370c0b01a5" />
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [Bug]Memory leak in Dubbo QoS module - ByteBuf not released in HttpCommandDecoder [dubbo]
Posted by "qxggg (via GitHub)" <gi...@apache.org>.
qxggg commented on issue #15752:
URL: https://github.com/apache/dubbo/issues/15752#issuecomment-3486735722
I'm working on it.
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [Bug]Memory leak in Dubbo QoS module - ByteBuf not released in HttpCommandDecoder [dubbo]
Posted by "xiaoqianbaobao (via GitHub)" <gi...@apache.org>.
xiaoqianbaobao commented on issue #15752:
URL: https://github.com/apache/dubbo/issues/15752#issuecomment-3483534436
<img width="1271" height="438" alt="Image" src="https://github.com/user-attachments/assets/789d233b-2c8e-4460-a58e-f4cdba05dabd" />
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] [Bug]Memory leak in Dubbo QoS module - ByteBuf not released in HttpCommandDecoder [dubbo]
Posted by "RainYuY (via GitHub)" <gi...@apache.org>.
RainYuY closed issue #15752: [Bug]Memory leak in Dubbo QoS module - ByteBuf not released in HttpCommandDecoder
URL: https://github.com/apache/dubbo/issues/15752
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org