tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 49414] New: Wrong memory leak detection: executor thread reported as web app thread
Date Wed, 09 Jun 2010 14:11:14 GMT

           Summary: Wrong memory leak detection: executor thread reported
                    as web app thread
           Product: Tomcat 7
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina

Created an attachment (id=25566)
 --> (
Unit test allowing to generate the wrong log message (but doesn't catpure the
log to really test it)

At Tomcat shutdown I have quite often following message

SEVERE: The web application [/] appears to have started a thread named
[http-8001-exec-1] but has failed to stop it. This is very likely to create a
memory leak. 

Looking into the details it appears that a request is still being processed.
The thread that is detected as leak is not a user thread but Tomcat's executor

I'm not sure what would be the right behaviour here: complain about a request
that is still being processed or to wait for it. In any case, Tomcat shouldn't
complain with current message as it is too misleading and leads to ignoring
real memory leak messages.

The root cause of the problem is the strategy used to detect threads started by
a web app which isn't able to correctly identify threads started by Tomcat
itself (contextClassLoader is changed at each request). A solution could be to
use a ThreadGroup to identify "Tomcat threads". If you see this as a good
solution, I can try to prepare a patch.

Same problem occurs in Tomcat 6.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message