[
https://issues.apache.org/jira/browse/ARTEMIS-4192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17696347#comment-17696347
]
Dries Harnie commented on ARTEMIS-4192:
---------------------------------------
The issue is completely reproducible on my M1 macbook pro running Eclipse
Temurin 19, so I built an artemis container image using that version of the
JDK. It crashed three out of three times on my AMD64 Ubuntu 22.04.02 system.
Unpack the attached file next to an apache-artemis-2.28.0 directory (produced
from unpacking the release tarball) and run test.sh.
[^bug-4192.tar]
> Calling removeAllMessages for a large paged queue causes OOM situation
> ----------------------------------------------------------------------
>
> Key: ARTEMIS-4192
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4192
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: Broker
> Affects Versions: 2.27.0, 2.28.0
> Reporter: Dries Harnie
> Priority: Major
> Attachments: bug-4192.tar, image-2023-03-03-00-09-50-092.png
>
>
> Steps to reproduce:
> # Create a broker from default settings
> # Add the following to {{broker.xml}} to enable paging for the TEST queue.
> {code:xml}
> <address-setting match="TEST">
> <max-size-messages>25000</max-size-messages>
> </address-setting>{code}
> # Use {{artemis producer}} to dump 2 million messages into the TEST queue
> {noformat}
> ./bin/artemis producer --message-count 20000 --threads 100{noformat}
> # Call {{removeAllMessages}} using the console or via Jolokia:
> {noformat}
> curl -sH "Origin: http://localhost:8161" -u admin:admin
> '[http://localhost:8161/console/jolokia/exec/org.apache.activemq.artemis:broker=!%220.0.0.0!%22,component=addresses,address=!%22TEST!%22,subcomponent=queues,routing-type=!%22anycast!%22,queue=!%22TEST!%22/removeAllMessages()']{noformat}
> The broker will start producing Java Heap space errors and shutdown.
> I managed to take a heap dump and I noticed there are quite a few Artemis
> classes with an instance count of around one million, and then several more
> around 20,000. I included the latter because messages seem to be bundled into
> transactions of 500.
> !image-2023-03-03-00-09-50-092.png!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)