You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Tom Ross (JIRA)" <ji...@apache.org> on 2018/12/07 14:30:00 UTC

[jira] [Created] (ARTEMIS-2195) Artemis broker leaks memory when creating temporary queues

Tom Ross created ARTEMIS-2195:
---------------------------------

             Summary: Artemis broker leaks memory when creating temporary queues
                 Key: ARTEMIS-2195
                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2195
             Project: ActiveMQ Artemis
          Issue Type: Bug
          Components: Broker
    Affects Versions: 1.5.5
            Reporter: Tom Ross


Artemis broker seems to be leaking memory when creating and deleting temporary queues. Running clients with code like below 

{code:java}
try (QueueSession session = queueConnection.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE)) {
      int numberOfTemporaryQueues = 100;
      for (int i = 0; i < numberOfTemporaryQueues; i++) {
        TemporaryQueue temporaryQueue = session.createTemporaryQueue();
        temporaryQueue.delete();
      }
    } catch (JMSException e) {
      e.printStackTrace();
    }
{code}

would result in 


{quote}2018-12-07 11:33:55,822 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: JBoss EAP 7.1.5.GA (WildFly Core 3.0.19.Final-redhat-00001) started in 4603ms - Started 454 of 682 services (372 services are lazy, passive or on-demand)
2018-12-07 11:39:59,515 WARN  [org.apache.activemq.artemis.core.server] (Thread-23 (ActiveMQ-server-org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl$4@29bf5863)) Sending unexpected exception to the client: java.lang.OutOfMemoryError: GC overhead limit exceeded
	at java.util.Arrays.copyOfRange(Arrays.java:3664)
	at java.lang.String.<init>(String.java:207)
	at java.lang.String.substring(String.java:1969)
	at javax.management.ObjectName.construct(ObjectName.java:645)
	at javax.management.ObjectName.<init>(ObjectName.java:1382)
	at javax.management.ObjectName.getInstance(ObjectName.java:1273)
	at org.apache.activemq.artemis.api.core.management.ObjectNameBuilder.getQueueObjectName(ObjectNameBuilder.java:106)
	at org.apache.activemq.artemis.core.server.management.impl.ManagementServiceImpl.unregisterQueue(ManagementServiceImpl.java:255)
	at org.apache.activemq.artemis.core.postoffice.impl.PostOfficeImpl.removeBinding(PostOfficeImpl.java:481)
	at org.apache.activemq.artemis.core.server.impl.QueueImpl.deleteQueue(QueueImpl.java:1429)
	at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.destroyQueue(ActiveMQServerImpl.java:1767)
	at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.destroyQueue(ActiveMQServerImpl.java:1732)
	at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.deleteQueue(ServerSessionImpl.java:635)
	at org.apache.activemq.artemis.core.protocol.core.ServerSessionPacketHandler.internalHandlePacket(ServerSessionPacketHandler.java:272)
	at org.apache.activemq.artemis.core.protocol.core.ServerSessionPacketHandler.lambda$handlePacket$0(ServerSessionPacketHandler.java:211)
	at org.apache.activemq.artemis.core.protocol.core.ServerSessionPacketHandler$$Lambda$847/166882454.run(Unknown Source)
	at org.apache.activemq.artemis.utils.OrderedExecutorFactory$OrderedExecutor$ExecutorTask.run(OrderedExecutorFactory.java:122)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748){quote}

Heap dump analisys point to 


{code:java}
private final ConcurrentMap<SimpleString, PagingStore> stores = new ConcurrentHashMap<>();
{code}

in PagingManagerImpl class



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)