...
Leak cause | Detected by tomcat | Fixed by tomcat | Possible enhancements |
>=6.0.24 | >=6.0.24 | ||
>=6.0.24 | >=6.0.24 | ||
Webapp class instance indirectly held through a ThreadLocal value | no | no | Renew threads in the worker pool |
>=6.0.24 | >=6.0.24 | ||
>=6.0.24 |
| Detect child classloaders, don't stop TimerThread by default | |
ContextClassLoader / Threads spawned by classes loaded by the common classloader | >=6.0.24 |
| Detect child classloaders, don't stop TimerThread by default |
no | >=6.0.24 pre-spawns some known offenders |
| |
no | > 6.0.? |
| |
| > 6.0.? |
| |
> 6.0.? | > 6.0.? |
| |
| > 6.0.? |
|
...
So the leak is fixed, but unfortunately there's a side effect : it broke webapp B eviction timer.
(TODO: file a bug report to make the clearReferencesStopTimerThread optional and disabled by default)
Note: as of 6.0.24, by default tomcat stops threads of class java.util.TimerThread
whose context classloader is the WebAppClassLoader
of the app being stopped. It does not stop other threads, it only warns about them. It can try to stop them if the clearReferencesStopThreads
option of the standard context is set to true.
...