Details
Description
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:
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
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.
Attachments
Issue Links
- links to