Skip to content

ResourceLeakDetector,LEAK: ByteBuf.release()  #618

Description

@kotlapraveen

Hi we are using
netty version : 4.1.29.Final
Maven dependencies are below

<dependency> <groupId>io.netty</groupId> <artifactId>netty-all</artifactId> <version>${netty.version}</version> </dependency> <dependency> <groupId>io.reactivex</groupId> <artifactId>rxnetty</artifactId> <version>0.4.20</version> </dependency> <dependency> <groupId>io.reactivex</groupId> <artifactId>rxnetty-servo</artifactId> <version>0.4.20</version> </dependency> <dependency> <groupId>io.reactivex</groupId> <artifactId>rxjava</artifactId> <version>1.3.8</version> </dependency> <dependency> <groupId>io.reactivex</groupId> <artifactId>rxjava-computation-expressions</artifactId> <version>0.21.0</version> </dependency>

Seeing the below exception.

Tried the below option '-Dio.netty.leakDetectionLevel=advanced' part of advice provided in
https://netty.io/wiki/reference-counted-objects.html

But that didnt help couldnt see which class in our project is causing the leak. May be the leak is in netty library itself? Please suggest on any solutions.

2018-07-30T07:32:39,230,level=ERROR,thread=rxnetty-nio-eventloop-4-2,category=ResourceLeakDetector,LEAK: ByteBuf.release() was not called before it's garbage-collected. See http://netty.io/wiki/reference-counted-objects.html for more information. Recent access records: Created at: #011io.netty.buffer.PooledByteBufAllocator.newHeapBuffer(PooledByteBufAllocator.java:314) #011io.netty.buffer.AbstractByteBufAllocator.heapBuffer(AbstractByteBufAllocator.java:166) #011io.netty.buffer.AbstractByteBufAllocator.heapBuffer(AbstractByteBufAllocator.java:157) #011io.netty.handler.codec.compression.JdkZlibDecoder.decode(JdkZlibDecoder.java:180) #011io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489) #011io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428) #011io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265) #011io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) #011io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) #011io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) #011io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434) #011io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) #011io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) #011io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965) #011io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:325) #011io.netty.handler.codec.http.HttpContentDecoder.decode(HttpContentDecoder.java:234) #011io.netty.handler.codec.http.HttpContentDecoder.decodeContent(HttpContentDecoder.java:155) #011io.netty.handler.codec.http.HttpContentDecoder.decode(HttpContentDecoder.java:147) #011io.netty.handler.codec.http.HttpContentDecoder.decode(HttpContentDecoder.java:46) #011io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:88) #011io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) #011io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) #011io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) #011io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102) #011io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) #011io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) #011io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) #011io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438) #011io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310) #011io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284) #011io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253) #011io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) #011io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) #011io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) #011io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86) #011io.reactivex.netty.metrics.BytesInspector.channelRead(BytesInspector.java:59) #011io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) #011io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) #011io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) #011io.reactivex.netty.pipeline.InternalReadTimeoutHandler.channelRead(InternalReadTimeoutHandler.java:108) #011io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) #011io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) #011io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) #011io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434) #011io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) #011io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) #011io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965) #011io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) #011io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645) #011io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580) #011io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497) #011io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459) #011io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884) #011io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) #011java.lang.Thread.run(Thread.java:748)Collapse

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions