[
https://issues.apache.org/jira/browse/ARTEMIS-5575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Justin Bertram closed ARTEMIS-5575.
-----------------------------------
> Potential NPE during MQTT link stealing
> ---------------------------------------
>
> Key: ARTEMIS-5575
> URL: https://issues.apache.org/jira/browse/ARTEMIS-5575
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Reporter: Justin Bertram
> Assignee: Justin Bertram
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.42.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> There's a potential NPE due to a race condition in the logic handling MQTT
> link stealing that I recently saw in the test-suite. Here's the exception:
> {noformat}
> ERROR [org.apache.activemq.artemis.core.protocol.mqtt] AMQ834002: Error
> processing control packet:
> MqttConnectMessage[fixedHeader=MqttFixedHeader[messageType=CONNECT,
> isDup=false, qosLevel=AT_MOST_ONCE, isRetain=false, remainingLength=21],
> variableHeader=MqttConnectVariableHeader[name=MQTT, version=4,
> hasUserName=false, hasPassword=false, isWillRetain=false, isWillFlag=false,
> isCleanSession=false, keepAliveTimeSeconds=1],
> payload=MqttConnectPayload[clientIdentifier=reconnect, willTopic=null,
> willMessage=null, userName=null, password=null]]
> java.lang.NullPointerException: Cannot invoke
> "org.apache.activemq.artemis.core.protocol.mqtt.MQTTConnection.getRemoteAddress()"
> because "existingConnection" is null
> at
> org.apache.activemq.artemis.core.protocol.mqtt.MQTTProtocolHandler.handleLinkStealing(MQTTProtocolHandler.java:493)
> at
> org.apache.activemq.artemis.core.protocol.mqtt.MQTTProtocolHandler.handleConnect(MQTTProtocolHandler.java:258)
> at
> org.apache.activemq.artemis.core.protocol.mqtt.MQTTProtocolHandler.act(MQTTProtocolHandler.java:161)
> at org.apache.activemq.artemis.utils.actors.Actor.doTask(Actor.java:32)
> at
> org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:69)
> at
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
> at
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
> at
> org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:120){noformat}
--
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