Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-1976

AMQ 7.2 (probable regression): Core-JMS consumer fails with IndexOutOfBoundsException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • AMQ 7.2.2.GA
    • None
    • core-jms-client
    • None
    • ARTEMIS-2149
    • AMQ Broker 1839, AMQ Broker 1842

      This problem arises in a system using the AMQ 7.2 HF3 (version 2.6.1.amq-720008) or AMQ 7.2 (2.6.1-amq-720004-redhat-1) versions of the Artemis core-JMS client. Whilst consuming messages, at unpredictable intervals the client fails with an IndexOutOfBoundsException. From that point, it can no longer consume messages, and has to be restarted. We cannot be sure that the failure is not associated with the loss of messages. The problem did not arise with AMQ 7.0.3.

      With 7.2 the exception is:

      2018-09-12 16:51:37,825 severity=ERROR logger=org.apache.activemq.artemis.core.client thread=Thread-4 (ActiveMQ-client-netty-threads) messageText="AMQ214008: Failed to handle packet"
      java.lang.IndexOutOfBoundsException: readerIndex(29519) + length(4) exceeds writerIndex(29519): UnpooledDuplicatedByteBuf(ridx: 29519, widx: 29519, cap: 29519, unwrapped: UnpooledByteBufAllocator$InstrumentedUnpooledUnsafeHeapByteBuf(ridx: 0, widx: 29519, cap: 29519))
      	at io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.java:1405)
      	at io.netty.buffer.AbstractByteBuf.readInt(AbstractByteBuf.java:786)
      	at org.apache.activemq.artemis.utils.AbstractByteBufPool.getOrCreate(AbstractByteBufPool.java:136)
      	at org.apache.activemq.artemis.api.core.SimpleString.readSimpleString(SimpleString.java:178)
      	at org.apache.activemq.artemis.utils.collections.TypedProperties.decode(TypedProperties.java:349)
      	at org.apache.activemq.artemis.core.message.impl.CoreMessage.checkProperties(CoreMessage.java:550)
      	at org.apache.activemq.artemis.core.message.impl.CoreMessage.getBooleanProperty(CoreMessage.java:782)
      	at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl.handleMessage(ClientConsumerImpl.java:568)
      	at org.apache.activemq.artemis.core.client.impl.ClientSessionImpl.handleReceiveMessage(ClientSessionImpl.java:1171)
      	at org.apache.activemq.artemis.spi.core.remoting.SessionContext.handleReceiveMessage(SessionContext.java:102)
      	at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQSessionContext.handleReceivedMessagePacket(ActiveMQSessionContext.java:851)
      	at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQSessionContext.access$400(ActiveMQSessionContext.java:124)
      	at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQSessionContext$ClientSessionPacketHandler.handlePacket(ActiveMQSessionContext.java:935)
      	at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.handlePacket(ChannelImpl.java:659)
      	at org.apache.activemq.artemis.core.protocol.core.impl.RemotingConnectionImpl.doBufferReceived(RemotingConnectionImpl.java:402)
      	at org.apache.activemq.artemis.core.protocol.core.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:379)
      	at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl$DelegatingBufferHandler.bufferReceived(ClientSessionFactoryImpl.java:1170)
      	at org.apache.activemq.artemis.core.remoting.impl.netty.ActiveMQChannelHandler.channelRead(ActiveMQChannelHandler.java:73)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
      	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
      	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
      	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
      	at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:808)
      	at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:404)
      	at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:304)
      	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
      	at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118)
      

      With 7.2 HF3 the exception is

      2018-09-11 10:36:57,946 severity=ERROR logger=org.apache.activemq.artemis.core.client thread=Thread-5 (ActiveMQ-client-netty-threads) messageText="AMQ214008: Failed to handle packet"
      java.lang.IndexOutOfBoundsException: null
                  at org.apache.activemq.artemis.api.core.SimpleString.readSimpleString(SimpleString.java:183)
                  at org.apache.activemq.artemis.api.core.SimpleString$ByteBufSimpleStringPool.create(SimpleString.java:584)
                  at org.apache.activemq.artemis.api.core.SimpleString$ByteBufSimpleStringPool.create(SimpleString.java:552)
                  at org.apache.activemq.artemis.utils.AbstractByteBufPool.getOrCreate(AbstractByteBufPool.java:138)
                  at org.apache.activemq.artemis.api.core.SimpleString.readSimpleString(SimpleString.java:178)
                  at org.apache.activemq.artemis.utils.collections.TypedProperties.decode(TypedProperties.java:349)
                  at org.apache.activemq.artemis.core.message.impl.CoreMessage.checkProperties(CoreMessage.java:550)
                  at org.apache.activemq.artemis.core.message.impl.CoreMessage.getBooleanProperty(CoreMessage.java:782)
                  at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl.handleMessage(ClientConsumerImpl.java:568)
                  at org.apache.activemq.artemis.core.client.impl.ClientSessionImpl.handleReceiveMessage(ClientSessionImpl.java:1171)
                  at org.apache.activemq.artemis.spi.core.remoting.SessionContext.handleReceiveMessage(SessionContext.java:102)
                  at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQSessionContext.handleReceivedMessagePacket(ActiveMQSessionContext.java:851)
                  at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQSessionContext.access$400(ActiveMQSessionContext.java:124)
                  at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQSessionContext$ClientSessionPacketHandler.handlePacket(ActiveMQSessionContext.java:935)
                  at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.handlePacket(ChannelImpl.java:659)
                  at org.apache.activemq.artemis.core.protocol.core.impl.RemotingConnectionImpl.doBufferReceived(RemotingConnectionImpl.java:402)
                  at org.apache.activemq.artemis.core.protocol.core.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:379)
                  at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl$DelegatingBufferHandler.bufferReceived(ClientSessionFactoryImpl.java:1170)
                  at org.apache.activemq.artemis.core.remoting.impl.netty.ActiveMQChannelHandler.channelRead(ActiveMQChannelHandler.java:73)
                  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
                  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
                  at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
                  at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
                  at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
                  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
                  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
                  at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
                  at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
                  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
                  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
                  at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
                  at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:808)
                  at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:404)
                  at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:304)
                  at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
                  at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118)
      

              rhn-support-jbertram Justin Bertram
              rhn-support-kboone Kevin Boone
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: