You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2010/11/25 22:25:39 UTC

DO NOT REPLY [Bug 49159] Improve ThreadLocal memory leak clean-up

https://issues.apache.org/bugzilla/show_bug.cgi?id=49159

--- Comment #15 from Sylvain Laurent <sy...@gmail.com> 2010-11-25 16:25:32 EST ---
Though my proposed patch renews threads in the pool, there are actually 2 other
types of threads that can prevent an application from being garbage collected
if it has ThreadLocal-related leaks : 
- the "main" thread (the one when starting up tomcat)
- the ContainerBackgroundProcessor thread
(- the shutdown hook thread too, but since the JVM is shutting down it does not
really matter)
- in an embedded scenario, the thread of the "containing" application

Currently when a webapp is started or stopped, the lifecycle callbacks into the
webapp (context listener, filters, servlet) are executed by one of those
threads.

I'm working on a patch where I spawn a thread that runs just during those
callbacks then shuts down, and so far it prevents such leaks.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org