Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not stop elegantly when running under tomcat #1665

Closed
ralf0131 opened this issue Apr 24, 2018 · 3 comments
Closed

Could not stop elegantly when running under tomcat #1665

ralf0131 opened this issue Apr 24, 2018 · 3 comments

Comments

@ralf0131
Copy link
Contributor

When deploying dubbo application under tomcat 8.5.30, the application could not stop elegantly. Below is the stack trace:

24-Apr-2018 09:50:57.637 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [dubbo-tomcat-demo-1.0.0-SNAPSHOT] appears to have started a thread named [New I/O server boss #1 ([id: 0x6f20c905, /0:0:0:0:0:0:0:0:20880])] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.base@10/sun.nio.ch.KQueueArrayWrapper.kevent0(Native Method)
 java.base@10/sun.nio.ch.KQueueArrayWrapper.poll(KQueueArrayWrapper.java:196)
 java.base@10/sun.nio.ch.KQueueSelectorImpl.doSelect(KQueueSelectorImpl.java:116)
 java.base@10/sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:89)
 java.base@10/sun.nio.ch.SelectorImpl.select(SelectorImpl.java:100)
 org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink$Boss.run(NioServerSocketPipelineSink.java:240)
 org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
 org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44)
 java.base@10/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
 java.base@10/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
 java.base@10/java.lang.Thread.run(Thread.java:844)
24-Apr-2018 09:50:57.638 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [dubbo-tomcat-demo-1.0.0-SNAPSHOT] appears to have started a thread named [dubbo-remoting-server-heartbeat-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.base@10/jdk.internal.misc.Unsafe.park(Native Method)
 java.base@10/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
 java.base@10/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2117)
 java.base@10/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1182)
 java.base@10/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
 java.base@10/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1061)
 java.base@10/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1121)
 java.base@10/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
 java.base@10/java.lang.Thread.run(Thread.java:844)
24-Apr-2018 09:50:57.640 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [dubbo-tomcat-demo-1.0.0-SNAPSHOT] appears to have started a thread named [DubboRegistryFailedRetryTimer-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.base@10/jdk.internal.misc.Unsafe.park(Native Method)
 java.base@10/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
 java.base@10/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2117)
 java.base@10/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1182)
 java.base@10/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
 java.base@10/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1061)
 java.base@10/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1121)
 java.base@10/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
 java.base@10/java.lang.Thread.run(Thread.java:844)
24-Apr-2018 09:50:57.647 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [dubbo-tomcat-demo-1.0.0-SNAPSHOT] appears to have started a thread named [DubboMulticastRegistryCleanTimer-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.base@10/jdk.internal.misc.Unsafe.park(Native Method)
 java.base@10/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
 java.base@10/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2117)
 java.base@10/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1182)
 java.base@10/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
 java.base@10/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1061)
 java.base@10/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1121)
 java.base@10/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
 java.base@10/java.lang.Thread.run(Thread.java:844)
24-Apr-2018 09:50:57.650 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [dubbo-tomcat-demo-1.0.0-SNAPSHOT] appears to have started a thread named [DubboShutdownHook] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.base@10/java.lang.Thread.sleep(Native Method)
 com.alibaba.dubbo.config.ProtocolConfig.destroyAll(ProtocolConfig.java:162)
 com.alibaba.dubbo.config.AbstractConfig$1.run(AbstractConfig.java:82)
 java.base@10/java.lang.Thread.run(Thread.java:844)

It looks like there are several threads still running when web application stops.

@ralf0131
Copy link
Contributor Author

@ralf0131
Copy link
Contributor Author

This issue has been fixed from 2.6.3 onwards.

@ralf0131
Copy link
Contributor Author

Fixed by #1763

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant