JDK-6861557 : G1: assert(top() == bottom() || zfs == Allocated,"Region must be empty, or ...")
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs16
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2009-07-16
  • Updated: 2013-09-18
  • Resolved: 2011-03-07
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 Other
6u21Fixed hs16Fixed
Related Reports
Relates :  
Description
The test: gc/gctests/SoftReference/soft004

The hs_err URL: http://sqeweb.sfbay/nfs/tools/gtee/results/JDK7/NIGHTLY/VM/2009-07-10/G1_GC_Baseline/vm/linux-amd64/server/mixed/linux-amd64_server_mixed_vm.gc.testlist/ResultDir/soft004//hs_err_pid27820.log

Excerpts thereof:

;; 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.cpp:465), pid=27820, tid=139957724494160
#  Error: assert(top() == bottom() || zfs == Allocated,"Region must be empty, or we must be setting it to allocated.")
#
# 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 (0x00007f4b78183000):  VMThread [stack: 0x00007f4a7263b000,0x00007f4a7273c000] [id=27836]

Stack: [0x00007f4a7263b000,0x00007f4a7273c000],  sp=0x00007f4a7273a260,  free space=3fc0000000000000018k
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+0x44ac8e];;  _Z24report_assertion_failurePKciS0_+0x6e
V  [libjvm.so+0x544c0d];;  _ZN10HeapRegion24set_zero_fill_state_workENS_13ZeroFillStateE+0x3d
V  [libjvm.so+0x54fd07];;  _ZN13HeapRegionSeq9shrink_byEmRm+0x117
V  [libjvm.so+0x4db407];;  _ZN15G1CollectedHeap13shrink_helperEm+0x67
V  [libjvm.so+0x4e5773];;  _ZN15G1CollectedHeap6shrinkEm+0x33
V  [libjvm.so+0x4d92a6];;  _ZN15G1CollectedHeap41resize_if_necessary_after_full_collectionEm+0x1b6
V  [libjvm.so+0x4e69a0];;  _ZN15G1CollectedHeap13do_collectionEbbm+0x680
V  [libjvm.so+0x4e725f];;  _ZN15G1CollectedHeap25satisfy_failed_allocationEm+0x7f
V  [libjvm.so+0x9e0a5c];;  _ZN25VM_G1CollectForAllocation4doitEv+0x4c
V  [libjvm.so+0x9dfb0f];;  _ZN12VM_Operation8evaluateEv+0x8f
V  [libjvm.so+0x9ddc40];;  _ZN8VMThread18evaluate_operationEP12VM_Operation+0xc0
V  [libjvm.so+0x9de5db];;  _ZN8VMThread4loopEv+0x24b
V  [libjvm.so+0x9deb2e];;  _ZN8VMThread3runEv+0xae
V  [libjvm.so+0x809ed0];;  _ZL10java_startP6Thread+0xf0

VM_Operation (0x00007f4a725380b0): G1CollectForAllocation, mode: safepoint, requested by thread 0x00007f4b78193800


---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )
  0x00007f4b781d8000 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=27843, stack(0x00007f4a71f34000,0x00007f4a72035000)]
  0x00007f4b781d5000 JavaThread "CompilerThread1" daemon [_thread_blocked, id=27842, stack(0x00007f4a72035000,0x00007f4a72136000)]
  0x00007f4b781d2800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=27841, stack(0x00007f4a72136000,0x00007f4a72237000)]
  0x00007f4b781d0000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=27840, stack(0x00007f4a72237000,0x00007f4a72338000)]
  0x00007f4b781c9000 JavaThread "Surrogate Locker Thread (CMS)" daemon [_thread_blocked, id=27839, stack(0x00007f4a72338000,0x00007f4a72439000)]
  0x00007f4b78193800 JavaThread "Finalizer" daemon [_thread_blocked, id=27838, stack(0x00007f4a72439000,0x00007f4a7253a000)]
  0x00007f4b78191000 JavaThread "Reference Handler" daemon [_thread_blocked, id=27837, stack(0x00007f4a7253a000,0x00007f4a7263b000)]
  0x0000000001a9e000 JavaThread "main" [_thread_blocked, id=27821, stack(0x00007f4b86120000,0x00007f4b86221000)]

Other Threads:
=>0x00007f4b78183000 VMThread [stack: 0x00007f4a7263b000,0x00007f4a7273c000] [id=27836]
  0x00007f4b781e3800 WatcherThread [stack: 0x00007f4a71e33000,0x00007f4a71f34000] [id=27844]

VM state:at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread:  ([mutex/lock_event])
[0x0000000001a9ae18] Threads_lock - owner thread: 0x00007f4b78183000
[0x0000000001a9b638] Heap_lock - owner thread: 0x00007f4b78193800

Heap
 garbage-first heap   total 4065280K, used 84566K [0x00007f4a7a800000, 0x00007f4b72a00000, 0x00007f4b72a00000)
  region size 1024K, 0 young (0K), 0 survivors (0K)
 compacting perm gen  total 20480K, used 2914K [0x00007f4b72a00000, 0x00007f4b73e00000, 0x00007f4b77e00000)
   the space 20480K,  14% used [0x00007f4b72a00000, 0x00007f4b72cd8a60, 0x00007f4b72cd8c00, 0x00007f4b73e00000)
No shared spaces configured.
VM Arguments:
jvm_args: -Xmixed -XX:-PrintVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC 
java_command: gc.gctests.SoftReference.soft004.soft004
Launcher Type: SUN_STANDARD

Environment Variables:
CLASSPATH=/export/local/17317.JDK7.NIGHTLY.VM+linux-amd64_server_mixed_vm.gc.testlist/results/ResultDir/soft004:/export/local/common/testbase/6/vm/vm/bin/classes:/export/local/common/jdk/baseline/linux-amd64/lib/tools.jar
PATH=/export/local/common/jdk/baseline/linux-amd64/bin:/bin:/usr/bin
LD_LIBRARY_PATH=/export/local/common/jdk/baseline/linux-amd64/jre/lib/amd64/server:/export/local/common/jdk/baseline/linux-amd64/jre/lib/amd64:/export/local/common/jdk/baseline/linux-amd64/jre/../lib/amd64:/export/local/common/jdk/baseline/linux-amd64/jre/lib/amd64:/export/local/common/jdk/baseline/linux-amd64/jre/lib/amd64/server:/export/local/common/testbase/6/vm/vm/bin/lib/linux-amd64/nsk/share/gc/lock/jni:/export/local/common/testbase/6/vm/vm/bin/lib/linux-amd64/nsk/share/gc/lock/malloc:/export/local/common/testbase/6/vm/vm/bin/lib/linux-amd64/nsk/share/gc/lock/jvmti:/export/local/common/testbase/6/vm/vm/bin/lib/linux-amd64/nsk/share/gc/lock/jniref
SHELL=/bin/bash
DISPLAY=gtee.sfbay:1

Signal Handlers:
SIGSEGV: [libjvm.so+0x9c5e30], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGBUS: [libjvm.so+0x9c5e30], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGFPE: [libjvm.so+0x803e70], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGPIPE: [libjvm.so+0x803e70], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGXFSZ: [libjvm.so+0x803e70], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGILL: [libjvm.so+0x803e70], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGUSR2: [libjvm.so+0x808560], sa_mask[0]=0x00000004, sa_flags=0x10000004
SIGHUP: [libjvm.so+0x809f80], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGINT: [libjvm.so+0x809f80], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGTERM: [libjvm.so+0x809f80], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGQUIT: [libjvm.so+0x809f80], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004


---------------  S Y S T E M  ---------------

OS:5.0

uname:Linux 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:58:03 UTC 2009 x86_64
libc:glibc 2.9 NPTL 2.9 
rlimit: STACK 10000k, CORE infinity, NPROC infinity, NOFILE 1024, AS infinity
load average:1.56 1.55 2.61

CPU:total 4 (4 cores per cpu, 1 threads per core) family 6 model 23 stepping 10, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1

Memory: 4k page, physical 16257928k(5052288k free), swap 39535924k(39535924k free)

vm_info: OpenJDK 64-Bit Server VM (16.0-b05-2009-07-07-220857.ap31282.hotspot-g1-push-fastdebug) for linux-amd64 JRE (1.7.0), built on Jul  7 2009 15:19:01 by "jprtadm" with gcc 4.3.0 20080428 (Red Hat 4.3.0-8)

time: Sat Jul 11 03:15:06 2009
elapsed time: 68 seconds

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/eb058abd0562
25-09-2009

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/eb058abd0562
16-09-2009

SUGGESTED FIX --- old/src/share/vm/gc_implementation/g1/heapRegionSeq.cpp Mon Sep 14 15:12:09 2009 +++ new/src/share/vm/gc_implementation/g1/heapRegionSeq.cpp Mon Sep 14 15:12:09 2009 @@ -302,9 +302,9 @@ if (cur->isHumongous()) { return MemRegion(last_start, end); } - cur->reset_zero_fill(); assert(cur == _regions.top(), "Should be top"); if (!cur->is_empty()) break; + cur->reset_zero_fill(); shrink_bytes -= cur->capacity(); num_regions_deleted++; _regions.pop();
14-09-2009

WORK AROUND The failure can be avoided by fixing the heap size: -Xmx<n> -Xms<n> so as to avoid any attempts to shrink the heap.
14-09-2009

EVALUATION See comments section.
14-09-2009

SUGGESTED FIX See Comments section for some ruminations.
16-07-2009