activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claudio Corsi (JIRA)" <>
Subject [jira] [Commented] (AMQ-3451) Tomcat 6.0.32 complains that ActiveMQ 5.5 doesn't shutdown a thread
Date Tue, 07 Aug 2012 16:10:13 GMT


Claudio Corsi commented on AMQ-3451:


The issue is more fundamental than your patch.  Those threads are created by the default task
runner factory and this factory is created once and then never shutdown throwout the life
time of the process. 

Adding a shutdown of the default task runner will remove this issue but will raise another
issue when using the shared classloader of the application server with multiple containers.

The default task runner should be associated with the broker server and not a self contained
static class.  This should resolve the case of its use within the broker side code but will
not resolve this issue within the client side issue.  That needs a little more work on getting
this to work properly.

I have tried to shutdown the default task runner factory fix but when I hot deploy the container
again.  It raises a rejected exception when trying to add a task to the runner since this
executor has been shutdown already.

I tried a fix to associates a default task runner factory to the broker and that resolved
the issue I was initially seeing.

I still have an issue with the client code that uses the default task runner factory.  This
still needs work on my end and will probably require a different fix that would provide a
similar solution.  I was thinking about using WeakReferences associated with a ReferenceQueue.
 Whenever the remove method is called the task runner factory can be shutdown.  This might
work.  I just need to implement this.


> Tomcat 6.0.32 complains that ActiveMQ 5.5 doesn't shutdown a thread
> -------------------------------------------------------------------
>                 Key: AMQ-3451
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: JMS client
>    Affects Versions: 5.5.0
>         Environment: jdk 1.6.0_23 for Linux 64 bit, Ubuntu 11.04
> Tomcat 6.0.32
> Spring 3.0.5
>            Reporter: John Miller
>              Labels: leak, resource
>         Attachments: inherited_access_cotrol_context_leak.png, patch.txt, transport_thread_leak.png
> Every time when restarting web application in Tomcat Manager I get messages:
> SEVERE: The web application [/sms] appears to have started a thread named [ActiveMQ Task-3]
but has failed to stop it. This is very likely to create a memory leak.
> With every restart PermGen space is increased and finally i got OutOfMemory error for
PermGen space.
> I use Spring DefaultMessageListenerContainer, and it's shutdown method closes properly
receivers threads. What is "ActiveMQ Task-3" thread and how to close it properly ?

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message