[ 
https://issues.apache.org/jira/browse/ARTEMIS-5605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Timothy A. Bish updated ARTEMIS-5605:
-------------------------------------
    Description: 
In a rare case if the bridge or federation receiver is closed on the server 
before the remote peer sends the remote attach an NPE can result because the 
wrong view of the proton Receiver instance is used to check remote desired 
capabilities which can be null after the local close is called.
{code:java}
[Thread-0 (ActiveMQ-client-netty-threads)] 21:36:36,119 WARN  
[org.apache.activemq.artemis.protocol.amqp.connect.AMQPBrokerConnection] Cannot 
invoke "org.apache.qpid.proton.engine.Link.getRemoteDesiredCapabilities()" 
because "link" is null
java.lang.NullPointerException: Cannot invoke 
"org.apache.qpid.proton.engine.Link.getRemoteDesiredCapabilities()" because 
"link" is null
    at 
org.apache.activemq.artemis.protocol.amqp.proton.AmqpSupport.verifyDesiredCapability(AmqpSupport.java:252)
    at 
org.apache.activemq.artemis.protocol.amqp.connect.bridge.AMQPBridgeFromQueueReceiver$AMQPBridgeQueueDeliveryReceiver.initialize(AMQPBridgeFromQueueReceiver.java:304)
    at 
org.apache.activemq.artemis.protocol.amqp.proton.AMQPSessionContext.addReceiver(AMQPSessionContext.java:498)
    at 
org.apache.activemq.artemis.protocol.amqp.connect.bridge.AMQPBridgeFromQueueReceiver.lambda$doCreateReceiver$2(AMQPBridgeFromQueueReceiver.java:174)
    at 
org.apache.activemq.artemis.protocol.amqp.proton.AMQPConnectionContext.remoteLinkOpened(AMQPConnectionContext.java:416)
    at 
org.apache.activemq.artemis.protocol.amqp.proton.AMQPConnectionContext.onRemoteOpen(AMQPConnectionContext.java:884)
    at 
org.apache.activemq.artemis.protocol.amqp.proton.handler.Events.dispatch(Events.java:68)
    at 
org.apache.activemq.artemis.protocol.amqp.proton.handler.ProtonHandler.dispatch(ProtonHandler.java:584)
    at 
org.apache.activemq.artemis.protocol.amqp.proton.handler.ProtonHandler.handleFlush(ProtonHandler.java:390)
    at 
org.apache.activemq.artemis.protocol.amqp.proton.handler.ProtonHandler.flush(ProtonHandler.java:375)
    at 
org.apache.activemq.artemis.protocol.amqp.proton.handler.ProtonHandler.inputBuffer(ProtonHandler.java:333)
    at 
org.apache.activemq.artemis.protocol.amqp.connect.AMQPBrokerConnectionChannelHandler.channelRead(AMQPBrokerConnectionChannelHandler.java:81)
    at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
    at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
    at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
    at 
io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1357)
    at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
    at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
    at 
io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:868)
    at 
io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:799)
    at 
io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:501)
    at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:399)
    at 
io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:998)
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    at 
org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:120)
{code}
 

  was:
In a rare case if the bridge or federation receiver is closed on the server 
before the remote peer sends the remote attach an NPE can result because the 
wrong view of the proton Receiver instance is used to check remote desired 
capabilities which can be null after the local close is called.

 

 


> AMQP Bridge and Federation receivers can NPE if closed before remote Attach 
> arrives
> -----------------------------------------------------------------------------------
>
>                 Key: ARTEMIS-5605
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-5605
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: AMQP
>    Affects Versions: 2.42.0
>            Reporter: Timothy A. Bish
>            Assignee: Timothy A. Bish
>            Priority: Minor
>             Fix For: 2.43.0
>
>
> In a rare case if the bridge or federation receiver is closed on the server 
> before the remote peer sends the remote attach an NPE can result because the 
> wrong view of the proton Receiver instance is used to check remote desired 
> capabilities which can be null after the local close is called.
> {code:java}
> [Thread-0 (ActiveMQ-client-netty-threads)] 21:36:36,119 WARN  
> [org.apache.activemq.artemis.protocol.amqp.connect.AMQPBrokerConnection] 
> Cannot invoke 
> "org.apache.qpid.proton.engine.Link.getRemoteDesiredCapabilities()" because 
> "link" is null
> java.lang.NullPointerException: Cannot invoke 
> "org.apache.qpid.proton.engine.Link.getRemoteDesiredCapabilities()" because 
> "link" is null
>     at 
> org.apache.activemq.artemis.protocol.amqp.proton.AmqpSupport.verifyDesiredCapability(AmqpSupport.java:252)
>     at 
> org.apache.activemq.artemis.protocol.amqp.connect.bridge.AMQPBridgeFromQueueReceiver$AMQPBridgeQueueDeliveryReceiver.initialize(AMQPBridgeFromQueueReceiver.java:304)
>     at 
> org.apache.activemq.artemis.protocol.amqp.proton.AMQPSessionContext.addReceiver(AMQPSessionContext.java:498)
>     at 
> org.apache.activemq.artemis.protocol.amqp.connect.bridge.AMQPBridgeFromQueueReceiver.lambda$doCreateReceiver$2(AMQPBridgeFromQueueReceiver.java:174)
>     at 
> org.apache.activemq.artemis.protocol.amqp.proton.AMQPConnectionContext.remoteLinkOpened(AMQPConnectionContext.java:416)
>     at 
> org.apache.activemq.artemis.protocol.amqp.proton.AMQPConnectionContext.onRemoteOpen(AMQPConnectionContext.java:884)
>     at 
> org.apache.activemq.artemis.protocol.amqp.proton.handler.Events.dispatch(Events.java:68)
>     at 
> org.apache.activemq.artemis.protocol.amqp.proton.handler.ProtonHandler.dispatch(ProtonHandler.java:584)
>     at 
> org.apache.activemq.artemis.protocol.amqp.proton.handler.ProtonHandler.handleFlush(ProtonHandler.java:390)
>     at 
> org.apache.activemq.artemis.protocol.amqp.proton.handler.ProtonHandler.flush(ProtonHandler.java:375)
>     at 
> org.apache.activemq.artemis.protocol.amqp.proton.handler.ProtonHandler.inputBuffer(ProtonHandler.java:333)
>     at 
> org.apache.activemq.artemis.protocol.amqp.connect.AMQPBrokerConnectionChannelHandler.channelRead(AMQPBrokerConnectionChannelHandler.java:81)
>     at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
>     at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
>     at 
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
>     at 
> io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1357)
>     at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
>     at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
>     at 
> io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:868)
>     at 
> io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:799)
>     at 
> io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:501)
>     at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:399)
>     at 
> io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:998)
>     at 
> io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
>     at 
> org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:120)
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to