United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6998802 ScavengeALot: assert(!gch->incremental_collection_failed()) failed: Twice in a row
JDK-6998802 : ScavengeALot: assert(!gch->incremental_collection_failed()) failed: Twice in a row

Details
Type:
Bug
Submit Date:
2010-11-09
Status:
Closed
Updated Date:
2011-03-07
Project Name:
JDK
Resolved Date:
2011-03-07
Component:
hotspot
OS:
generic
Sub-Component:
gc
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
hs20
Fixed Versions:
hs20 (b04)

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

Sub Tasks

Description
;; Using jvm: "/export/local/common/jdk/baseline/solaris-i586/jre/lib/i386/client/libjvm.so"
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/tmp/jprt/P1/B/180208.jcoomes/source/src/share/vm/memory/defNewGeneration.cpp:841), pid=3507, tid=6
#  assert(!gch->incremental_collection_failed()) failed: Twice in a row
#
# JRE version: 7.0
# Java VM: OpenJDK Client VM (20.0-b02-201011011802.jcoomes.gc-push-fastdebug mixed mode solaris-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 (0x081d7400):  VMThread [stack: 0xb1b7f000,0xb1bff000] [id=6]

Stack: [0xb1b7f000,0xb1bff000],  sp=0xb1bfe4a0,  free space=509k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x15c7452];;  void VMError::report(outputStream*)+0x6f6
V  [libjvm.so+0x15c85a1];;  void VMError::report_and_die()+0x555
V  [libjvm.so+0x7a0e1c];;  void report_vm_error(const char*,int,const char*,const char*)+0x534
V  [libjvm.so+0x7d191a];;  void DefNewGeneration::gc_epilogue(bool)+0x136
V  [libjvm.so+0x8f8149];;  void GenCollectedHeap::gc_epilogue(bool)+0x45
V  [libjvm.so+0x8f47eb];;  void GenCollectedHeap::do_collection(bool,bool,unsigned,bool,int)+0xe1f
V  [libjvm.so+0x8f6a09];;  void GenCollectedHeap::do_full_collection(bool,int)+0xb9
V  [libjvm.so+0x15ca2cb];;  void VM_GenCollectFull::doit()+0xcb
V  [libjvm.so+0x16068e6];;  void VM_Operation::evaluate()+0xe2
V  [libjvm.so+0x1604a40];;  void VMThread::loop()+0x824
V  [libjvm.so+0x1603bd1];;  void VMThread::run()+0xc1
V  [libjvm.so+0x126019d];;  java_start+0x711
C  [libc.so.1+0xa59a9];;  _thr_setup+0x4e
C  [libc.so.1+0xa5c90];;  _lwp_start+0x0

VM_Operation (0xb0d09c40): GenCollectFull, mode: safepoint, requested by thread 0x0828b400


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

Java Threads: ( => current thread )
  0x0828b400 JavaThread "MainThread" [_thread_blocked, id=16, stack(0xb0cbb000,0xb0d0b000)]
  0x0822f000 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=14, stack(0xb0d8d000,0xb0ddd000)]
  0x0822b400 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=13, stack(0xb0dde000,0xb0e5e000)]
  0x08229400 JavaThread "Attach Listener" daemon [_thread_blocked, id=11, stack(0xb0f5e000,0xb0fae000)]
  0x08227800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=10, stack(0xb0faf000,0xb0fff000)]
  0x08225c00 JavaThread "Surrogate Locker Thread (Concurrent GC)" daemon [_thread_blocked, id=9, stack(0xb1a8c000,0xb1adc000)]
  0x081de400 JavaThread "Finalizer" daemon [_thread_blocked, id=8, stack(0xb1add000,0xb1b2d000)]
  0x081d9400 JavaThread "Reference Handler" daemon [_thread_blocked, id=7, stack(0xb1b2e000,0xb1b7e000)]
  0x0807d000 JavaThread "main" [_thread_blocked, id=2, stack(0xbdfef000,0xbe03f000)]

Other Threads:
=>0x081d7400 VMThread [stack: 0xb1b7f000,0xb1bff000] [id=6]
  0x08232800 WatcherThread [stack: 0xb0d0c000,0xb0d8c000] [id=15]

VM state:at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread:  ([mutex/lock_event])
[0x0807bbc8] Threads_lock - owner thread: 0x081d7400
[0x0807c300] Heap_lock - owner thread: 0x0828b400

Heap
 par new generation   total 14784K, used 8082K [0xb1c00000, 0xb2c00000, 0xb2c00000)
  eden space 13184K,  61% used [0xb1c00000, 0xb23e4810, 0xb28e0000)
  from space 1600K,   0% used [0xb28e0000, 0xb28e0000, 0xb2a70000)
  to   space 1600K,   0% used [0xb2a70000, 0xb2a70000, 0xb2c00000)
 concurrent mark-sweep generation total 80416K, used 78265K [0xb2c00000, 0xb7a88000, 0xb7c00000)
 concurrent-mark-sweep perm gen total 12288K, used 2264K [0xb7c00000, 0xb8800000, 0xbbc00000)

Dynamic libraries:
0x08050000 	/export/local/common/jdk/baseline/solaris-i586/bin/java
0xbffb0000 	/lib/libthread.so.1
0xbff70000 	/export/local/common/jdk/baseline/solaris-i586/bin/../jre/lib/i386/jli/libjli.so
0xbff50000 	/lib/libdl.so.1
0xbfe20000 	/lib/libc.so.1
0xbe200000 	/export/local/common/jdk/baseline/solaris-i586/jre/lib/i386/client/libjvm.so
0xbfdf0000 	/lib/libsocket.so.1
0xbffa0000 	/usr/lib/libsched.so.1
0xbfdd0000 	/lib/libm.so.1
0xbfdb0000 	/usr/lib/libCrun.so.1
0xbfd90000 	/lib/libdoor.so.1
0xbe160000 	/lib/libnsl.so.1
0xbe100000 	/lib/libm.so.2
0xbfd60000 	/lib/libscf.so.1
0xbfd40000 	/lib/libuutil.so.1
0xbe0e0000 	/lib/libgen.so.1
0xbe0c0000 	/lib/libmd.so.1
0xbe0a0000 	/lib/libmp.so.2
0xbdfb0000 	/export/local/common/jdk/baseline/solaris-i586/jre/lib/i386/libverify.so
0xbdf70000 	/export/local/common/jdk/baseline/solaris-i586/jre/lib/i386/libjava.so
0xbdf50000 	/export/local/common/jdk/baseline/solaris-i586/jre/lib/i386/native_threads/libhpi.so
0xbdf00000 	/export/local/common/jdk/baseline/solaris-i586/jre/lib/i386/libzip.so

VM Arguments:
jvm_args: -Xmixed -XX:-PrintVMOptions -XX:+StartAttachListener -XX:DefaultMaxRAMFraction=8 -XX:+UnlockExperimentalVMOptions -XX:+EnableInvokeDynamic -XX:+UseConcMarkSweepGC -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -Dtest.vm.opts= -Dcompile.jdk=/export/local/common/jdk/baseline/solaris-i586 -Dtest.src=/export/local/common/testbase/jtreg/7-nightly/JT_HS/test/compiler/6826736 -Dtest.tool.vm.opts= -Dtest.classes=/export/local/39635.JDK7.NIGHTLY.VM+solaris-i586_javase_client_mixed_JT_HS/results/workDir/classes/compiler/6826736 -Dtest.jdk=/export/local/common/jdk/baseline/solaris-i586 -Dtest.java.opts=-Xmixed -client -XX:-PrintVMOptions -XX:+StartAttachListener -XX:DefaultMaxRAMFraction=8 -XX:+UnlockExperimentalVMOptions -XX:+EnableInvokeDynamic -XX:+UseConcMarkSweepGC -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCompressedOops -Dtest.compiler.opts= -XX:+IgnoreUnrecognizedVMOptions -Xbatch -XX:+ScavengeALot -XX:+UseCompressedOops -XX:HeapBaseMinAddress=32g -XX:CompileThreshold=100 -XX:CompileOnly=Test.test -XX:-BlockLayoutRotateLoops -XX:LoopUnrollLimit=0 
java_command: com.sun.javatest.regtest.MainWrapper /export/local/39635.JDK7.NIGHTLY.VM+solaris-i586_javase_client_mixed_JT_HS/results/workDir/classes/compiler/6826736/Test.jta
Launcher Type: SUN_STANDARD

Environment Variables:
CLASSPATH=/export/local/common/jtreg/lib/javatest.jar:/export/local/common/jtreg/lib/jtreg.jar:/export/local/39635.JDK7.NIGHTLY.VM+solaris-i586_javase_client_mixed_JT_HS/results/workDir/classes/compiler/6826736:/export/local/common/testbase/jtreg/7-nightly/JT_HS/test/compiler/6826736:/export/local/common/jdk/baseline/solaris-i586/lib/tools.jar
PATH=/bin:/usr/bin
DISPLAY=vm-v240-01.sfbay.sun.com:1

Signal Handlers:
SIGSEGV: [libjvm.so+0x15c9740], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
SIGBUS: [libjvm.so+0x15c9740], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
SIGFPE: [libjvm.so+0x126ff6c], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
SIGPIPE: [libjvm.so+0x126ff6c], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
SIGXFSZ: [libjvm.so+0x126ff6c], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
SIGILL: [libjvm.so+0x126ff6c], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGUSR2: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGQUIT: [libjvm.so+0x1266558], sa_mask[0]=0xffbffeff, sa_flags=0x00000004
SIGHUP: [libjvm.so+0x1266558], sa_mask[0]=0xffbffeff, sa_flags=0x00000004
SIGINT: [libjvm.so+0x1266558], sa_mask[0]=0xffbffeff, sa_flags=0x00000004
SIGTERM: [libjvm.so+0x1266558], sa_mask[0]=0xffbffeff, sa_flags=0x00000004
SIG39: [libjvm.so+0x126ffa4], sa_mask[0]=0x00000000, sa_flags=0x00000008
SIG40: [libjvm.so+0x126ff6c], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c


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

OS:                       Solaris 10 10/08 s10x_u6wos_07b X86
           Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                            Assembled 27 October 2008

uname:SunOS 5.10 Generic_137138-09 i86pc  (T2 libthread)
rlimit: STACK 10000k, CORE infinity, NOFILE 65536, AS infinity
load average:1.43 1.18 1.17

CPU:total 2 (1 cores per cpu, 1 threads per core) family 15 model 5 stepping 8, cmov, cx8, fxsr, mmx, sse, sse2, mmxext, 3dnow, 3dnowext

Memory: 4k page, physical 4127784k(2857892k free)

vm_info: OpenJDK Client VM (20.0-b02-201011011802.jcoomes.gc-push-fastdebug) for solaris-x86 JRE (1.7.0), built on Nov  1 2010 21:03:20 by "jprtadm" with Sun Studio 12u1

time: Tue Nov  9 02:59:10 2010
elapsed time: 8 seconds

Test name: compiler/6826736

                                    

Comments
EVALUATION

Appears to be an artifact of -XX:+ScavengeALot. Synopsis changed accordingly and CR downgraded to a P5 until proven otherwise. Assert needs to be sharpened to deal with this edge condition or dropped.
*** (#1 of 1): [ UNSAVED ] ###@###.###
                                     
2010-11-11
WORK AROUND

Don't use -XX:+ScavengeALot.

Also, CR should not affect product bits.
                                     
2010-11-11
SUGGESTED FIX

The following works, but may be coarser than might be possible with more
effort. However, more effort in sharpening this assert has, I think, reached
a point of diminishing returns:-

diff -r 4df7f8cba524 src/share/vm/memory/defNewGeneration.cpp
--- a/src/share/vm/memory/defNewGeneration.cpp  Tue Nov 09 10:47:20 2010 -0800
+++ b/src/share/vm/memory/defNewGeneration.cpp  Wed Nov 10 16:28:47 2010 -0800
@@ -838,7 +838,8 @@ void DefNewGeneration::gc_epilogue(bool 
         gch->incremental_collection_failed()) {
       seen_incremental_collection_failed = true;
     } else if (seen_incremental_collection_failed) {
-      assert(!gch->incremental_collection_failed(), "Twice in a row");
+      assert(gch->gc_cause() == GCCause::_scavenge_alot || !gch->incremental_collection_failed(),
+             "Twice in a row");
       seen_incremental_collection_failed = false;
     }
 #endif // ASSERT
                                     
2010-11-11
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/8d81b4a1d3e1
                                     
2010-11-12
EVALUATION

http://hg.openjdk.java.net/jdk7/build/hotspot/rev/8d81b4a1d3e1
                                     
2010-12-25



Hardware and Software, Engineered to Work Together