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

tomcat reload memory leak #219

Open
samz406 opened this issue Jun 20, 2019 · 0 comments
Open

tomcat reload memory leak #219

samz406 opened this issue Jun 20, 2019 · 0 comments

Comments

@samz406
Copy link

samz406 commented Jun 20, 2019

I use spring-loaded reload tomcat project , there are some log as follow

`20-Jun-2019 09:55:01.470 信息 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.startup.HostConfig.undeploy Undeploying context [/workstaion]
20-Jun-2019 09:55:01.514 警告 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [workstaion] appears to have started a thread named [Log4j2-TF-3-Scheduled-1] 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(LockSupport.java:215)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
java.lang.Thread.run(Thread.java:745)
20-Jun-2019 09:55:01.516 警告 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [workstaion] appears to have started a thread named [FileSystemWatcher: files=#8 cl=WebappClassLoader
context: workstaion
delegate: false
----------> Parent Classloader:
java.net.URLClassLoader@548a9f61
] 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)
org.springsource.loaded.agent.Watcher.run(FileSystemWatcher.java:212)
java.lang.Thread.run(Thread.java:745)
20-Jun-2019 09:55:01.521 警告 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [workstaion] appears to have started a thread named [heartbeat thread] 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)
com.a.control.service.HeartbeatService.heartbeat(HeartbeatService.java:65)
com.a.control.service.HeartbeatService.lambda$start$0(HeartbeatService.java:54)
com.a.control.service.HeartbeatService$$Lambda$47/1616083987.run(Unknown Source)
java.lang.Thread.run(Thread.java:745)
20-Jun-2019 09:55:01.525 警告 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [workstaion] appears to have started a thread named [workstation updategrade thread] 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)
com.a.control.service.UpgradeService.start(UpgradeService.java:45)
com.a.control.service.UpgradeService.lambda$execute$0(UpgradeService.java:35)
com.a.control.service.UpgradeService$$Lambda$52/1432022325.run(Unknown Source)
java.lang.Thread.run(Thread.java:745)
20-Jun-2019 09:55:01.881 信息 [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive E:\dev\service\apache-tomcat-8.0.38\webapps\workstaion.war
20-Jun-2019 09:55:02.086 信息 [FileSystemWatcher: files=#8 cl=WebappClassLoader
context: workstaion
delegate: false
----------> Parent Classloader:
java.net.URLClassLoader@548a9f61
] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [com.a.control.config.CorsConf__I]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [com.a.control.config.CorsConf__I]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1353)
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1341)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1206)
at java.lang.ClassLoader.loadClass(ClassLoader.java:411)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.lang.ClassLoader.defineClass(ClassLoader.java:642)
at org.springsource.loaded.ChildClassLoader.defineClass(ChildClassLoader.java:39)
at org.springsource.loaded.TypeRegistry.defineClass(TypeRegistry.java:1306)
at org.springsource.loaded.CurrentLiveVersion.define(CurrentLiveVersion.java:124)
at org.springsource.loaded.CurrentLiveVersion.(CurrentLiveVersion.java:111)
at org.springsource.loaded.ReloadableType.loadNewVersion(ReloadableType.java:422)
at org.springsource.loaded.TypeRegistry.loadNewVersion(TypeRegistry.java:1018)
at org.springsource.loaded.agent.ReloadableFileChangeListener.fileChanged(ReloadableFileChangeListener.java:104)
at org.springsource.loaded.agent.Watcher.determineChangesSince(FileSystemWatcher.java:251)
at org.springsource.loaded.agent.Watcher.run(FileSystemWatcher.java:235)
at java.lang.Thread.run(Thread.java:745)

20-Jun-2019 09:55:02.185 信息 [FileSystemWatcher: files=#8 cl=WebappClassLoader`

version:
reloaded 1.2.6
tomcat8
spring 5.1.6

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