United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6939027 G1: assertion failure during the concurrent phase of cleanup
6939027 : G1: assertion failure during the concurrent phase of cleanup

Details
Type:
Bug
Submit Date:
2010-03-29
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
hotspot
OS:
linux,generic
Sub-Component:
gc
CPU:
x86,generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
hs17,hs18
Fixed Versions:
hs18

Related Reports
Backport:
Backport:
Backport:
Backport:
Duplicate:
Relates:

Sub Tasks

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
                                     
2010-04-16
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.
                                     
2010-04-14
SUGGESTED FIX

Remove the outgoing region map from regions' RSets.
                                     
2010-04-13
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.
                                     
2010-04-13
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).
                                     
2010-04-13
EVALUATION

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



Hardware and Software, Engineered to Work Together