dexchong commented on issue #15892: URL: https://github.com/apache/dubbo/issues/15892#issuecomment-3696084106
> May I ask in what scenario this occurred? Can it be stably reproduced? Is there any additional information available? An intermittent and difficult-to-reproduce memory leak is suspected to occur in business processing timeout scenarios, where response write failures in the Dubbo Triple protocol (exposed as HTTP interfaces) lead to unreleased ByteBuf objects. Netty's ByteBuf fails to properly release reference counts in both the request aggregation phase (MessageAggregator.decode()) and the response encoding phase (NettyHttp1Channel.newOutputMessage()), resulting in bidirectional memory leaks. `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.AbstractByteBufAllocator.compositeDirectBuffer(AbstractByteBufAllocator.java:224) io.netty.buffer.AbstractByteBufAllocator.compositeBuffer(AbstractByteBufAllocator.java:202) io.netty.handler.codec.MessageAggregator.decode(MessageAggregator.java:269) io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:91) io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:359) io.netty.handler.codec.http.HttpServerUpgradeHandler.decode(HttpServerUpgradeHandler.java:261) io.netty.handler.codec.http.HttpServerUpgradeHandler.decode(HttpServerUpgradeHandler.java:40) io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:91) io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:359) io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436) io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:93) io.opentelemetry.javaagent.shaded.instrumentation.netty.v4_1.internal.server.HttpServerRequestTracingHandler.channelRead(HttpServerRequestTracingHandler.java:69) io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251) io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436) io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346) io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:333) io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:455) io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290) io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251) io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) io.netty.handler.codec.ByteToMessageDecoder.handlerRemoved(ByteToMessageDecoder.java:266) io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:537) io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:469) io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290) io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:359) io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1429) io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:918) io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:167) io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.handle(AbstractNioChannel.java:445) io.netty.channel.nio.NioIoHandler$DefaultNioRegistration.handle(NioIoHandler.java:383) io.netty.channel.nio.NioIoHandler.processSelectedKey(NioIoHandler.java:577) io.netty.channel.nio.NioIoHandler.processSelectedKeysOptimized(NioIoHandler.java:552) io.netty.channel.nio.NioIoHandler.processSelectedKeys(NioIoHandler.java:493) io.netty.channel.nio.NioIoHandler.run(NioIoHandler.java:470) io.netty.channel.SingleThreadIoEventLoop.runIo(SingleThreadIoEventLoop.java:204) io.netty.channel.SingleThreadIoEventLoop.run(SingleThreadIoEventLoop.java:175) io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:1073) io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) java.base/java.lang.Thread.run(Thread.java:840)` -- 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]
