commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jontro (JIRA)" <j...@apache.org>
Subject [jira] Commented: (VFS-309) ThreadLocal memory leak in DefaultFileContent
Date Tue, 02 Nov 2010 15:06:47 GMT

    [ https://issues.apache.org/jira/browse/VFS-309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12927454#action_12927454
] 

jontro commented on VFS-309:
----------------------------

I was not aware of being required to call that method. Is it possible to do this when closing
the input/outputstream aswell?

> ThreadLocal memory leak in DefaultFileContent
> ---------------------------------------------
>
>                 Key: VFS-309
>                 URL: https://issues.apache.org/jira/browse/VFS-309
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.0
>         Environment: Tomcat servlet container
>            Reporter: jontro
>
> When using commons vfs in a servlet container the ThreadLocal values stored will not
be released once the request finishes.
> There needs to be a method to clear these values otherwise the data will leak into the
next request.
> This was detected with tomcat 6.0.26. Upon undeploying an app that uses commons vfs tomcat
detects the leaks with a huge amount of the following messages:
> A web application created a ThreadLocal with key of type [java.lang.ThreadLocal] (value
[java.lang.ThreadLocal@52fb241d]) and a value of type [org.apache.commons.vfs.provider.FileContentThreadData]
(value [org.apache.commons.vfs.provider.FileContentThreadData@6600167a]) but failed to remove
it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been
forcibly removed.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message