JDK-6939027 : G1: assertion failure during the concurrent phase of cleanup
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs17,hs18
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,linux
  • CPU: generic,x86
  • Submitted: 2010-03-29
  • Updated: 2013-09-18
  • 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 6 JDK 7 Other
6u21pFixed 7Fixed hs18Fixed
Related Reports
Duplicate :  
Relates :  
Description
Assertion failure at nightly test

;; Using jvm: "/export/local/common/jdk/baseline/linux-i586/jre/lib/i386/client/libjvm.so"
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/tmp/jprt/P1/B/214418.ap31282/source/src/share/vm/utilities/growableArray.hpp:186), pid=14114, tid=3738934160
#  Error: assert(0 <= i && i < _len,"illegal index")
#
# JRE version: 7.0-b86
# Java VM: OpenJDK Client VM (17.0-b10-2010-03-22-214418.ap31282.hotspot-g1-push-fastdebug mixed mode linux-x86 )
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

---------------  T H R E A D  ---------------

Current thread (0x08692800):  ConcurrentGCThread [stack: 0xded39000,0xdedba000] [id=14135]

Stack: [0xded39000,0xdedba000],  sp=0xdedb8d00,  free space=1ffdedb8d78k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x699ca5];;  _ZN7VMError6reportEP12outputStream+0x13f5
V  [libjvm.so+0x699f34];;  _ZN7VMError14report_and_dieEv+0x194
V  [libjvm.so+0x2b3105];;  _Z24report_assertion_failurePKciS0_+0x65
V  [libjvm.so+0x2f862f];;  _ZN15G1CollectedHeap9region_atEj+0x2f
V  [libjvm.so+0x34dbcb];;  _ZN16HeapRegionRemSet5clearEv+0x8b
V  [libjvm.so+0x26f2bd];;  _ZN14ConcurrentMark15completeCleanupEv+0xad
V  [libjvm.so+0x2a15e2];;  _ZN20ConcurrentMarkThread3runEv+0x7c2
V  [libjvm.so+0x562469];;  _ZL10java_startP6Thread+0xf9
C  [libpthread.so.0+0x573b]

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/f9ec1e4bbb44
16-04-2010

SUGGESTED FIX On this change I'll also piggyback a small fix which removes a message that it's printed before a Full GC when DisableExplicitGC is set.
14-04-2010

EVALUATION As a side note: this failure would only manifest itself as an assert but would not affect the product in any way (as, even though the outgoing region map might be wrong, it's never looked at anyway).
13-04-2010

EVALUATION The reason for the failure is that the outgoing region map for each region's RSet is not maintained correctly. The outgoing region map is a bitmap that determines which other regions a region A, say, has references to. There's a bit in the bitmap per region in the heap. If that bit is set to 1 then A has, or has had in the past, a reference to the region that corresponds to that bit. The issue is that the bits are only cleared during cleanup. So, if the heap is retracted (by, say, a Full GC) after a bit has been set and before a cleanup, then it's possible that said bit would correspond to a region that might not be in the committed space any more. We could try to prune such entries more carefully (at the end of, say, Full GCs). However, the outgoing region map is not actually used currently (we populate it but never read it). So I'm going to take the liberty to remove it from the codebase. If we need it in the future, we can re-introduce it.
13-04-2010

SUGGESTED FIX Remove the outgoing region map from regions' RSets.
13-04-2010

EVALUATION I can easily reproduce this on my workstation. I'll take a peek at what's happening.
12-04-2010