JDK-6977804 : G1: remove the zero-filling thread
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs19,hs20
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2010-08-17
  • 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
6u25Fixed 7Fixed hs20Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
G1 uses a "zero-filling" thread to zero heap regions in the background before they are needed. This was important for the original non-generational G1. However it's not really used for the current generational G1. We only need zero-filled regions for allocations directly into the old generation which should only happen when the young gen is locked by the GC locker (but also see 6974966: G1: unnecessary direct-to-old allocations).

So, we are going to remove the zero filling thread and consolidate the two region free lists we currently have (the "free" list which is the zero-filled free list, and the "unclean" list which is the non-zero-filled free list) into one. We'll have to carefully zero the space we'll allocate to make sure that the concurrent refinement still works as it does today.
gc.gctests.LargeObjects.large001.large001
gc/gctests/LargeObjects/large003
gc/gctests/LargeObjects/large001

See for example:-

http://sqeweb.sfbay/nfs/tools/gtee/results/JDK7/NIGHTLY/VM/2010-12-06/G1_GC_Baseline-tiered/vm/windows-i586/server/mixed/windows-i586_vm_server_mixed_vm.gc.testlist/ResultDir/large003/hs_err_pid13308.log


#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (C:\temp\jprt\P1\B\182643.ap31282\source\src\share\vm\gc_implementation\g1\heapRegion.cpp:575), pid=13308, tid=8016
#  assert(top() == bottom() || zfs == Allocated) failed: Region must be empty, or we must be setting it to allocated. _zfs=0, zfs=1, region:                11 PTAMS 0x10200000 NTAMS 0x10200000 space 1024K,  75% used [0x10200000, 0x102c0950, 0x10300000)

#
# JRE version: 7.0
# Java VM: OpenJDK Server VM (20.0-b03-201012021826.ap31282.hotspot-g1-push-fastdebug mixed mode windows-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 (0x01b26c00):  ConcurrentGCThread [stack: 0x019f0000,0x01a40000] [id=8016]

Stack: [0x019f0000,0x01a40000],  sp=0x01a3f968,  free space=318k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
Warning: This error log is *not* generated by the following JVM:
           C:/local/common/jdk/baseline/windows-i586/jre/bin/server/jvm.dll
         JVM symbol lookup may be incorrect.
         Please use --jvm=<path/to/jvm> to point to the correct JVM.

V  [jvm.dll+0x22392c];;  ?report_and_die@VMError@@QAEXXZ+0x4ec
V  [jvm.dll+0x21c4a5];;  ?report_vm_error@@YAXPBDH00@Z+0x45
V  [jvm.dll+0x32fd47];;  ?set_zero_fill_state_work@HeapRegion@@QAEXW4ZeroFillState@1@@Z+0xb7
V  [jvm.dll+0x31552d];;  ?run@ConcurrentZFThread@@UAEXXZ+0xfd
V  [jvm.dll+0x235854];;  ?java_start@@YGIPAVThread@@@Z+0xb4
C  [msvcr71.dll+0x9565]
C  [kernel32.dll+0x4d0e9]
C  [ntdll.dll+0x419bb]
C  [ntdll.dll+0x4198e]

...

=>0x01b26c00 (exited) ConcurrentGCThread [stack: 0x019f0000,0x01a40000] [id=8016]

VM state:at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread:  ([mutex/lock_event])
[0x01aa4a68] ZF_mon - owner thread: 0x01b26c00
[0x01aa64c0] Threads_lock - owner thread: 0x0bd69c00
[0x01aa6b50] Heap_lock - owner thread: 0x0c386c00

Heap
 garbage-first heap   total 1048576K, used 849406K [0x10100000, 0x50100000, 0x50100000)
  region size 1024K, 0 young (0K), 1 survivors (1024K)
 compacting perm gen  total 16384K, used 8402K [0x50100000, 0x51100000, 0x54100000)
   the space 16384K,  51% used [0x50100000, 0x50934838, 0x50934a00, 0x51100000)
No shared spaces configured.

Code Cache  [0x01b90000, 0x01dd0000, 0x07b90000)
 total_blobs=233 nmethods=99 adapters=63 free_code_cache=99503744

...

VM Arguments:
jvm_args: -Xmixed -XX:-PrintVMOptions -XX:+UseG1GC -XX:+TieredCompilation -XX:+StartAttachListener -XX:-UseGCOverheadLimit 
java_command: gc.gctests.LargeObjects.large001.large001 -largeClassesPath C:/local/common/testbase/7/vm/vm/bin/newclass -isOverLimitFields false -aggregationDepth 3 -t 1
Launcher Type: SUN_STANDARD

Environment Variables:
CLASSPATH=c:/local/40358.JDK7.NIGHTLY.VM+windows-i586_vm_server_mixed_vm.gc.testlist/results/ResultDir/large003;C:/local/common/testbase/7/vm/vm/bin/classes;C:/local/common/jdk/baseline/windows-i586/lib/tools.jar
PATH=c:\local\common\jdk\baseline\windows-i586\bin;c:\local\common\jdk\baseline\windows-i586\jre\bin\server;c:\Windows\system32;c:\Cygwin\bin;c:\Cygwin\usr\bin;c:\local\common\jdk\baseline\windows-i586\bin\server;c:\local\common\jdk\baseline\windows-i586\jre\bin;.;c:\local\common\testbase\7\vm\vm\bin\lib\windows-i586\nsk\share\gc\lock\jni;c:\local\common\testbase\7\vm\vm\bin\lib\windows-i586\nsk\share\gc\lock\malloc;c:\local\common\testbase\7\vm\vm\bin\lib\windows-i586\nsk\share\gc\lock\jvmti;c:\local\common\testbase\7\vm\vm\bin\lib\windows-i586\nsk\share\gc\lock\jniref
LD_LIBRARY_PATH=;C;C:\Cygwin\local\common\testbase\7\vm\vm\bin\lib\windows-i586\nsk\share\gc\lock\jni;C;C:\Cygwin\local\common\testbase\7\vm\vm\bin\lib\windows-i586\nsk\share\gc\lock\malloc;C;C:\Cygwin\local\common\testbase\7\vm\vm\bin\lib\windows-i586\nsk\share\gc\lock\jvmti;C;C:\Cygwin\local\common\testbase\7\vm\vm\bin\lib\windows-i586\nsk\share\gc\lock\jniref
SHELL=C:/Cygwin/bin/bash
DISPLAY=vm-v240-01.sfbay.sun.com:1



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

OS: Windows Server 2008 Build 6002 Service Pack 2

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

Memory: 4k page, physical 4190936k(2381108k free), swap 8620436k(6604068k free)

vm_info: OpenJDK Server VM (20.0-b03-201012021826.ap31282.hotspot-g1-push-fastdebug) for windows-x86 JRE (1.7.0), built on Dec  2 2010 12:20:05 by "jprtadm" with MS VC++ 7.1 (VS2003)

time: Tue Dec 07 06:44:13 2010
elapsed time: 6 seconds

# Host info: CYGWIN_NT-6.0 jsqa-vm425 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin
gc/gctests/LargeObjects/large004
gc/gctests/LargeObjects/large005
gc/lock/jniref/jniglobalreflock06
vm/gc/containers/HashMap_Arrays

http://sqeweb.sfbay.sun.com/nfs/results/vm/gtee/JDK7/NIGHTLY/VM/2011-01-03/G1_GC_Baseline/vm/linux-i586/server/mixed/linux-i586_vm_server_mixed_vm.gc.testlist/ResultDir/HashMap_Arrays/hs_err_pid11417.log

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/0fa27f37d4d4
21-01-2011

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/0fa27f37d4d4
20-01-2011