Skip to content

Incorrectly terminating timer thread #1407

Closed
@tulinkry

Description

@tulinkry

I know this is not a big problem however I think in some circumstances the timer thread in Executor#151 is not stopped correctly.

I sometimes see messages in my tomcat log:

13-Feb-2017 15:26:03.839 WARNING [http-nio-8080-exec-3] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [source] appears to have started a thread named [Timer-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)
 java.util.TimerThread.mainLoop(Timer.java:526)
 java.util.TimerThread.run(Timer.java:505)
13-Feb-2017 15:26:03.840 WARNING [http-nio-8080-exec-3] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [source] appears to have started a thread named [Timer-1] 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)
 java.util.TimerThread.mainLoop(Timer.java:526)
 java.util.TimerThread.run(Timer.java:505)

It's not really deterministic; sometimes it occurs sometimes it doesn't. As you can see the messages don't contain any useful information but I still suspect this timer for long processes. This also was happening before we add the timer thread for messages around #1195.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions