Uploaded image for project: 'Commons FileUpload'
  1. Commons FileUpload
  2. FILEUPLOAD-95

native memory leak results in container crash

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.1 Final
    • None
    • None
    • Operating System: All
      Platform: All

    • 27477

    Description

      Struts File Upload uses DiskFileUpload which in turn uses DefaultFileItem whose getTempFile() method
      calls File.deleteOnExit() which is known to leak memory in the native heap. With our web app running
      in WebSphere on AIX it crashes (coredumps) within hours under a constant load. IBM is unable to fix
      the problem as it is in the JVM code they license from Sun and they are not allowed to modify. This
      means it exists in all JVMs. Please see http://
      developer.java.sun.com/developer/bugParade/bugs/4513817.html

      Noel Bergman is playing around with using PhantomReferences in order to avoid this problem.

      Clearly File.deleteOnExit() must be avoided but I'm not sure that using the PhantomReferences isn't
      going to have it's own problems. For example, won't temporary files be leaked with the JVM is stopped
      and restarted?

      Attachments

        Activity

          People

            Unassigned Unassigned
            forrest.girouard@openwave.com Forrest Girouard
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: