Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6858886
Votes 0
Synopsis G1: guarantee(_next_marked_bytes <= used(),"invariant") at heapRegion.hpp:359
Category hotspot:garbage_collector
Reported Against
Release Fixed hs17(b04), 7(b75) (Bug ID:2184804)
State 10-Fix Delivered, bug
Priority: 4-Low
Related Bugs
Submit Date 09-JUL-2009
Description
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
Posted Date : 2009-07-09 18:53:59.0

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.
Posted Date : 2009-07-09 18:53:59.0
Work Around
N/A
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.
Posted Date : 2009-10-21 13:13:22.0

http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/dfdaf65c3423
Posted Date : 2009-10-22 17:48:49.0

http://hg.openjdk.java.net/hsx/hsx16/baseline/rev/788af96b55e3
Posted Date : 2009-11-12 21:27:29.0

http://hg.openjdk.java.net/hsx/hsx16/master/rev/788af96b55e3
Posted Date : 2009-11-13 06:15:12.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang