You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Francesco Nigro (JIRA)" <ji...@apache.org> on 2019/03/23 08:46:00 UTC

[jira] [Commented] (ARTEMIS-2282) QueueImpl.addTail NPEs during processing of a management message

    [ https://issues.apache.org/jira/browse/ARTEMIS-2282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16799576#comment-16799576 ] 

Francesco Nigro commented on ARTEMIS-2282:
------------------------------------------

Probably it is due to https://issues.apache.org/jira/browse/ARTEMIS-2205, that has affected https://issues.apache.org/jira/browse/ARTEMIS-1710.
This PR has introduced a ode path on AMQP message processing that allows direct deliveries.
The code on QueueImpl::addTail (line 898):
{code:java}
if (deliveriesInTransit.getCount() == 0 && getExecutor().isFlushed() && intermediateMessageReferences.isEmpty() && messageReferences.isEmpty() && !pageIterator.hasNext() && !pageSubscription.isPaging()) {{code}

Is failing due to pageIterator and/or pageSubscription being null, given that management messages won't ever be paged.
Null checking them should solve the issue (y)

> QueueImpl.addTail NPEs during processing of a management message
> ----------------------------------------------------------------
>
>                 Key: ARTEMIS-2282
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2282
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>    Affects Versions: 2.7.0
>            Reporter: Keith Wall
>            Priority: Major
>
>  We are in the process of upgrading to Artemis 2.7.0 ([https://github.com/EnMasseProject/enmasse/pull/2493]).   We notice the following NPE showing in the Artemis logs following a run of our test-suite. Our application sends management messages over AMQP (to activemq.management) to control the Broker and we can see from the stack that it is the processing of these messages that leads to the failure.
> Our test suite is passing and as far as we can tell, there is no functional defect.
> Could this be related to the recent work of ARTEMIS-1710?
>  
> 2019-03-22T21:42:15.150Z WARN [ProtonServerReceiverContext] null: java.lang.NullPointerException
>  at org.apache.activemq.artemis.core.server.impl.QueueImpl.addTail(QueueImpl.java:898)
>  at org.apache.activemq.artemis.core.server.impl.RoutingContextImpl.internalprocessReferences(RoutingContextImpl.java:138)
>  at org.apache.activemq.artemis.core.server.impl.RoutingContextImpl.processReferences(RoutingContextImpl.java:133)
>  at org.apache.activemq.artemis.core.postoffice.impl.PostOfficeImpl$2.done(PostOfficeImpl.java:1370)
>  at org.apache.activemq.artemis.core.persistence.impl.journal.OperationContextImpl.executeOnCompletion(OperationContextImpl.java:189)
>  at org.apache.activemq.artemis.core.persistence.impl.journal.OperationContextImpl.executeOnCompletion(OperationContextImpl.java:130)
>  at org.apache.activemq.artemis.core.persistence.impl.journal.AbstractJournalStorageManager.afterCompleteOperations(AbstractJournalStorageManager.java:323)
>  at org.apac2019-03-22T21:42:15.150Z WARN [ProtonServerReceiverContext] null: java.lang.NullPointerException
>  at org.apache.activemq.artemis.core.server.impl.QueueImpl.addTail(QueueImpl.java:898)
>  at org.apache.activemq.artemis.core.server.impl.RoutingContextImpl.internalprocessReferences(RoutingContextImpl.java:138)
> iv at org.apache.activemq.artemis.core.server.impl.RoutingContextImpl.processReferences(RoutingContextImpl.java:133)
>  at org.apache.activemq.artemis.core.postoffice.impl.PostOfficeImpl$2.done(PostOfficeImpl.java:1370)
>  at org.apache.activemq.artemis.core.persistence.impl.journal.OperationContextImpl.executeOnCompletion(OperationContextImpl.java:189)
>  at org.apache.activemq.artemis.core.persistence.impl.journal.OperationContextImpl.executeOnCompletion(OperationContextImpl.java:130)
>  at org.apache.activemq.artemis.core.persistence.impl.journal.AbstractJournalStorageManager.afterCompleteOperations(AbstractJournalStorageManager.java:323)
> emq.artemis.core.postoffice.impl.PostOfficeImpl.processRoute(PostOfficeImpl.java:1362)
>  at org.apache.activemq.artemis.core.postoffice.impl.PostOfficeImpl.route(PostOfficeImpl.java:976)
>  at org.apache.activemq.artemis.core.postoffice.impl.PostOfficeImpl.route(PostOfficeImpl.java:867)
>  at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.doSend(ServerSessionImpl.java:1972)
>  at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.handleManagementMessage(ServerSessionImpl.java:1857)
>  at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.send(ServerSessionImpl.java:1613)
>  at org.apache.activemq.artemis.protocol.amqp.broker.AMQPSessionCallback.serverSend(AMQPSessionCallback.java:510)
>  at org.apache.activemq.artemis.protocol.amqp.broker.AMQPSessionCallback.serverSend(AMQPSessionCallback.java:470)
>  at org.apache.activemq.artemis.protocol.amqp.proton.ProtonServerReceiverContext.actualDelivery(Proton at org.apache.activemq.artemis.core.postoffice.impl.PostOfficeImpl.processRoute(PostOfficeImpl.java:1362)
>  at org.apache.activemq.artemis.core.postoffice.impl.PostOfficeImpl.route(PostOfficeImpl.java:976)
> ServerReceiverContext.java:30 at org.apache.activemq.artemis.core.postoffice.impl.PostOfficeImpl.route(PostOfficeImpl.java:867)
>  at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.doSend(ServerSessionImpl.java:1972)
>  at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.handleManagementMessage(ServerSessionImpl.java:1857)
>  at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.send(ServerSessionImpl.java:1613)
>  at org.apache.activemq.artemis.protocol.amqp.broker.AMQPSessionCallback.serverSend(AMQPSessionCallback.java:510)
>  at org.apache.activemq.artemis.protocol.amqp.broker.AMQPSessionCallback.serverSend(AMQPSessionCallback.java:470)
> 4)
>  at org.apache.activemq.artemis.protocol.amqp.proton.ProtonServerReceiverContext.onMessage(ProtonServerReceiverContext.java:299)
>  at org.apache.activemq.artemis.protocol.amqp.proton.AMQPConnectionContext.onDelivery(AMQPConnectionContext.java:541)
>  at org.apache.activemq.artemis.protocol.amqp.proton.handler.Events.dispatch(Events.java:92)
>  at org.apache.activemq.artemis.protocol.amqp.proton.handler.ProtonHandler.dispatch(ProtonHandler.java:484)
>  at org.apache.activemq.artemis.protocol.amqp.proton.handler.ProtonHandler.flush(ProtonHandler.java:284)
>  at org.apache.activemq.artemis.protocol.amqp.proton.handler.ProtonHandler.inputBuffer(ProtonHandler.java:241)
>  at org.apache.activemq.artemis.protocol.amqp.proton.AMQPConnectionContext.inputBuffer(AMQPConnectionContext.java:170)
>  at org.apache.activemq.artemis.protocol.a at org.apache.activemq.artemis.protocol.amqp.proton.ProtonServerReceiverContext.actualDelivery(ProtonServerReceiverContext.java:304)
>  at org.apache.activemq.artemis.protocol.amqp.proton.ProtonServerReceiverContext.onMessage(ProtonServerReceiverContext.java:299)
> mqp.broker.ActiveMQProtonRemotingConnection.bufferReceived(ActiveMQProtonRemotingConnection.java:149)
>  at org.apache.activemq.artemis at org.apache.activemq.artemis.protocol.amqp.proton.AMQPConnectionContext.onDelivery(AMQPConnectionContext.java:541)
>  at org.apache.activemq.artemis.protocol.amqp.proton.handler.Events.dispatch(Events.java:92)
>  at org.apache.activemq.artemis.protocol.amqp.proton.handler.ProtonHandler.dispatch(ProtonHandler.java:484)
>  at org.apache.activemq.artemis.protocol.amqp.proton.handler.ProtonHandler.flush(ProtonHandler.java:284)
>  at org.apache.activemq.artemis.protocol.amqp.proton.handler.ProtonHandler.inputBuffer(ProtonHandler.java:241)
>  at org.apache.activemq.artemis.protocol.amqp.proton.AMQPConnectionContext.inputBuffer(AMQPConnectionContext.java:170)
>  at org.apache.activemq.artemis.protocol.amqp.broker.ActiveMQProtonRemotingConnection.bufferReceived(ActiveMQProtonRemotingConnection.java:149)
> .integration.amqp.ProtonClientConnectionManager.bufferReceived(ProtonClientConnectionManager.java:107)
>  at org.apache.activemq.artemis.core.remoting.impl.netty.ActiveMQChannelHandler.channelRead(ActiveMQChannelHandler.java:73)
>  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
>  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345)
>  at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:337)
>  at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1476)
>  at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1225)
>  at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1272)
>  at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:502)
>  at io.netty.handler.codec.ByteToMessageDecoder.cal at org.apache.activemq.artemis.integration.amqp.ProtonClientConnectionManager.bufferReceived(ProtonClientConnectionManager.java:107)
>  at org.apache.activemq.artemis.core.remoting.impl.netty.ActiveMQChannelHandler.channelRead(ActiveMQChannelHandler.java:73)
>  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
>  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345)
>  at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:337)
>  at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1476)
>  at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1225)
>  at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1272)
> lDecode(ByteToMessageDecoder.java:441)
>  at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:502)
>  at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:441)
>  at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:278)
>  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
>  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345)
>  at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:337)
>  at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1408)
>  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
>  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345)
>  at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:930)
>  at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:796)
>  at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:278)
>  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
> at at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345)
>  at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:337)
>  at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1408)
>  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
>  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345)
>  at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:930)
>  at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:796)
> io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:427)
>  at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:328)
>  at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:905)
>  at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118)
>  at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:427)
>  at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:328)
>  at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:905)
>  at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118)
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)