JDK-8131330 : G1CollectedHeap::verify_dirty_young_list fails with assert
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-07-15
  • Updated: 2017-07-26
  • Resolved: 2015-08-31
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 9
9 b83Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/opt/jprt/T/P1/190031.vkozlov/s/hotspot/src/share/vm/gc/shared/cardTableModRefBS.cpp:609), pid=22589, tid=0x0000000000000066
#  guarantee(!failures) failed: there should not have been any failures
#
# JRE version: Java(TM) SE Runtime Environment (9.0) (build 1.9.0-internal-fastdebug-20150710190031.vkozlov.8129920-b00)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (1.9.0-internal-fastdebug-20150710190031.vkozlov.8129920-b00 compiled mode solaris-sparc compressed oops)
# Core dump will be written. Default location: /scratch/local/aurora/sandbox/results/workDir/java/util/stream/test/org/openjdk/tests/java/util/stream/FlatMapOpTest/core or core.22589
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#

---------------  T H R E A D  ---------------

Current thread (0x0000000100b23800):  VMThread [stack: 0xffffffff2a600000,0xffffffff2a700000] [id=102]

Stack: [0xffffffff2a600000,0xffffffff2a700000],  sp=0xffffffff2a6fe350,  free space=1016k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x1666668]  void VMError::report_and_die()+0x6f8;;  __1cHVMErrorOreport_and_die6M_v_+0x6f8
V  [libjvm.so+0xaee530]  void report_vm_error(const char*,int,const char*,const char*)+0x70;;  __1cPreport_vm_error6Fpkci11_v_+0x70
V  [libjvm.so+0x8b5e18]  void CardTableModRefBS::verify_region(MemRegion,signed char,bool)+0x5a8;;  __1cRCardTableModRefBSNverify_region6MnJMemRegion_Wb_v_+0x5a8
V  [libjvm.so+0xc74060]  void G1SATBCardTableModRefBS::verify_g1_young_region(MemRegion)+0x28;;  __1cXG1SATBCardTableModRefBSWverify_g1_young_region6MnJMemRegion__v_+0x28
V  [libjvm.so+0xbe46ec]  void G1CollectedHeap::verify_dirty_region(HeapRegion*)+0x114;;  __1cPG1CollectedHeapTverify_dirty_region6MpnKHeapRegion__v_+0x114
V  [libjvm.so+0xbe479c]  void G1CollectedHeap::verify_dirty_young_list(HeapRegion*)+0x6c;;  __1cPG1CollectedHeapXverify_dirty_young_list6MpnKHeapRegion__v_+0x6c
V  [libjvm.so+0xbdf84c]  bool G1CollectedHeap::do_collection_pause_at_safepoint(double)+0x204;;  __1cPG1CollectedHeapbGdo_collection_pause_at_safepoint6Md_b_+0x204
V  [libjvm.so+0x169c97c]  void VM_G1IncCollectionPause::doit()+0x1d4;;  __1cXVM_G1IncCollectionPauseEdoit6M_v_+0x1d4
V  [libjvm.so+0x1698acc]  void VM_Operation::evaluate()+0xf4;;  __1cMVM_OperationIevaluate6M_v_+0xf4
V  [libjvm.so+0x16949f0]  void VMThread::evaluate_operation(VM_Operation*)+0x248;;  __1cIVMThreadSevaluate_operation6MpnMVM_Operation__v_+0x248
V  [libjvm.so+0x1695434]  void VMThread::loop()+0x5e4;;  __1cIVMThreadEloop6M_v_+0x5e4
V  [libjvm.so+0x16944d0]  void VMThread::run()+0xe8;;  __1cIVMThreadDrun6M_v_+0xe8
V  [libjvm.so+0x1301414]  java_start+0x41c;;  java_start+0x41c

VM_Operation (0xffffffff271f8eb8): G1IncCollectionPause, mode: safepoint, requested by thread 0x0000000101946800

Comments
Bugs found by nightly testing. Verified by passed nightly.
26-07-2017

Verified that compiling the following file with Sun Studio 12.3 with Hotspot "release" options generates code that calls memset on both sides of the UseMemset conditional. That is, the explicit for-loop gets translated into a call to memset. ------------------------------------------------------------------------------ #include "precompiled.hpp" #include <stddef.h> #include <string.h> extern bool UseMemset; bool UseMemset = false; void concurrent_memset(void* p, size_t size) { if (UseMemset) { memset(p, 32, size); } else { char* first = static_cast<char*>(p); char* last = first + size; for (char* cp = first; cp < last; ++cp) { *cp = 32; } } } ------------------------------------------------------------------------------ Not that it matters, but the transform of the loop into a call to memset didn't happen when the value being stored was an argument to concurrent_memset, rather than a literal.
31-07-2015

Thanks Kim for looking at this.
21-07-2015