commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jochen Wiedmann (JIRA)" <>
Subject [jira] Commented: (IO-99) FileCleaner thread never ends and cause memory leak in AS
Date Wed, 06 Dec 2006 09:40:26 GMT
    [ ] 
Jochen Wiedmann commented on IO-99:

I have added the following section to the FileUpload docs. It seems worth mentioning here,
because it confirms Martins concerns: It should be possible to take over control of the reaper
thread completely. In particular, one should not be forced to use the FileCleaner classes

      Unfortunately, this is not the whole story. The above applies only, if
      * You are using commons-io 1.3, or later.
      * You are loading commons-io from your web applications
         WEB-INF/lib and not from another location, for example the
        common/lib directory of Tomcat. This is not unlikely, because
        there are quite a few applications, which do ship commons-io.

      If commons-io 1.3 is loaded from your containers class path, then
      the following might occur: Suggest that you have two applications,
      called A and B running. (It might as well be the same application
      with two names aka servlet contexts.) Both applications are using
      the <code>FileCleanerCleanup</code>. Now, if you terminate application
      A, but B is still running, then A terminates B's reaper thread as

      In other words, you should consider carefully, whether to use
      the <code>FileCleanerCleanup</code>, or not. When unsure, or if you
      are happy with commons-fileupload 1.1.1, or before, then you
      possibly would like to avoid it.

> FileCleaner thread never ends and cause memory leak in AS
> ---------------------------------------------------------
>                 Key: IO-99
>                 URL:
>             Project: Commons IO
>          Issue Type: Bug
>    Affects Versions: 1.2
>         Environment: JBOssPortal with commons.fileupload
>            Reporter: Vera Mickaƫl
>            Priority: Critical
>             Fix For: 1.3
>         Attachments: IO-99.patch
> FileCleaner opens a thread and no solution is given to the user to end it. So when an
application is undeployed
> in an Application Server, a thread is still alive. The WebApp can't be undeployed and
this results in a classloader
> leak that will cause an OutOfMemoryError.
> I think the API should be extended so that a user can end the thread. A better way would
be to provide a class that
> cleans everything for commons IO.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


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

View raw message