Uploaded image for project: 'JBoss A-MQ'
  1. JBoss A-MQ
  2. ENTMQ-892

Failover of topic with durable consumer causes NPE sometimes

XMLWordPrintable

    • Hide

      Reproducible: occasionally
      1. fabric:create --wait-for-provisioning
      2. fabric:mq-create --create-container broker1 --replicas 1 --group masterslave --data /tmp/broker broker
      3. fabric:mq-create --create-container broker2 --replicas 1 --group masterslave --data /tmp/broker broker
      4. send messages to discovery:(fabric:masterslave)?maxReconnectDelay=1000
      5. while sending messages disconnect and reconnect durable consumer and kill master broker

      Show
      Reproducible: occasionally 1. fabric:create --wait-for-provisioning 2. fabric:mq-create --create-container broker1 --replicas 1 --group masterslave --data /tmp/broker broker 3. fabric:mq-create --create-container broker2 --replicas 1 --group masterslave --data /tmp/broker broker 4. send messages to discovery:(fabric:masterslave)?maxReconnectDelay=1000 5. while sending messages disconnect and reconnect durable consumer and kill master broker

      I'm sending messages to a topic with 1 durable client. While sending messages I'm disconnecting and reconnecting the durable client and killing master broker. The exception is thrown just occasionally.

      Here is the log with exception:

      — Producing to masterslave-failover#1418736576204
      Produced: Msg#0
      — Stopping: broker2
      Produced: Msg#500
      — Durable consumer disconnected
      Produced: Msg#1000
      — Starting: broker2
      — Stopping: broker1
      Produced: Msg#1500
      Produced: Msg#2000
      — Starting: broker1
      — Stopping: broker2
      Produced: Msg#2500
      — Durable consumer reconnected
      — Starting: broker2
      — Stopping: broker1
      Produced: Msg#3000
      Produced: Msg#3500
      Produced: Msg#4000
      — Starting: broker1
      — Stopping: broker2
      Produced: Msg#4500
      Produced: Msg#5000
      — Starting: broker2
      — Stopping: broker1
      Produced: Msg#5500
      Produced: Msg#6000
      Produced: Msg#6500
      — Starting: broker1
      — Stopping: broker2
      Produced: Msg#7000
      Produced: Msg#7500
      — Starting: broker2
      — Stopping: broker1
      Produced: Msg#8000
      Produced: Msg#8500
      — Starting: broker1
      — Stopping: broker2
      Produced: Msg#9000
      Produced: Msg#9500
      — Starting: broker2
      — Stopping: broker1
      javax.jms.JMSException: java.lang.NullPointerException
      at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:54)
      at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1417)
      at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1345)
      at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1904)
      at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:288)
      at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:223)
      at org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:241)
      at org.jboss.fuse.qa.amq.failover.client.KillingClient.doProduce(KillingClient.java:106)
      at org.jboss.fuse.qa.amq.failover.client.KillingClient.startNonTransactedProducing(KillingClient.java:56)
      at org.jboss.fuse.qa.amq.failover.client.KTopicClient.startNonTransactedProducing(KTopicClient.java:54)
      at org.jboss.fuse.qa.amq.failover.MasterSlaveFailoverTest.shouldGetAllMessagesFromDurableTopic(MasterSlaveFailoverTest.java:74)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
      at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
      at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
      at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
      at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
      at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
      Caused by: java.lang.NullPointerException
      at org.apache.activemq.broker.region.cursors.AbstractStoreCursor.setLastCachedId(AbstractStoreCursor.java:272)
      at org.apache.activemq.broker.region.cursors.AbstractStoreCursor.addMessageLast(AbstractStoreCursor.java:205)
      at org.apache.activemq.broker.region.cursors.StoreDurableSubscriberCursor.addMessageLast(StoreDurableSubscriberCursor.java:198)
      at org.apache.activemq.broker.region.PrefetchSubscription.add(PrefetchSubscription.java:159)
      at org.apache.activemq.broker.region.DurableTopicSubscription.add(DurableTopicSubscription.java:272)
      at org.apache.activemq.broker.region.policy.SimpleDispatchPolicy.dispatch(SimpleDispatchPolicy.java:48)
      at org.apache.activemq.broker.region.Topic.dispatch(Topic.java:717)
      at org.apache.activemq.broker.region.Topic.doMessageSend(Topic.java:510)
      at org.apache.activemq.broker.region.Topic.send(Topic.java:441)
      at org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:419)
      at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:462)
      at org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:297)
      at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:152)
      at org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:96)
      at org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:307)
      at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:152)
      at org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:157)
      at org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:541)
      at org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:768)
      at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:334)
      at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:188)
      at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
      at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
      at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:270)
      at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
      at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:214)
      at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:196)
      at java.lang.Thread.run(Thread.java:745)

              gtully@redhat.com Gary Tully
              avano@redhat.com Andrej Vano
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: