You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Wawan (JIRA)" <ji...@apache.org> on 2014/08/28 10:10:57 UTC

[jira] [Created] (AMQ-5337) Bug in ConcurrentLinkedQueue leads to excessive CPU-consumption by ActiveMQ process

Wawan created AMQ-5337:
--------------------------

             Summary: Bug in ConcurrentLinkedQueue leads to excessive CPU-consumption by ActiveMQ process
                 Key: AMQ-5337
                 URL: https://issues.apache.org/jira/browse/AMQ-5337
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 5.10.0, 5.9.1, 5.9.0
         Environment: Linux Ubuntu
            Reporter: Wawan


The AdvisoryBroker use a ConcurrentLinkedQueue to store consumers.
This standard JDK class has a bug which can lead to an OutOfMemory : https://bugs.openjdk.java.net/browse/JDK-8054446

In our environment we observe that ActiveMQ process cpu usage is continually climbing and that the ConcurrentLinkedQueue in the AdvisoryBroker grows indefinitely.

The ConcurrentLinkedQueue is a non-blocking concurrent FIFO datastructure provided by the core Java Development Kit API starting from Java 5. 
AdvisoryBroker use offer() method to add a new consumer in the ConcurrentLinkedQueue, and remove() method to remove it.
When the consumer removed is the last element of the queue, the Consumer object is nulled but a node remain in the queue. The null node is then never garbage collected. This is true only for the last element of the queue. Any other element is removed safely.

Related bug : https://issues.apache.org/jira/browse/AMQ-4853




--
This message was sent by Atlassian JIRA
(v6.2#6252)