I am seeing commons-pool's EVICTION_TIMER causing applications not to unload, using Edward Chou's modified JHAT that assists in tracking classloader leaks. --> java.lang.reflect.Method@0x2aaab4902360 (145 bytes) (field clazz:) exclude --> class org.apache.catalina.startup.Catalina (160 bytes) (??:) exclude --> org.apache.catalina.loader.StandardClassLoader@0x2aaab482c6e8 (123 bytes) (field parent:) exclude --> org.apache.catalina.loader.StandardClassLoader@0x2aaab480eab0 (123 bytes) (field classes:) exclude --> java.util.Vector@0x2aaab4815d98 (36 bytes) (field elementData:) exclude --> [Ljava.lang.Object;@0x2aaab4b545f8 (10256 bytes) (Element 21 of [Ljava.lang.Object;@0x2aaab4b545f8:) exclude --> class org.apache.tomcat.dbcp.pool.impl.GenericObjectPool (160 bytes) (static field EVICTION_TIMER:) exclude --> java.util.Timer@0x2aaab4732740 (40 bytes) (field thread:) exclude --> java.util.TimerThread@0x2aaab494fa80 (173 bytes) (field contextClassLoader:) exclude --> org.apache.catalina.loader.WebappClassLoader@0x2aaab482b4e8 (288 bytes) exclude This appears to be directly related to the upgrade to commons-pool 1.3 in both Tomcat 5.5.24 and Tomcat 6.0.11. Copying the commons-pool 1.2 based JAR from Tomcat 5.5.20 seems to solve the problem in 5.5.25 and 6.0.14 with no readily apparent side effects in my admittedly limited testing of my own apps. This has been reported in https://issues.apache.org/jira/browse/POOL-97 but doesn't appear to be rapidly heading towards a solution. Any chance of reverting to 1.2 to fix this leak?
I have proposed reverting to 1.2 on the dev list. I'll update this bug report when the discussion of that proposal reaches a conclusion. Feel free to add your $0.02 to the discussion.
The current view is continue with pool 1.3. Those seeing the issue can use the workaround you propose. Meanwhile, I am working with the commons-pool folks to get a 1.4 out with a fix for this and a couple of other issues.
Thanks, Mark. I appreciate your help on this as well as your patch for commons pool - so will lots of other people who won't need to debug why Tomcat is dying from lack of permgen. :)
commons-pool 1.4 has been released with the required fixes. It will be in 6.0.16 and should be in 5.5.26 if the votes come through in time.
This has been committed to svn for 5.5.x and will be in 5.5.26 onwards.