[
https://issues.apache.org/jira/browse/ARTEMIS-1014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15894760#comment-15894760
]
clebert suconic commented on ARTEMIS-1014:
------------------------------------------
There's no bug here.. your integration with tomcat is broken... there is not
enough information at all...
Please open an user's question on the user's list... so far this JIRA qualifies
as "it doesn't work for me, please hellp me" kind of JIRA.
> Memory leak while shutting down the tomcat server with embedded JMS server
> --------------------------------------------------------------------------
>
> Key: ARTEMIS-1014
> URL: https://issues.apache.org/jira/browse/ARTEMIS-1014
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Affects Versions: 1.5.3
> Environment: Tomcat 9
> Java 8
> Reporter: Vishal Agarwal
> Attachments: Tomcat error.png
>
>
> I am using Artemis server as an embedded server in my webapp.
> The Embedded server is started as spring-bean as explained in the Spring
> Integration examples provided by Artemis.
> When tomcat server is shut down following warning comes in console:
> Mar 03, 2017 5:25:11 PM org.apache.catalina.core.StandardServer await
> INFO: A valid shutdown command was received via the shutdown port. Stopping
> the Server instance.
> Mar 03, 2017 5:25:11 PM org.apache.coyote.AbstractProtocol pause
> INFO: Pausing ProtocolHandler ["http-nio-8080"]
> Mar 03, 2017 5:25:11 PM org.apache.coyote.AbstractProtocol pause
> INFO: Pausing ProtocolHandler ["ajp-nio-8009"]
> Mar 03, 2017 5:25:11 PM org.apache.catalina.core.StandardService stopInternal
> INFO: Stopping service Catalina
> Mar 03, 2017 5:25:20 PM org.apache.catalina.core.ApplicationContext log
> INFO: Destroying Spring FrameworkServlet 'appServlet'
> INFO : org.springframework.web.context.support.XmlWebApplicationContext -
> Closing WebApplicationContext for namespace 'appServlet-servlet': startup
> date [Fri Mar 03 17:18:46 IST 2017]; parent: Root WebApplicationContext
> INFO : org.springframework.context.support.DefaultLifecycleProcessor -
> Stopping beans in phase 2147483647
> Mar 03, 2017 5:25:20 PM org.apache.catalina.core.ApplicationContext log
> INFO: Closing Spring root WebApplicationContext
> INFO : org.springframework.web.context.support.XmlWebApplicationContext -
> Closing Root WebApplicationContext: startup date [Fri Mar 03 17:18:33 IST
> 2017]; root of context hierarchy
> Mar 03, 2017 5:25:21 PM org.apache.catalina.loader.WebappClassLoaderBase
> clearReferencesThreads
> WARNING: The web application [donriver-core-showcase-rest] appears to have
> started a thread named [threadDeathWatcher-1-1] but has failed to stop it.
> This is very likely to create a memory leak. Stack trace of thread:
> java.lang.Thread.sleep(Native Method)
> io.netty.util.ThreadDeathWatcher$Watcher.run(ThreadDeathWatcher.java:150)
>
> io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
> java.lang.Thread.run(Unknown Source)
> Mar 03, 2017 5:25:21 PM org.apache.catalina.loader.WebappClassLoaderBase
> clearReferencesThreads
> WARNING: The web application [donriver-core-showcase-rest] appears to have
> started a thread named [Thread-0 (ActiveMQ-client-global-threads-1874689377)]
> but has failed to stop it. This is very likely to create a memory leak. Stack
> trace of thread:
> sun.misc.Unsafe.park(Native Method)
> java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
>
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(Unknown
> Source)
> java.util.concurrent.LinkedBlockingQueue.poll(Unknown Source)
> java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
> java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> java.lang.Thread.run(Unknown Source)
> Mar 03, 2017 5:25:21 PM org.apache.catalina.loader.WebappClassLoaderBase
> clearReferencesThreads
> WARNING: The web application [donriver-core-showcase-rest] appears to have
> started a thread named [Thread-1 (ActiveMQ-client-global-threads-1874689377)]
> but has failed to stop it. This is very likely to create a memory leak. Stack
> trace of thread:
> sun.misc.Unsafe.park(Native Method)
> java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
>
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(Unknown
> Source)
> java.util.concurrent.LinkedBlockingQueue.poll(Unknown Source)
> java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
> java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> java.lang.Thread.run(Unknown Source)
> Mar 03, 2017 5:25:21 PM org.apache.catalina.loader.WebappClassLoaderBase
> checkThreadLocalMapForLeaks
> SEVERE: The web application [donriver-core-showcase-rest] created a
> ThreadLocal with key of type [java.lang.ThreadLocal] (value
> [java.lang.ThreadLocal@5deb9ae2]) and a value of type
> [io.netty.util.internal.InternalThreadLocalMap] (value
> [io.netty.util.internal.InternalThreadLocalMap@65213265]) but failed to
> remove it when the web application was stopped. Threads are going to be
> renewed over time to try and avoid a probable memory leak.
> Mar 03, 2017 5:25:21 PM org.apache.catalina.loader.WebappClassLoaderBase
> checkThreadLocalMapForLeaks
> SEVERE: The web application [donriver-core-showcase-rest] created a
> ThreadLocal with key of type [java.lang.ThreadLocal] (value
> [java.lang.ThreadLocal@5deb9ae2]) and a value of type
> [io.netty.util.internal.InternalThreadLocalMap] (value
> [io.netty.util.internal.InternalThreadLocalMap@5bc37312]) but failed to
> remove it when the web application was stopped. Threads are going to be
> renewed over time to try and avoid a probable memory leak.
> Mar 03, 2017 5:25:21 PM org.apache.catalina.loader.WebappClassLoaderBase
> checkThreadLocalMapForLeaks
> SEVERE: The web application [donriver-core-showcase-rest] created a
> ThreadLocal with key of type [java.lang.ThreadLocal] (value
> [java.lang.ThreadLocal@5deb9ae2]) and a value of type
> [io.netty.util.internal.InternalThreadLocalMap] (value
> [io.netty.util.internal.InternalThreadLocalMap@7ff1b27f]) but failed to
> remove it when the web application was stopped. Threads are going to be
> renewed over time to try and avoid a probable memory leak.
> Mar 03, 2017 5:25:21 PM org.apache.coyote.AbstractProtocol stop
> INFO: Stopping ProtocolHandler ["http-nio-8080"]
> Mar 03, 2017 5:25:21 PM org.apache.coyote.AbstractProtocol stop
> INFO: Stopping ProtocolHandler ["ajp-nio-8009"]
> Mar 03, 2017 5:25:21 PM org.apache.coyote.AbstractProtocol destroy
> INFO: Destroying ProtocolHandler ["http-nio-8080"]
> Mar 03, 2017 5:25:21 PM org.apache.coyote.AbstractProtocol destroy
> INFO: Destroying ProtocolHandler ["ajp-nio-8009"]
> Please note that I am closing the JMSContext in the spring destroy-method.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)