[
https://issues.apache.org/jira/browse/ARTEMIS-5874?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Justin Bertram updated ARTEMIS-5874:
------------------------------------
Description:
A deadlock can occur when the broker services a STOMP {{DISCONNECT}} frame with
a {{receipt}} header at the same time the corresponding connection is closed by
the broker (e.g. due to inactivity). Here's the relevant stack-trace:
{noformat}
STOMP protocol can hit a JVM deadlock. Here are the key details:
* DISCONNECT frame sent to the broker on valid STOMP connection
** with a "receipt" header
* At the same time, Netty reports a disconnect (call goes to
{{{}org.apache.activemq.artemis.core.remoting.server.impl.RemotingServiceImpl.connectionException{}}})
Deadlock is reported by {{jstack}} or {{jcmd ... Thread.print.}}
The cause is 2 locks being acquired in different orders by separate threads.
Here are the top of the calling stack for the 2 deadlocked threads:
* at
org.apache.activemq.artemis.core.protocol.stomp.StompProtocolManager.send(StompProtocolManager.java:203)
* at
org.apache.activemq.artemis.core.protocol.stomp.StompConnection.destroy(StompConnection.java:225)
was:
STOMP protocol can hit a JVM deadlock. Here are the key details:
* DISCONNECT frame sent to the broker on valid STOMP connection
** with a "receipt" header
* At the same time, Netty reports a disconnect (call goes to
{{org.apache.activemq.artemis.core.remoting.server.impl.RemotingServiceImpl.connectionException}})
Deadlock is reported by {{jstack}} or {{jcmd ... Thread.print.}}
The cause is 2 locks being acquired in different orders by separate threads.
Here are the top of the calling stack for the 2 deadlocked threads:
* at
org.apache.activemq.artemis.core.protocol.stomp.StompProtocolManager.send(StompProtocolManager.java:203)
* at
org.apache.activemq.artemis.core.protocol.stomp.StompConnection.destroy(StompConnection.java:225)
> Deadlock in STOMP protocol on DISCONNECT with receipt
> -----------------------------------------------------
>
> Key: ARTEMIS-5874
> URL: https://issues.apache.org/jira/browse/ARTEMIS-5874
> Project: Artemis
> Issue Type: Bug
> Components: STOMP
> Affects Versions: 2.39.0
> Environment: ActiveMQ 2.39.0
> Linux
>
> Reporter: Arthur Naseef
> Assignee: Justin Bertram
> Priority: Critical
> Attachments: FRAME.connect, FRAME.disconnect, STACK.txt
>
>
> A deadlock can occur when the broker services a STOMP {{DISCONNECT}} frame
> with a {{receipt}} header at the same time the corresponding connection is
> closed by the broker (e.g. due to inactivity). Here's the relevant
> stack-trace:
> {noformat}
>
> STOMP protocol can hit a JVM deadlock. Here are the key details:
> * DISCONNECT frame sent to the broker on valid STOMP connection
> ** with a "receipt" header
> * At the same time, Netty reports a disconnect (call goes to
> {{{}org.apache.activemq.artemis.core.remoting.server.impl.RemotingServiceImpl.connectionException{}}})
> Deadlock is reported by {{jstack}} or {{jcmd ... Thread.print.}}
> The cause is 2 locks being acquired in different orders by separate threads.
> Here are the top of the calling stack for the 2 deadlocked threads:
> * at
> org.apache.activemq.artemis.core.protocol.stomp.StompProtocolManager.send(StompProtocolManager.java:203)
> * at
> org.apache.activemq.artemis.core.protocol.stomp.StompConnection.destroy(StompConnection.java:225)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]