You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/05/05 17:13:04 UTC

[jira] [Commented] (ARTEMIS-874) ThreadGroup memory leak

    [ https://issues.apache.org/jira/browse/ARTEMIS-874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15998592#comment-15998592 ] 

ASF GitHub Bot commented on ARTEMIS-874:
----------------------------------------

GitHub user d0k1 opened a pull request:

    https://github.com/apache/activemq-artemis/pull/1254

    ARTEMIS-874: ThreadGroup memory leak

    https://issues.apache.org/jira/browse/ARTEMIS-874

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/d0k1/activemq-artemis 1.x

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/1254.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1254
    
----
commit e4c4539c8fefefec23d174441144e1c2a05cf7ca
Author: dOkI <de...@gmail.com>
Date:   2017-05-05T17:10:59Z

    ARTEMIS-874: ThreadGroup memory leak

----


> ThreadGroup memory leak
> -----------------------
>
>                 Key: ARTEMIS-874
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-874
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>    Affects Versions: 1.5.0
>            Reporter: Damien Hollis
>
> Each ActiveMQConnection has a failoverListenerExecutor, which is initialized using the code 
> {code:java}
> Executors.newFixedThreadPool(1, ActiveMQThreadFactory.defaultThreadFactory());
> {code}
> Which creates a new ActiveMQThreadFactory and the factory has a ThreadGroup.  When ThreadGroups are created, they are added to an array on their parent ThreadGroup.  In our testing, the array of ThreadGroups just keeps growing as we keep creating ActiveMQConnections.  The problem seems to be that nobody is destroying the ThreadGroups (ThreadGroup.destroy()).  Note: the ActiveMQConnection etc are all cleaned up correctly.  
> I've managed to workaround this issue by caching the ActiveMQConnection but in some environments this might not be possible.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)