JDK-6858886 : G1: guarantee(_next_marked_bytes <= used(),"invariant") at heapRegion.hpp:359
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs16
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2009-07-09
  • 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
6u18Fixed 7Fixed hs16Fixed
Description
The following tests fail with identical symptoms:

nsk/stress/except/except005
nsk/stress/except/except006
nsk/stress/except/except008
nsk/stress/except/except009
nsk/stress/except/except010

These tests fail on all platforms (OS, 32/64), but I have not checked
whether the failure symptom is always the guarantee in the Synopsis.
Further investigation of the failure modes of these tests on various
platforms may require the adjustment of platform information
(currently left at OS: generic, Hardware: generic) provided in this initial
filing.
It seems
to have been failing since at least mid-June, although the failure
symptoms have not always been this. (The symptoms seem to vary
all over the map.) I must confess I didn't search back farther
than mid-June.

I'll file a bug unless someone believes there's already a bug tracking this.
-- ramki

;; Using jvm: "/export/local/common/jdk/baseline/linux-amd64/jre/lib/amd64/server/libjvm.so"
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/tmp/jprt/P1/B/220857.ap31282/source/src/share/vm/gc_implementation/g1/heapRegion.hpp:359), pid=14756, tid=140626223606096
#  Error: guarantee(_next_marked_bytes <= used(),"invariant")
#
# JRE version: 7.0-b63
# Java VM: OpenJDK 64-Bit Server VM (16.0-b05-2009-07-07-220857.ap31282.hotspot-g1-push-fastdebug mixed mode linux-amd64 )
# 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 (0x000000000206c000):  ConcurrentGCThread [stack: 0x00007fe6180aa000,0x00007fe6181ab000] [id=14768]

Stack: [0x00007fe6180aa000,0x00007fe6181ab000],  sp=0x00007fe6181a9640,  free space=3fd0000000000000018k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x9c51df];;  _ZN7VMError6reportEP12outputStream+0x11df
V  [libjvm.so+0x9c557a];;  _ZN7VMError14report_and_dieEv+0x2da
V  [libjvm.so+0x44ab3e];;  _Z12report_fatalPKciS0_+0x6e
V  [libjvm.so+0x408235];;  _ZN22CalcLiveObjectsClosure12doHeapRegionEP10HeapRegion+0x705
V  [libjvm.so+0x54f296];;  _ZN13HeapRegionSeq12iterate_fromEP10HeapRegionP17HeapRegionClosure+0x76
V  [libjvm.so+0x3fc3e3];;  _ZN14ConcurrentMark18calcDesiredRegionsEv+0x223
V  [libjvm.so+0x4316fe];;  _ZN20ConcurrentMarkThread3runEv+0x92e
V  [libjvm.so+0x809ed0];;  _ZL10java_startP6Thread+0xf0


see: http://sqeweb.sfbay.sun.com/nfs/results/vm/gtee/JDK7/NIGHTLY/VM/2009-07-08/G1_GC_Baseline/vm/linux-amd64/server/mixed/linux-amd64_server_mixed_nsk.stress.testlist/ResultDir/except006//hs_err_pid14756.log

Comments
EVALUATION http://hg.openjdk.java.net/hsx/hsx16/master/rev/788af96b55e3
13-11-2009

EVALUATION http://hg.openjdk.java.net/hsx/hsx16/baseline/rev/788af96b55e3
12-11-2009

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/dfdaf65c3423
22-10-2009

EVALUATION from Andrey's e-mail: Details: The cause of the failure is integer overflow when converting object size from words to bytes. The fix is to widen the object size to size_t: src/share/vm/gc_implementation/g1/concurrentMark.cpp @@ -1328,11 +1328,11 @@ #endif } // In any case, we set the last card num. last_card_num = obj_last_card_num; - marked_bytes += obj_sz * HeapWordSize; + marked_bytes += (size_t)obj_sz * HeapWordSize; // Find the next marked object after this one. start = _bm->getNextMarkedWordAddress(start + 1, nextTop); _changed = true; } // Handle the last range, if any.
21-10-2009