Bug 43675 - Classloader leak in org.apache.tomcat.util.http.ServerCookie
Summary: Classloader leak in org.apache.tomcat.util.http.ServerCookie
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 5.5.24
Hardware: Other other
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-23 01:32 UTC by Davide Romanini
Modified: 2012-07-24 03:31 UTC (History)
2 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Davide Romanini 2007-10-23 01:32:34 UTC
I'm investigating problems related to PermGen saturation on hot redeploy of my 
web applications. Using jhat I found that the class 
org.apache.catalina.util.http.ServerCookie has a static reference to my webapp 
classloader through the log field. This is what jhat shows:

Static reference from org.apache.tomcat.util.http.ServerCookie.log (from class 
org.apache.tomcat.util.http.ServerCookie) :
--> org.apache.commons.logging.impl.Log4JLogger@0x66826ed8 (16 bytes) (??:)
--> class org.apache.commons.logging.impl.Log4JLogger (84 bytes) (??:)
--> org.apache.catalina.loader.WebappClassLoader@0x6632eb38 (152 bytes) 

It is similar to bug#42172.

The problem shows in Tomcat 5.5.25
Comment 1 Davide Romanini 2007-10-23 01:51:51 UTC
Same problem with org.apache.jasper.xmlparser.ParserUtils.errorHandler and 
org.apache.jasper.xmlparser.ParserUtils.entityResolver.

Static reference from org.apache.jasper.xmlparser.ParserUtils.errorHandler 
(from class org.apache.jasper.xmlparser.ParserUtils) :
--> org.apache.jasper.xmlparser.MyErrorHandler@0x6657ffb8 (12 bytes) (field 
log:)
--> org.apache.commons.logging.impl.Log4JLogger@0x66580558 (16 bytes) (??:)
--> class org.apache.commons.logging.impl.Log4JLogger (84 bytes) (??:)
--> org.apache.catalina.loader.WebappClassLoader@0x6632eb38 (152 bytes)
Static reference from org.apache.jasper.xmlparser.ParserUtils.entityResolver 
(from class org.apache.jasper.xmlparser.ParserUtils) :
--> org.apache.jasper.xmlparser.MyEntityResolver@0x6657ffc8 (12 bytes) (field 
log:)
--> org.apache.commons.logging.impl.Log4JLogger@0x66580568 (16 bytes) (??:)
--> class org.apache.commons.logging.impl.Log4JLogger (84 bytes) (??:)
--> org.apache.catalina.loader.WebappClassLoader@0x6632eb38 (152 bytes) 
Comment 2 Mark Thomas 2007-10-30 19:41:03 UTC
Patch proposed for tc6. If accepted, I'll propose a backport to 5.5.x
Comment 3 Mark Thomas 2007-11-27 15:10:18 UTC
Fixed in 6.0.x.
Comment 4 Mark Thomas 2008-01-06 15:14:05 UTC
Fixed in 5.5.x and will be included in 5.5.26 onwards.