Harmony
  1. Harmony
  2. HARMONY-2697

[drlvm] Un-end()-ed deflaters leak native memory

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: DRLVM
    • Labels:
      None
    • Environment:
      Windows XP i686

      Description

      The attached test DeflateInflate.java quickly leaks memory and crashes on DRLVM.
      The test works okay on J9 and HotSpot.
      Note, that JRockit also leaks memory and crashes.

      Effectively, the test creates huge amounts of java objects, which keep pointers to blocks allocated
      in native heap. The native heap is exhausted before java heap is filled, so no garbage collection
      occurs. Should the java collection occur, it would be able to detect unreachable finalizable objects,
      run finalizers, which in turn will free native memory.

      1. DeflateInflate.java
        1.0 kB
        Salikh Zakirov

        Issue Links

          Activity

          Hide
          Gregory Shimansky added a comment -

          I removed [zip] category because it doesn't fully describe the problem of large native resources associated with java objects.

          Show
          Gregory Shimansky added a comment - I removed [zip] category because it doesn't fully describe the problem of large native resources associated with java objects.
          Hide
          Vladimir Beliaev added a comment -

          The issue is still reproducible May 22 on Windows/x86 like:

          Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
          java version "1.5.0"
          pre-alpha : not complete or compatible
          svn = r539322, (May 18 2007), Windows/ia32/msvc 1310, debug build
          http://incubator.apache.org/harmony
          .....java.lang.IllegalArgumentException:
          at java.util.zip.Deflater.createStream(Deflater.java)
          at java.util.zip.Deflater.<init>(Deflater.java:112)
          at DeflateInflate.main(DeflateInflate.java:8)
          FAILED

          Thanks
          Vladimir Beliaev

          Show
          Vladimir Beliaev added a comment - The issue is still reproducible May 22 on Windows/x86 like: Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable. java version "1.5.0" pre-alpha : not complete or compatible svn = r539322, (May 18 2007), Windows/ia32/msvc 1310, debug build http://incubator.apache.org/harmony .....java.lang.IllegalArgumentException: at java.util.zip.Deflater.createStream(Deflater.java) at java.util.zip.Deflater.<init>(Deflater.java:112) at DeflateInflate.main(DeflateInflate.java:8) FAILED Thanks Vladimir Beliaev
          Hide
          Mikhail Markov added a comment -

          I've linked this isssue with HARMONY-2530 which looks very similar.
          The only problem is that 2530 is reproducible on J9 as well (while this JIRA report says that it reproducible on DRLVM only) - that's why i've linked them as "reated" not "duplicated".
          Nevertheless i think that fixing 2530 will resolve this issue as well.

          Show
          Mikhail Markov added a comment - I've linked this isssue with HARMONY-2530 which looks very similar. The only problem is that 2530 is reproducible on J9 as well (while this JIRA report says that it reproducible on DRLVM only) - that's why i've linked them as "reated" not "duplicated". Nevertheless i think that fixing 2530 will resolve this issue as well.
          Hide
          Vladimir Beliaev added a comment -

          Mikhail is right - attached DeflateInflate test has passed both with J9 & DRLVM on M4 revisions:

          $ ~/trunk/working_classlib/deploy/jdk/jre/bin/java -cp . DeflateInflate
          ....................................................................................................PASSED
          $ ~/trunk/working_vm/build/deploy/jdk/jre/bin/java -cp . DeflateInflate
          ....................................................................................................PASSED

          This bug may be closed as a DUPLICATE of HARMONY-2530.

          Thanks
          Vladimir

          Show
          Vladimir Beliaev added a comment - Mikhail is right - attached DeflateInflate test has passed both with J9 & DRLVM on M4 revisions: $ ~/trunk/working_classlib/deploy/jdk/jre/bin/java -cp . DeflateInflate ....................................................................................................PASSED $ ~/trunk/working_vm/build/deploy/jdk/jre/bin/java -cp . DeflateInflate ....................................................................................................PASSED This bug may be closed as a DUPLICATE of HARMONY-2530 . Thanks Vladimir
          Hide
          Mikhail Markov added a comment -

          Closing as duplicate of HARMONY-2530.

          Show
          Mikhail Markov added a comment - Closing as duplicate of HARMONY-2530 .

            People

            • Assignee:
              Mikhail Markov
              Reporter:
              Salikh Zakirov
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development