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 2006/03/23 22:52:01 UTC

DO NOT REPLY [Bug 39090] New: - Memory Leak: Tomcat files keep references to classes loaded by WebappClassLoader

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39090>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39090

           Summary: Memory Leak: Tomcat files keep references to classes
                    loaded by WebappClassLoader
           Product: Tomcat 5
           Version: 5.5.9
          Platform: All
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P2
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: kyrill@technolog.ca


I am running Tomcat 5.5.15 on the latest J2SE 1.6 Mustang build 74. 

org.apache.tomcat.util.digester.Digester maintains references to commons-logging
log that gets loaded by WebappClassloader. See attached.

Thus, applications that put commons-logging.jar and log4.jar in their
WEB-INF/lib will not be GC'ed on reloads, undeploys, and stops. This is a severe
memory leak for developer's using Tomcat for development.

Please see the attachment from the YourKit Profiler that confirms this finding.

Note: it appears the last place in Tomcat's source code where this error occurs.
Once this is fixed, Tomcat will be fully "developer-friendly". :-)

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

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


DO NOT REPLY [Bug 39090] - Memory Leak: Tomcat files keep references to classes loaded by WebappClassLoader

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39090>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39090


markt@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From markt@apache.org  2006-11-19 19:37 -------
This bug was listed as against 5.5.9 although the OP stated it was seen in 5.5.15.

Yoav's comment is dated after Remy's fix for 5.5.16
(http://marc.theaimsgroup.com/?l=tomcat-dev&m=114078110310583&w=2) was committed
hence his question regarding what else could/should be done since I am assuming
he was looking at SVN.

I have tested repeatedly reloading a web application and I cannot create this
memory leak (confirmed by analysing with YourKit). I am therefore resolving this
as fixed.

Comment 5 does not appear to be related to this issue. If this is still an
issue, a new bug report should be created.

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

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


DO NOT REPLY [Bug 39090] - Memory Leak: Tomcat files keep references to classes loaded by WebappClassLoader

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39090>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39090


mail@dennis-hauser.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mail@dennis-hauser.de




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

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


DO NOT REPLY [Bug 39090] - Memory Leak: Tomcat files keep references to classes loaded by WebappClassLoader

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39090>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39090


yoavs@computer.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO




------- Additional Comments From yoavs@computer.org  2006-04-13 19:42 -------
Hmm.  It looks like the clear() and reset() methods (the latter calls clear())
set the log references to null.  What would you suggest?  An explicit finalizer
that calls clear() or reset() ?

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

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


DO NOT REPLY [Bug 39090] - Memory Leak: Tomcat files keep references to classes loaded by WebappClassLoader

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39090>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39090


g.grzybek@op.pl changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |g.grzybek@op.pl




------- Additional Comments From g.grzybek@op.pl  2006-06-19 13:34 -------
*** Bug 39631 has been marked as a duplicate of this bug. ***

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

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


DO NOT REPLY [Bug 39090] - Memory Leak: Tomcat files keep references to classes loaded by WebappClassLoader

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39090>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39090





------- Additional Comments From rodsc@terra.com.br  2006-09-05 12:58 -------
I had exactly the same problem as described in bug #39090 when starting Tomcat
5.5.17:

java.lang.NullPointerException
   at org.apache.log4j.Category.isEnabledFor(Category.java:757)
   at
org.apache.commons.logging.impl.Log4JLogger.isTraceEnabled(Log4JLogger.java:327)

After replacing commons-logging.jar (1.1) with an older version (1.0.4), the
problem was gone. Before that I replaced log4j-1.2.13 with 1.2.8, but I still
had the problem.

This problem, in particular, does not seem to be related to Tomcat.

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

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


DO NOT REPLY [Bug 39090] - Memory Leak: Tomcat files keep references to classes loaded by WebappClassLoader

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39090>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39090





------- Additional Comments From kyrill@technolog.ca  2006-04-14 01:49 -------
It seems like the code is pretty stable there. I'd suggest that the logger be
removed all together along with all log.info() and log.debug() statements in
that class. That should take care of it completely.

Kyrill

(In reply to comment #2)
> Hmm.  It looks like the clear() and reset() methods (the latter calls clear())
> set the log references to null.  What would you suggest?  An explicit finalizer
> that calls clear() or reset() ?

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

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


DO NOT REPLY [Bug 39090] - Memory Leak: Tomcat files keep references to classes loaded by WebappClassLoader

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39090>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39090


kyrill@technolog.ca changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #17960|Profile Memory Leak Graph   |Profiler Memory Leak Graph
        description|                            |




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

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


DO NOT REPLY [Bug 39090] - Memory Leak: Tomcat files keep references to classes loaded by WebappClassLoader

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39090>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39090





------- Additional Comments From kyrill@technolog.ca  2006-03-23 21:52 -------
Created an attachment (id=17960)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17960&action=view)
Profile Memory Leak Graph


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

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


DO NOT REPLY [Bug 39090] - Memory Leak: Tomcat files keep references to classes loaded by WebappClassLoader

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39090>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39090


markt@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rich.unger@gmail.com




------- Additional Comments From markt@apache.org  2006-11-19 19:39 -------
*** Bug 40679 has been marked as a duplicate of this bug. ***

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

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