lettuce icon indicating copy to clipboard operation
lettuce copied to clipboard

IllegalReferenceCountException in CommandHandler

Open travispeloton opened this issue 3 years ago • 2 comments

Bug Report

Netty IllegalReferenceCountException in CommandHandler. Been running 6.1.8.RELEASE since 4/19/22, and saw this today (once) for the first time.

io.netty.util.IllegalReferenceCountException: refCnt: 0, decrement: 1
    at io.netty.util.internal.ReferenceCountUpdater.toLiveRealRefCnt(ReferenceCountUpdater.java:74)
    at io.netty.util.internal.ReferenceCountUpdater.release(ReferenceCountUpdater.java:138)
    at io.netty.buffer.AbstractReferenceCountedByteBuf.release(AbstractReferenceCountedByteBuf.java:100)
    at io.lettuce.core.protocol.CommandHandler.channelRead(CommandHandler.java:600)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
    at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
    at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:800)
    at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:480)
    at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:378)
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.lang.Thread.run

Environment

  • Lettuce version(s): 6.1.8.RELEASE
  • Redis version: AWS ElastiCache 6.x

travispeloton avatar Jun 06 '22 20:06 travispeloton

Thanks for the report. We haven't seen such an issue for quite a long time. What codec are you using? Without a reproducer, there's likely no chance of diagnosing the cause.

mp911de avatar Jun 13 '22 06:06 mp911de

I'm using Kotlin with the Lettuce coroutine support. The client is configured to connect to a primary-replica AWS ElastiCache instance.

travispeloton avatar Jun 13 '22 14:06 travispeloton

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

mp911de avatar Nov 22 '22 10:11 mp911de