[
https://issues.apache.org/jira/browse/QPID-6375?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rob Godfrey resolved QPID-6375.
-------------------------------
Resolution: Fixed
Fix Version/s: 0.31
> [Java Broker] [AMQP 1.0] ending a session with attached consumer link leads
> to NPE
> ----------------------------------------------------------------------------------
>
> Key: QPID-6375
> URL: https://issues.apache.org/jira/browse/QPID-6375
> Project: Qpid
> Issue Type: Bug
> Components: Java Broker
> Affects Versions: 0.31
> Reporter: Robbie Gemmell
> Assignee: Rob Godfrey
> Fix For: 0.31
>
> Attachments: QPID-6375-reproducer.tar.gz
>
>
> 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.
> {noformat}
> 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)
> {noformat}
> 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:
> {noformat}
> ^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)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]