Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6749

Classloader leak on FileUtils.createTmpDir()

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.14
    • Fix Version/s: 3.1.5, 3.0.8
    • Component/s: None
    • Environment:

      Slackware Linux 14.1 (kernel 3.10.17), Java 1.7.0_75, Tomcat 7.0.39 (this is my production environment)

    • Estimated Complexity:
      Unknown

      Description

      FileUtils.createTmpDir() adds a ApplicationShutdownHook to remove the recently created temp folder, creating a indirect reference to the Tomcat WebappClassloader from the hook static attribute at ApplicationShutdownHooks class, preventing the classloader to be collected.

      Actually, it will be collected when the JVM is turned off. But this is a web application container, it won't be turn off for a while.

      I only checked this with the version I´m currently using (2.7.14), but I checked the code at 3.1.x and master branches and it still the same.

        Attachments

          Activity

            People

            • Assignee:
              dkulp Daniel Kulp
              Reporter:
              diogosantana Diogo Sant'Ana
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: