-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Unknown
-
Affects Version/s: None
-
Component/s: Wire Protocol
-
None
-
None
-
Fully Compatible
-
Java Drivers
-
Not Needed
-
None
-
None
-
None
-
None
-
None
-
None
under mongo-java-driver : 5.5.1, netty : 4.1.122-FINAL, jdk24 + ZGC
i can see such an error like below from time to time.
as i see, i can be timing issue.
for normal state, ByteBuf is read completely -> released -> GC collects
however, sometimes ByteBuf is read completely -> GC collects > released : this is ERROR!
can i get any suggestion or advice?
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) com.mongodb.internal.connection.netty.NettyStream.readAsync(NettyStream.java:301) com.mongodb.internal.connection.netty.NettyStream.handleReadResponse(NettyStream.java:361) com.mongodb.internal.connection.netty.NettyStream.access$900(NettyStream.java:115) com.mongodb.internal.connection.netty.NettyStream$InboundBufferHandler.channelRead0(NettyStream.java:437) com.mongodb.internal.connection.netty.NettyStream$InboundBufferHandler.channelRead0(NettyStream.java:434) io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99) io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1357) io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:868) io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:796) io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:732) io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:658) io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:998) 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(Unknown Source)