Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6181178

native memory leak in JarDiff of JnlpDownloadServlet

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • 6
    • 1.4.2_05
    • deploy
    • None
    • 1.4.2
    • sparc
    • solaris_8

      JnlpDownloadServlet uses JarDiff to generate JARDIFF Files.
      JarDiff uses java.util.jar.JarFile to get InputStreams of JarEntries.
      Unfortunately the inputstream is not closed explicitly after using it
      (within method JarFile.JarFile2.differs).
      Not closing the returned InputStream causes native memory leak of C-heap, and eventually JVM crashes with memory errors like:
      - java.lang.OutOfMemoryError
      - Exception in thread "CompilerThread0" java.lang.OutOfMemoryError:

      Customer is running with 2GB Java Heap and 400 MB PermSpace, so free native memory is low at the beginning and memory leak causes JVM crash very soon.

      Problem was reproduced on JnlpDownload servlet of Webstart Developer Pack 1.2 and JnlpDownloadServlet which comes as samples of jdk 1.5.0.
      Problems appears if jarentries are defalted, does not happen on stored jar entries.
      Test-Platform is Solaris 8 or 9 32-bit Java 1.4.2 and 1.5.0.
      ###@###.### 10/19/04 13:57 GMT

            jchusunw Jacky Chu (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: