Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-1930

NPE during shutdown of embedded activemq

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 5.2.0
    • NEEDS_REVIEW
    • Transport
    • None
    • revision 675393 of trunk, ActiveMQ 5.2.0

    Description

      I received the following exception from the VMTransport thread when shutting down the broker:

      Async error occurred: java.lang.NullPointerException
      java.lang.NullPointerException
      	at org.apache.activemq.broker.TransportConnection.processRemoveConsumer(TransportConnection.java:542)
      	at org.apache.activemq.command.RemoveInfo.visit(RemoveInfo.java:64)
      	at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
      	at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:180)
      	at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:104)
      	at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
      	at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:205)
      	at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122)
      	at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      	at java.lang.Thread.run(Thread.java:619)
      

      The failure occurred at the following lines of code:

              TransportConnectionState cs = lookupConnectionState(connectionId);
              SessionState ss = cs.getSessionState(sessionId);
      

      It appears that there is a race during shutdown where the connection state is discarded before the last consumer is removed.

      Attachments

        Activity

          People

            Unassigned Unassigned
            snstanton Scott Stanton
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: