io.netty.handler.codec.DecoderException: io.netty.util.IllegalReferenceCountException: refCnt: 0

GitHub | Underbalanced | 5 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    SSLHandler Removal Exceptions

    GitHub | 5 months ago | Underbalanced
    io.netty.handler.codec.DecoderException: io.netty.util.IllegalReferenceCountException: refCnt: 0
  2. 0

    HttpRequestDecoder decode() problem (rarely but occured)

    GitHub | 2 years ago | bwzhang2011
    io.netty.handler.codec.DecoderException: HttpRequestDecoder.decode() did not read anything but decoded a message.

    Root Cause Analysis

    1. io.netty.util.IllegalReferenceCountException

      refCnt: 0

      at io.netty.buffer.AbstractByteBuf.ensureAccessible()
    2. Netty
      ForkJoinWorkerThread.run
      1. io.netty.buffer.AbstractByteBuf.ensureAccessible(AbstractByteBuf.java:1407)
      2. io.netty.buffer.AbstractByteBuf.checkIndex(AbstractByteBuf.java:1353)
      3. io.netty.buffer.PooledUnsafeDirectByteBuf.internalNioBuffer(PooledUnsafeDirectByteBuf.java:331)
      4. io.netty.buffer.WrappedByteBuf.internalNioBuffer(WrappedByteBuf.java:939)
      5. io.netty.buffer.AdvancedLeakAwareByteBuf.internalNioBuffer(AdvancedLeakAwareByteBuf.java:736)
      6. io.netty.handler.ssl.SslHandler.toByteBuffer(SslHandler.java:1102)
      7. io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1094)
      8. io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:966)
      9. io.netty.handler.ssl.SslHandler.decode(SslHandler.java:900)
      10. io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:411)
      11. io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248)
      12. io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372)
      13. io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358)
      14. io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350)
      15. io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
      16. io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372)
      17. io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358)
      18. io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
      19. io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129)
      20. io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:610)
      21. io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:551)
      22. io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:465)
      23. io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:437)
      24. io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:873)
      25. io.netty.util.internal.chmv8.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1412)
      26. io.netty.util.internal.chmv8.ForkJoinTask.doExec(ForkJoinTask.java:280)
      27. io.netty.util.internal.chmv8.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:877)
      28. io.netty.util.internal.chmv8.ForkJoinPool.scan(ForkJoinPool.java:1711)
      29. io.netty.util.internal.chmv8.ForkJoinPool.runWorker(ForkJoinPool.java:1666)
      30. io.netty.util.internal.chmv8.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:126)
      30 frames