JDK-6912018 : CMS: guarantee(head() != 0,"The head of the list cannot be NULL")
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 6u1,6u5-rev,6u16,6u18,7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS:
    generic,linux_redhat_5.2,solaris,solaris_10 generic,linux_redhat_5.2,solaris,solaris_10
  • CPU: generic,x86,sparc
  • Submitted: 2009-12-19
  • 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.
Other JDK 6 JDK 7 Other
1.4.2_31,hs16.3Fixed 6u20-revFixed 7Fixed hs16.3Fixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Description
Unexpected Error
------------------------------------------------------------------------------
Internal Error at binaryTreeDictionary.cpp:258, pid=2490, tid=8
Error: guarantee(head() != 0,"The head of the list cannot be NULL")

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot/hotspot/rev/05b775309e59
09-01-2010

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/05b775309e59
07-01-2010

SUGGESTED FIX The updated fix (assertion check added). arches% hg diff src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp diff --git a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp --- a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp @@ -3075,7 +3075,18 @@ void CompactibleFreeListSpace:: par_get_ if (rem > 0 && rem < MinChunkSize) { n--; rem += word_sz; } - assert((ssize_t)n >= 1, "Control point invariant"); + // Note that at this point we may have n == 0. + assert((ssize_t)n >= 0, "Control point invariant"); + + // If n is 0, the chunk fc that was found is not large + // enough to leave a viable remainder. We are unable to + // allocate even one block. Return fc to the + // dictionary and return, leaving "fl" empty. + if (n == 0) { + returnChunkToDictionary(fc); + return; + } + // First return the remainder, if any. // Note that we hold the lock until we decide if we're going to give // back the remainder to the dictionary, since a concurrent allocation
29-12-2009

EVALUATION The assertion failure exposed in additional testing indicated that the number of blocks being taken in par_get_chunk_of_blocks() was incorrectly reduced to 0. A fix for that case was made and testing of that fix for the failed guarantee reported here is in progress.
22-12-2009

SUGGESTED FIX diff --git a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp--- a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp @@ -2731,6 +2731,14 @@ par_get_chunk_of_blocks(size_t word_sz, if (rem > 0 && rem < MinChunkSize) { n--; rem += word_sz; } + // If n is 0, there chunk fc that was found is not large + // enough to leave a viable remainder. Return fc to the + // dictionary and return. + if (n == 0) { + returnChunkToDictionary(fc); + return; + } + // First return the remainder, if any. // Note that we hold the lock until we decide if we're going to give // back the remainder to the dictionary, since a contending allocator
22-12-2009