[
https://issues.apache.org/jira/browse/ARTEMIS-5467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17951106#comment-17951106
]
Evgeniy Devyatykh edited comment on ARTEMIS-5467 at 5/13/25 5:22 AM:
---------------------------------------------------------------------
I'm sure that
{{org.apache.activemq.artemis.core.protocol.mqtt.MQTTSessionState.OutboundStore#generateMqttId}}
MUST throw an exception if no MQTT ID can be assigned because otherwise the
cycle will be infinite due to all operations with {{mqttToServerIds}}
performing under {{{}{color:#0033b3}synchronized
{color}({color:#871094}dataStoreLock{color}){}}}.
was (Author: JIRAUSER309667):
I'm sure that
`org.apache.activemq.artemis.core.protocol.mqtt.MQTTSessionState.OutboundStore#generateMqttId`
MUST throw an exception if no MQTT ID can be assigned because otherwise the
cycle will be infinite due to all operations with
`{color:#871094}mqttToServerIds{color}` performing under
{color:#0033b3}synchronized {color}({color:#871094}dataStoreLock{color}).
> High CPU usage in OutboundStore.generateMqttId
> ----------------------------------------------
>
> Key: ARTEMIS-5467
> URL: https://issues.apache.org/jira/browse/ARTEMIS-5467
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: MQTT
> Reporter: Evgeniy Devyatykh
> Priority: Major
>
> Since ARTEMIS-4646 MQTT message IDs generated in the cycle but if a client
> (malicous ot just bugged) with QoS 1 will not send ACKs and just consume
> incoming messages all possible IDs will be used and the cycle goes to
> infinite loop. This leads to high CPU usage and even broker self kill by
> Critical Analyzer.
> {code:java}
> 2025-04-09 04:43:57,606 WARN
> [org.apache.activemq.artemis.utils.critical.CriticalMeasure] Component
> org.apache.activemq.artemis.core.server.impl.QueueImpl is expired on path 2
> 2025-04-09 04:43:57,606 INFO [org.apache.activemq.artemis.core.server]
> AMQ224107: The Critical Analyzer detected slow paths on the broker. It is
> recommended that you enable trace logs on
> org.apache.activemq.artemis.utils.critical while you troubleshoot this issue.
> You should disable the trace logs when you have finished troubleshooting.
> 2025-04-09 04:43:57,606 ERROR [org.apache.activemq.artemis.core.server]
> AMQ224079: The process for the virtual machine will be killed, as component
> QueueImpl[name=tracker-server.emd.#, postOffice=PostOfficeImpl
> [server=ActiveMQServerImpl::name=amq-broker], temp=false]@2aef497c is not
> responsive {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