binfeiruci opened a new issue, #13492: URL: https://github.com/apache/dubbo/issues/13492
I got this error log: ``` 2023-11-23 19:23:26.786 ERROR 27 --- [NettyServerWorker-thread-1] io.netty.util.ResourceLeakDetector : LEAK: ByteBuf.release() was not called before it's garbage-collected. See https://netty.io/wiki/reference-counted-objects.html for more information. Recent access records: Created at: io.netty.buffer.PooledByteBufAllocator.newDirectBuffer(PooledByteBufAllocator.java:385) io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:187) io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:173) io.netty.buffer.AbstractByteBufAllocator.buffer(AbstractByteBufAllocator.java:107) org.apache.dubbo.rpc.protocol.rest.extension.resteasy.ResteasyContext.convertHttpRequestToContainerRequestContext(ResteasyContext.java:81) org.apache.dubbo.rpc.protocol.rest.extension.resteasy.filter.ResteasyRequestContainerFilterAdapter.filter(ResteasyRequestContainerFilterAdapter.java:54) org.apache.dubbo.rpc.protocol.rest.handler.NettyHttpHandler.executeFilters(NettyHttpHandler.java:131) org.apache.dubbo.rpc.protocol.rest.handler.NettyHttpHandler.handle(NettyHttpHandler.java:82) org.apache.dubbo.rpc.protocol.rest.netty.RestHttpRequestDecoder.lambda$decode$0(RestHttpRequestDecoder.java:70) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) org.apache.dubbo.common.threadlocal.InternalRunnable.run(InternalRunnable.java:41) java.lang.Thread.run(Thread.java:748) ``` the reason: org.apache.dubbo.rpc.protocol.rest.extension.resteasy.filter.ResteasyRequestContainerFilterAdapter#filter creates a DubboPreMatchContainerRequestContext. DubboPreMatchContainerRequestContext's NettyHttpRequest field contains a ByteBuf. ResteasyRequestContainerFilterAdapter#filter doesn't release the ByteBuf before exit. solution: call containerRequestContext.getHttpRequest().releaseContentBuffer() before exit. like ``` finally { containerRequestContext.getHttpRequest().releaseContentBuffer(); } ``` -- 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]
