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

(7.0.z) ARTEMIS-747 - Consumer crashes with IndexOutOfBoundsException when reading non-text message from imported journal

    Details

    • Target Release:
    • Steps to Reproduce:
      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
    • Affects:
      Release Notes
    • Release Notes Docs Status:
      Documented as Known Issue
    • Release Notes Text:
      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)
    • Sprint:
      EAP 7.0.5

      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).

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  gaol Lin Gao
                  Reporter:
                  mnovak Miroslav Novak
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: