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

[Artemis Testsuite] PagingTest.testDLAOnLargeMessageAndPaging fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • 7.0.0.CR2
    • 7.0.0.ER5, 7.0.0.ER6
    • ActiveMQ
    • None

      java.lang.RuntimeException: AMQ119028: Timeout waiting for LargeMessage Body
      	at org.apache.activemq.artemis.core.client.impl.LargeMessageControllerImpl.waitCompletion(LargeMessageControllerImpl.java:313)
      	at org.apache.activemq.artemis.core.client.impl.LargeMessageControllerImpl.saveBuffer(LargeMessageControllerImpl.java:276)
      	at org.apache.activemq.artemis.core.client.impl.ClientLargeMessageImpl.checkBuffer(ClientLargeMessageImpl.java:161)
      	at org.apache.activemq.artemis.core.client.impl.ClientLargeMessageImpl.getBodyBuffer(ClientLargeMessageImpl.java:89)
      	at org.apache.activemq.artemis.tests.integration.client.PagingTest.testDLAOnLargeMessageAndPaging(PagingTest.java:4157)
      
      ERROR [org.apache.activemq.artemis.core.server] AMQ224016: Caught exception: ActiveMQIllegalStateException[errorType=ILLEGAL_STATE message=AMQ119027: Could not find reference on consumer ID=0, messageId = 59 queue = SimpleAddress]
      	at org.apache.activemq.artemis.core.server.impl.ServerConsumerImpl.acknowledge(ServerConsumerImpl.java:664) [artemis-server-1.1.0.wildfly-012.jar:]
      	at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.acknowledge(ServerSessionImpl.java:706) [artemis-server-1.1.0.wildfly-012.jar:]
      	at org.apache.activemq.artemis.core.protocol.core.ServerSessionPacketHandler.handlePacket(ServerSessionPacketHandler.java:275) [artemis-server-1.1.0.wildfly-012.jar:]
      	at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.handlePacket(ChannelImpl.java:567) [artemis-core-client-1.1.0.wildfly-012.jar:]
      	at org.apache.activemq.artemis.core.protocol.core.impl.RemotingConnectionImpl.doBufferReceived(RemotingConnectionImpl.java:349) [artemis-core-client-1.1.0.wildfly-012.jar:]
      	at org.apache.activemq.artemis.core.protocol.core.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:331) [artemis-core-client-1.1.0.wildfly-012.jar:]
      	at org.apache.activemq.artemis.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:605) [artemis-server-1.1.0.wildfly-012.jar:]
      	at org.apache.activemq.artemis.core.remoting.impl.invm.InVMConnection$1.run(InVMConnection.java:171) [artemis-server-1.1.0.wildfly-012.jar:]
      	at org.apache.activemq.artemis.utils.OrderedExecutorFactory$OrderedExecutor$ExecutorTask.run(OrderedExecutorFactory.java:100) [artemis-core-client-1.1.0.wildfly-012.jar:]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_71]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_71]
      	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_71]
      

      I've found out what happened but I am not sure if it is bug or wrong test.

      Problem lies in [1]. Server sends messages to consumer and holds references of sent messages. Consumer receives messages and holds them in buffer in which they wait for processing. Imagine a situation:

      • Server sent 10 messages (msg1...msg10)
      • Consumer received 9 messages (msg1...msg9)
      • Msg10 is somewhere on net
      • We call session.rollback
      • Consumer clear his buffer
      • Server clear his buffer
      • Msg10 is delivered to consumer
      • We call consumer.receive and we get Msg10 instead of Msg1

      Is it bug or this situation should be treated by the test code?

      [1]

      for (int i = 0; i < 5; i++) {
          ClientMessage msg = cons.receive(5000);
          assertNotNull(msg);
          msg.acknowledge();
      
          for (int j = 0; j < messageSize; j++) {
                 assertEquals(getSamplebyte(j), msg.getBodyBuffer().readByte());
          }
      
          session.rollback();
      }
      

            rh-ee-ataylor Andy Taylor
            eduda_jira Erich Duda (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: