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

           Summary: PermGen leak when calling JspFragment.invoke() with a
                    custom Writer
           Product: Tomcat 6
           Version: 6.0.29
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: knst.koli...@gmail.com


Created an attachment (id=26266)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26266)
writerleak.war - Reproduces the leak

We have a web application that contains a SimpleTag that calls
JspFragment.invoke(writer) with a custom java.io.Writer (actually, a NullWriter
from commons-io).

When this application is undeployed, it still remains in memory, as reported by
the "Find leaks" tool in the manager webapp.

I am attaching a simple sample application that reproduces the issue.

To reproduce:
1. Deploy the app.
2. Open index.jsp
3. Undeploy the app.
4. "Find leaks" reports that the app is still in memory


Using the Eclipse MAT tool I can see that the leak is caused by
o.a.jasper.runtime.BodyContentImpl keeping a reference to the Writer,
while the BodyContentImpl instance is cached in some pool referenced by a
ThreadLocal.

-- 
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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to