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

jmap '-histo:live' option is necessary for proper leak detection

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 7
    • 7
    • core-libs
    • b105
    • generic
    • generic
    • Verified

        The following following bug:

            6942989 2/2 Memory leak of java.lang.ref.WeakReference objects

        was used to add the following tests:

            java/util/logging/AnonLoggerWeakRefLeak.sh
            java/util/logging/LoggerWeakRefLeak.sh

        These tests use 'jmap -histo:live' to sample instance counts to
        determine if the memory leak is present or not. The tests were
        originally written with a fall back to 'jmap -histo' if the bits
        being tested didn't support 'jmap -histo:live'. It turns out that
        'jmap -histo' isn't reliable for returning proper instance counts
        because it does not require a GC to be done. So while 'jmap -histo'
        can show decreased counts in bits that have the memory leak fixed,
        it can also make it look like the leak is still present.

        The two tests need to be modified to abort if the 'jmap -histo:live'
        option isn't available. Just to make life difficult, when using
        OpenJDK6 bits on Windows, jmap will report a usage message that
        says that the '-histo:live' option isn't available when it is.
        That issue will be tracked with a different bug.

              dcubed Daniel Daugherty
              dcubed Daniel Daugherty
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: