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

ASF subversion and git services commented on AMQ-6602:
------------------------------------------------------

Commit b6a8c188ff07a795399067ef6f6598a2f623a002 in activemq's branch 
refs/heads/activemq-5.14.x from [~cshannon]
[ https://git-wip-us.apache.org/repos/asf?p=activemq.git;h=b6a8c18 ]

AMQ-6602: Fix race condition in TaskRunnerFactory

Fixing a race condition in TaskRunnerFactory where if multiple threads
call createTaskRunner() at the same time some threads might see the
executor as null (if it hasn't finished initializing) leading to the
creation of extra DedicatedTaskRunner objects instead of sharing a
PooledTaskRunner.

(cherry picked from commit fe5164a404ebcb0879c1b769e16c00f475320419)


> Memory leak when undeploying webapp with ActiveMQ client
> --------------------------------------------------------
>
>                 Key: AMQ-6602
>                 URL: https://issues.apache.org/jira/browse/AMQ-6602
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: JMS client
>    Affects Versions: 5.14.3
>            Reporter: Mykola Markov
>            Assignee: Christopher L. Shannon
>            Priority: Minor
>              Labels: leak
>         Attachments: AMQ-6602.patch
>
>
> I have a web app with an ActiveMQ client. When undeploying the app, Tomcat 
> logs the following messages.
> {code}
> 15-Feb-2017 17:53:31.760 WARNING [localhost-startStop-2] 
> org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The 
> web application [Engine] appears to have started a thread named [ActiveMQ
>  Session: ID:comp-41144-1487186920452-1:1:3] but has failed to stop it. This 
> is very likely to create a memory leak. Stack trace of thread:
>  java.lang.Object.wait(Native Method)
>  java.lang.Object.wait(Object.java:502)
>  
> org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:119)
>  
> org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:42)
> 15-Feb-2017 17:53:31.761 WARNING [localhost-startStop-2] 
> org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The 
> web application [Engine] appears to have started a thread named [ActiveMQ
>  Session: ID:comp-41144-1487186920452-1:1:2] but has failed to stop it. This 
> is very likely to create a memory leak. Stack trace of thread:
>  java.lang.Object.wait(Native Method)
>  java.lang.Object.wait(Object.java:502)
>  
> org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:119)
>  
> org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:42)
> 15-Feb-2017 17:53:31.762 WARNING [localhost-startStop-2] 
> org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The 
> web application [Engine] appears to have started a thread named [ActiveMQ
>  Session: ID:comp-41144-1487186920452-1:1:4] but has failed to stop it. This 
> is very likely to create a memory leak. Stack trace of thread:
>  java.lang.Object.wait(Native Method)
>  java.lang.Object.wait(Object.java:502)
>  
> org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:119)
>  
> org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:42)
> 15-Feb-2017 17:53:31.762 WARNING [localhost-startStop-2] 
> org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The 
> web application [Engine] appears to have started a thread named [ActiveMQ
>  Session: ID:comp-41144-1487186920452-1:1:10] but has failed to stop it. This 
> is very likely to create a memory leak. Stack trace of thread:
>  java.lang.Object.wait(Native Method)
>  java.lang.Object.wait(Object.java:502)
>  
> org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:119)
>  
> org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:42)
> 15-Feb-2017 17:53:31.763 WARNING [localhost-startStop-2] 
> org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The 
> web application [Engine] appears to have started a thread named [ActiveMQ
>  Session: ID:comp-41144-1487186920452-1:1:6] but has failed to stop it. This 
> is very likely to create a memory leak. Stack trace of thread:
>  java.lang.Object.wait(Native Method)
>  java.lang.Object.wait(Object.java:502)
>  
> org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:119)
>  
> org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:42)
> Feb 15, 2017 5:53:31 PM org.apache.catalina.core.ApplicationContext log
> INFO: Closing Spring root WebApplicationContext
> {code}



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

Reply via email to