You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Justin Bertram (Jira)" <ji...@apache.org> on 2024/09/28 03:45:00 UTC

[jira] (ARTEMIS-5054) large messages only forwarded to one subscriber when using STOMP on multicast address

    [ https://issues.apache.org/jira/browse/ARTEMIS-5054 ]


    Justin Bertram deleted comment on ARTEMIS-5054:
    -----------------------------------------

was (Author: jira-bot):
Commit e7ed4700e14777ccae4e570b5d3fbe6a918b9d14 in activemq-artemis's branch refs/heads/dependabot/maven/com.google.guava-guava-33.3.1-jre from Timothy Bish
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=e7ed4700e1 ]

ARTEMIS-5054 Fix concurrent access issue of large message to Stomp Frame

When converting a large server message to an outgoing STOMP frame the converter
is allowing unsafe concurrent access to the large message internals which leads
to failures on message deliver as the state is out of sync amongst the dispatch
threads.


> large messages only forwarded to one subscriber when using STOMP on multicast address
> -------------------------------------------------------------------------------------
>
>                 Key: ARTEMIS-5054
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-5054
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: STOMP
>    Affects Versions: 2.32.0, 2.33.0, 2.34.0, 2.35.0, 2.36.0, 2.37.0
>            Reporter: Renaud Rwemalika
>            Assignee: Timothy A. Bish
>            Priority: Major
>             Fix For: 2.38.0
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> We noticed a bug that affects versions after 2.31.2. When sending a large message using STOMP (in our use case, we used the stomp.py library from Python) on a MULTICAST address with multiple non-durable queues, we noticed that only one of the queues gets the message forwarded to it.
> Note that the issue does not appear with messages that are not flagged as large messages: all the queues get the message.
> We conducted our test using 20MB messages using the Docker image (docker.io/apache/activemq-artemis:2.37.0) without changing anything in the configuration. 
> Sending a large message with STOMP on a MULTICAST queue generates the following in Artemis logs:  
> {noformat}
> 2024-09-17 12:46:29,850 WARN  [org.apache.activemq.artemis.core.protocol.stomp] AMQ332069: Sent ERROR frame to STOMP client 10.0.2.100:34400: null
> 2024-09-17 12:46:29,851 WARN  [org.apache.activemq.artemis.core.server] AMQ222067: Connection failure has been detected: null [code=REMOTE_DISCONNECT]
> 2024-09-17 12:46:29,851 WARN  [org.apache.activemq.artemis.core.server] AMQ222061: Client connection failed, clearing up resources for session dc1a3fc3-74f2-11ef-a9fa-caa03bc75f5c
> 2024-09-17 12:46:29,853 WARN  [org.apache.activemq.artemis.core.server] AMQ222107: Cleared up resources for session dc1a3fc3-74f2-11ef-a9fa-caa03bc75f5c
> 2024-09-17 12:46:29,850 WARN  [org.apache.activemq.artemis.core.protocol.stomp] AMQ332071: Unable to send message to client: LargeServerMessage[messageID=34,durable=false,userID=null,priority=4, timestamp=Tue Sep 17 12:46:29 UTC 2024,expiration=0, durable=false, address=simulation.results.inflated-dimensions, properties=TypedProperties[destination=simulation.results.inflated-dimensions, content-length=7057754, _AMQ_LARGE_SIZE=7057754]]@132459861
> java.lang.RuntimeException: ActiveMQIllegalStateException[errorType=ILLEGAL_STATE message=File 34.tmp has a null channel]
>     at org.apache.activemq.artemis.core.persistence.impl.journal.LargeBody.getReadOnlyBodyBuffer(LargeBody.java:275) ~[artemis-server-2.37.0.jar:2.37.0]
>     at org.apache.activemq.artemis.core.persistence.impl.journal.LargeServerMessageImpl.getReadOnlyBodyBuffer(LargeServerMessageImpl.java:257) ~[artemis-server-2.37.0.jar:2.37.0]
>     at org.apache.activemq.artemis.core.protocol.stomp.VersionedStompFrameHandler.createMessageFrame(VersionedStompFrameHandler.java:334) ~[artemis-stomp-protocol-2.37.0.jar:2.37.0]
>     at org.apache.activemq.artemis.core.protocol.stomp.StompConnection.createStompMessage(StompConnection.java:630) ~[artemis-stomp-protocol-2.37.0.jar:2.37.0]
>     at org.apache.activemq.artemis.core.protocol.stomp.StompSession.sendMessage(StompSession.java:169) ~[artemis-stomp-protocol-2.37.0.jar:2.37.0]
>     at org.apache.activemq.artemis.core.server.impl.ServerConsumerImpl.deliverStandardMessage(ServerConsumerImpl.java:1215) ~[artemis-server-2.37.0.jar:2.37.0]
>     at org.apache.activemq.artemis.core.server.impl.ServerConsumerImpl.proceedDeliver(ServerConsumerImpl.java:528) ~[artemis-server-2.37.0.jar:2.37.0]
>     at org.apache.activemq.artemis.core.server.impl.QueueImpl.proceedDeliver(QueueImpl.java:4091) ~[artemis-server-2.37.0.jar:2.37.0]
>     at org.apache.activemq.artemis.core.server.impl.QueueImpl.deliver(QueueImpl.java:3325) ~[artemis-server-2.37.0.jar:2.37.0]
>     at org.apache.activemq.artemis.core.server.impl.QueueImpl$DeliverRunner.run(QueueImpl.java:4459) ~[artemis-server-2.37.0.jar:2.37.0]
>     at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:57) ~[artemis-commons-2.37.0.jar:2.37.0]
>     at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:32) ~[artemis-commons-2.37.0.jar:2.37.0]
>     at org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:68) ~[artemis-commons-2.37.0.jar:2.37.0]
>     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]
>     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?]
>     at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118) [artemis-commons-2.37.0.jar:2.37.0]
> Caused by: org.apache.activemq.artemis.api.core.ActiveMQIllegalStateException: File 34.tmp has a null channel
>     at org.apache.activemq.artemis.core.io.nio.NIOSequentialFile.read(NIOSequentialFile.java:282) ~[artemis-journal-2.37.0.jar:2.37.0]
>     at org.apache.activemq.artemis.core.io.nio.NIOSequentialFile.read(NIOSequentialFile.java:243) ~[artemis-journal-2.37.0.jar:2.37.0]
>     at org.apache.activemq.artemis.core.persistence.impl.journal.LargeBody.getReadOnlyBodyBuffer(LargeBody.java:272) ~[artemis-server-2.37.0.jar:2.37.0]
>     ... 15 more {noformat}
> If you need me to create a project (that would have listeners and producers using the stomp.py library) that can be used to reproduce the error, please let me know.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@activemq.apache.org
For additional commands, e-mail: issues-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact