Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-5786

(7.1.0) Consumer crashes with IndexOutOfBoundsException when reading non-text message from imported journal

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 7.1.0.DR8
    • 7.1.0.DR3
    • ActiveMQ
    • None
    • Release Notes
    • Hide
      If Artemis journal was imported using CLI operation :import-journal and journal contains large messages then consumer receiving those large messages will get:
      java.lang.IndexOutOfBoundsException: readerIndex(22) + length(409600) exceeds writerIndex(3580): UnpooledHeapByteBuf(ridx: 22, widx: 3580, cap: 3580)
      at io.netty.buffer.AbstractByteBuf.checkReadableBytes(AbstractByteBuf.java:1165)
      at io.netty.buffer.AbstractByteBuf.readBytes(AbstractByteBuf.java:675)
      at io.netty.buffer.AbstractByteBuf.readBytes(AbstractByteBuf.java:683)
      at io.netty.buffer.WrappedByteBuf.readBytes(WrappedByteBuf.java:511)
      ...

      Workaround is to use JMS Bridges as described in Migration Guide (TBD - link to chapter)
      Show
      If Artemis journal was imported using CLI operation :import-journal and journal contains large messages then consumer receiving those large messages will get: java.lang.IndexOutOfBoundsException: readerIndex(22) + length(409600) exceeds writerIndex(3580): UnpooledHeapByteBuf(ridx: 22, widx: 3580, cap: 3580) at io.netty.buffer.AbstractByteBuf.checkReadableBytes(AbstractByteBuf.java:1165) at io.netty.buffer.AbstractByteBuf.readBytes(AbstractByteBuf.java:675) at io.netty.buffer.AbstractByteBuf.readBytes(AbstractByteBuf.java:683) at io.netty.buffer.WrappedByteBuf.readBytes(WrappedByteBuf.java:511) ... Workaround is to use JMS Bridges as described in Migration Guide (TBD - link to chapter)
    • Documented as Known Issue
    • Hide

      To reproduce:

      git clone git://git.app.eng.bos.redhat.com/jbossqe/eap-tests-hornetq.git
      cd eap-tests-hornetq/scripts/
      git checkout master
      
      groovy -DEAP_VERSION=7.0.0.CR2 PrepareServers7.groovy
      export WORKSPACE=$PWD
      export JBOSS_HOME_1=$WORKSPACE/server1/jboss-eap
      export JBOSS_HOME_2=$WORKSPACE/server2/jboss-eap
      export JBOSS_HOME_3=$WORKSPACE/server3/jboss-eap
      export JBOSS_HOME_4=$WORKSPACE/server4/jboss-eap
      
      cd ../jboss-hornetq-testsuite/
      mvn clean test -Dtest=JournalExportImportTestCase -DfailIfNoTests=false  -Deap=7x | tee log
      
      Show
      To reproduce: git clone git: //git.app.eng.bos.redhat.com/jbossqe/eap-tests-hornetq.git cd eap-tests-hornetq/scripts/ git checkout master groovy -DEAP_VERSION=7.0.0.CR2 PrepareServers7.groovy export WORKSPACE=$PWD export JBOSS_HOME_1=$WORKSPACE/server1/jboss-eap export JBOSS_HOME_2=$WORKSPACE/server2/jboss-eap export JBOSS_HOME_3=$WORKSPACE/server3/jboss-eap export JBOSS_HOME_4=$WORKSPACE/server4/jboss-eap cd ../jboss-hornetq-testsuite/ mvn clean test -Dtest=JournalExportImportTestCase -DfailIfNoTests= false -Deap=7x | tee log

    Description

      If journal with large messages is imported using CLI operation :import-journal then client consuming large message gets:

      java.lang.IndexOutOfBoundsException: readerIndex(22) + length(409600) exceeds writerIndex(409494): DuplicatedByteBuf(ridx: 22, widx: 409494, cap: 409494, unwrapped: UnpooledHeapByteBuf(ridx: 17, widx: 17, cap: 409494))
      	at io.netty.buffer.AbstractByteBuf.checkReadableBytes(AbstractByteBuf.java:1165)
      	at io.netty.buffer.AbstractByteBuf.readBytes(AbstractByteBuf.java:675)
      	at io.netty.buffer.AbstractByteBuf.readBytes(AbstractByteBuf.java:683)
      	at io.netty.buffer.WrappedByteBuf.readBytes(WrappedByteBuf.java:511)
      	at org.apache.activemq.artemis.core.buffers.impl.ChannelBufferWrapper.readSimpleStringInternal(ChannelBufferWrapper.java:86)
      	at org.apache.activemq.artemis.core.buffers.impl.ChannelBufferWrapper.readNullableSimpleString(ChannelBufferWrapper.java:68)
      	at org.apache.activemq.artemis.reader.TextMessageUtil.readBodyText(TextMessageUtil.java:37)
      	at org.apache.activemq.artemis.jms.client.ActiveMQTextMessage.doBeforeReceive(ActiveMQTextMessage.java:112)
      	at org.apache.activemq.artemis.jms.client.ActiveMQMessageConsumer.getMessage(ActiveMQMessageConsumer.java:204)
      	at org.apache.activemq.artemis.jms.client.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:119)
      	at org.jboss.qa.hornetq.apps.clients.ReceiverClientAck.receiveMessage(ReceiverClientAck.java:337)
      	at org.jboss.qa.hornetq.apps.clients.ReceiverClientAck.run(ReceiverClientAck.java:169)
      Exception in thread "Thread-22" java.lang.RuntimeException: Fatal exception was thrown in receiver. Receiver for node: 127.0.0.1
      	at org.jboss.qa.hornetq.apps.clients.ReceiverClientAck.run(ReceiverClientAck.java:214)
      

      Customer impact: Migration of journal from HornetQ (EAP 6) to Artemis (EAP 7) using CLI operation will not be possible.

      Workaround: Use JMS Bridges to migrate messages from HornetQ (EAP 6) to Artemis (EAP 7).

      Attachments

        Issue Links

          Activity

            People

              rh-ee-ataylor Andy Taylor
              mnovak1@redhat.com Miroslav Novak
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: