JDK-6971847 : jmap '-histo:live' option is necessary for proper leak detection
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util.logging
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2010-07-23
  • Updated: 2011-03-08
  • Resolved: 2011-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 Other
7 b105Fixed OpenJDK6Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
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.

Comments
EVALUATION http://hg.openjdk.java.net/jdk6/jdk6/jdk/rev/a76011619e85
26-07-2010

EVALUATION http://hg.openjdk.java.net/jdk7/tl/jdk/rev/1bfa1c864553
26-07-2010

EVALUATION See description.
26-07-2010

SUGGESTED FIX See attached 6971847-webrev-cr0.tgz for the proposed fix.
26-07-2010