Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-6375

[Java Broker] [AMQP 1.0] ending a session with attached consumer link leads to NPE

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.31
    • Fix Version/s: 0.31
    • Component/s: Broker-J
    • Labels:
      None

      Description

      When running some tests using the new JMS client I saw the following stacktrace emitted. It seems to relate to the client closing a Session without explicitly closing the Consumer on it. The consumer was receiving from a Topic, i.e exchange.

      00 53 17 45 
      java.lang.NullPointerException
      	at org.apache.qpid.server.protocol.v1_0.ConsumerTarget_1_0.isSuspended(ConsumerTarget_1_0.java:87)
      	at org.apache.qpid.server.protocol.v1_0.ConsumerTarget_1_0.flowStateChanged(ConsumerTarget_1_0.java:333)
      	at org.apache.qpid.server.protocol.v1_0.SendingLink_1_0.remoteDetached(SendingLink_1_0.java:470)
      	at org.apache.qpid.server.protocol.v1_0.Session_1_0$SubjectSpecificSendingLinkListener$2.run(Session_1_0.java:835)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at javax.security.auth.Subject.doAs(Subject.java:360)
      	at org.apache.qpid.server.protocol.v1_0.Session_1_0$SubjectSpecificSendingLinkListener.remoteDetached(Session_1_0.java:830)
      	at org.apache.qpid.amqp_1_0.transport.LinkEndpoint.remoteDetached(LinkEndpoint.java:177)
      	at org.apache.qpid.amqp_1_0.transport.SessionEndpoint.detach(SessionEndpoint.java:350)
      	at org.apache.qpid.amqp_1_0.transport.SessionEndpoint.detachLinks(SessionEndpoint.java:252)
      	at org.apache.qpid.amqp_1_0.transport.SessionEndpoint.receiveEnd(SessionEndpoint.java:218)
      	at org.apache.qpid.amqp_1_0.transport.ConnectionEndpoint.receiveEnd(ConnectionEndpoint.java:609)
      	at org.apache.qpid.amqp_1_0.type.transport.End.invoke(End.java:75)
      	at org.apache.qpid.amqp_1_0.transport.ConnectionEndpoint.receive(ConnectionEndpoint.java:802)
      	at org.apache.qpid.amqp_1_0.framing.FrameHandler.parse(FrameHandler.java:241)
      	at org.apache.qpid.server.protocol.v1_0.ProtocolEngine_1_0_0_SASL$4.run(ProtocolEngine_1_0_0_SASL.java:384)
      	at org.apache.qpid.server.protocol.v1_0.ProtocolEngine_1_0_0_SASL$4.run(ProtocolEngine_1_0_0_SASL.java:380)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at javax.security.auth.Subject.doAs(Subject.java:360)
      	at org.apache.qpid.server.protocol.v1_0.ProtocolEngine_1_0_0_SASL.received(ProtocolEngine_1_0_0_SASL.java:379)
      	at org.apache.qpid.server.protocol.v1_0.ProtocolEngine_1_0_0_SASL.received(ProtocolEngine_1_0_0_SASL.java:66)
      	at org.apache.qpid.server.protocol.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:153)
      	at org.apache.qpid.server.protocol.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:51)
      	at org.apache.qpid.transport.network.io.IoReceiver.run(IoReceiver.java:161)
      	at java.lang.Thread.run(Thread.java:745)
      

      The result of the client sending the session 'end was the broker detaching the link and then closing the connection with an error when the NPE happened, which the client didnt like and may have put things in a bad state, but when subsequently shutting down the broker another NPE was also encountered:

      ^C########################################################################
      #
      # Unhandled Exception java.lang.NullPointerException in Thread QpidBrokerShutdownHook
      #
      # Exiting
      #
      ########################################################################
      java.lang.NullPointerException
      	at org.apache.qpid.server.protocol.v1_0.ConsumerTarget_1_0.queueDeleted(ConsumerTarget_1_0.java:285)
      	at org.apache.qpid.server.queue.QueueConsumerImpl.queueDeleted(QueueConsumerImpl.java:273)
      	at org.apache.qpid.server.queue.AbstractQueue.unregisterConsumer(AbstractQueue.java:817)
      	at org.apache.qpid.server.queue.QueueConsumerImpl.onClose(QueueConsumerImpl.java:255)
      	at org.apache.qpid.server.model.AbstractConfiguredObject.close(AbstractConfiguredObject.java:495)
      	at org.apache.qpid.server.model.AbstractConfiguredObject$1.performAction(AbstractConfiguredObject.java:467)
      	at org.apache.qpid.server.model.AbstractConfiguredObject$1.performAction(AbstractConfiguredObject.java:463)
      	at org.apache.qpid.server.model.AbstractConfiguredObject.applyToChildren(AbstractConfiguredObject.java:753)
      	at org.apache.qpid.server.model.AbstractConfiguredObject.closeChildren(AbstractConfiguredObject.java:462)
      	at org.apache.qpid.server.model.AbstractConfiguredObject.close(AbstractConfiguredObject.java:494)
      	at org.apache.qpid.server.model.AbstractConfiguredObject$1.performAction(AbstractConfiguredObject.java:467)
      	at org.apache.qpid.server.model.AbstractConfiguredObject$1.performAction(AbstractConfiguredObject.java:463)
      	at org.apache.qpid.server.model.AbstractConfiguredObject.applyToChildren(AbstractConfiguredObject.java:753)
      	at org.apache.qpid.server.model.AbstractConfiguredObject.closeChildren(AbstractConfiguredObject.java:462)
      	at org.apache.qpid.server.model.AbstractConfiguredObject.close(AbstractConfiguredObject.java:494)
      	at org.apache.qpid.server.model.AbstractConfiguredObject$1.performAction(AbstractConfiguredObject.java:467)
      	at org.apache.qpid.server.model.AbstractConfiguredObject$1.performAction(AbstractConfiguredObject.java:463)
      	at org.apache.qpid.server.model.AbstractConfiguredObject.applyToChildren(AbstractConfiguredObject.java:753)
      	at org.apache.qpid.server.model.AbstractConfiguredObject.closeChildren(AbstractConfiguredObject.java:462)
      	at org.apache.qpid.server.model.AbstractConfiguredObject.close(AbstractConfiguredObject.java:494)
      	at org.apache.qpid.server.model.AbstractConfiguredObject$1.performAction(AbstractConfiguredObject.java:467)
      	at org.apache.qpid.server.model.AbstractConfiguredObject$1.performAction(AbstractConfiguredObject.java:463)
      	at org.apache.qpid.server.model.AbstractConfiguredObject.applyToChildren(AbstractConfiguredObject.java:753)
      	at org.apache.qpid.server.model.AbstractConfiguredObject.closeChildren(AbstractConfiguredObject.java:462)
      	at org.apache.qpid.server.model.AbstractConfiguredObject.close(AbstractConfiguredObject.java:494)
      	at org.apache.qpid.server.model.AbstractConfiguredObject$1.performAction(AbstractConfiguredObject.java:467)
      	at org.apache.qpid.server.model.AbstractConfiguredObject.close(AbstractConfiguredObject.java:494)
      	at org.apache.qpid.server.Broker.shutdown(Broker.java:105)
      	at org.apache.qpid.server.Broker.shutdown(Broker.java:89)
      	at org.apache.qpid.server.Broker$ShutdownService$1.run(Broker.java:327)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at javax.security.auth.Subject.doAs(Subject.java:360)
      	at org.apache.qpid.server.Broker$ShutdownService.run(Broker.java:321)
      	at java.lang.Thread.run(Thread.java:745)
      

        Attachments

          Activity

            People

            • Assignee:
              rgodfrey Robert Godfrey
              Reporter:
              robbie Robbie Gemmell

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment