Request for review: 8044406: JVM crash with JDK8 (build 1.8.0-b132) with G1 GC

Poonam Bajaj poonam.bajaj at oracle.com
Sun Aug 17 00:54:46 UTC 2014


Hi,

Could I have reviews for the fix for a G1 GC crash:

8044406 <https://bugs.openjdk.java.net/browse/JDK-8044406>: JVM crash 
with JDK8 (build 1.8.0-b132) with G1 GC
Webrev: http://cr.openjdk.java.net/~poonam/8044406/webrev.00/webrev/

The crash happens with the following stack trace:
Stack: [0x00007fd435a1f000,0x00007fd435b20000],  sp=0x00007fd435b1bc30,  
free space=1011k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, 
C=native code)
V  [libjvm.so+0x541261]  
G1BlockOffsetArray::forward_to_block_containing_addr_slow(HeapWord*, 
HeapWord*, void const*)+0xf1
V  [libjvm.so+0x959e54]  DirtyCardToOopClosure::do_MemRegion(MemRegion)+0x64
V  [libjvm.so+0x56d2a4]  ScanRSClosure::doHeapRegion(HeapRegion*)+0x374
V  [libjvm.so+0x542dd0]  
G1CollectedHeap::collection_set_iterate_from(HeapRegion*, 
HeapRegionClosure*)+0x60
V  [libjvm.so+0x56c08c]  G1RemSet::scanRS(OopsInHeapRegionClosure*, 
CodeBlobToOopClosure*, int)+0xdc
V  [libjvm.so+0x56c4d5]  
G1RemSet::oops_into_collection_set_do(OopsInHeapRegionClosure*, 
CodeBlobToOopClosure*, int)+0x145
V  [libjvm.so+0x549ef4]  G1CollectedHeap::g1_process_strong_roots(bool, 
SharedHeap::ScanningOption, OopClosure*, OopsInHeapRegionClosure*, 
G1KlassScanClosure*, int)+0x224
V  [libjvm.so+0x558a88]  G1ParTask::work(unsigned int)+0xb88
V  [libjvm.so+0xa4a9ff]  GangWorker::loop()+0xcf
V  [libjvm.so+0x8a0058]  java_start(Thread*)+0x108

Here, the GC thread crashes while scanning the RemSet (part of the 
non-CSet regions). And it happens to scan a region to which another 
thread in G1ParEvacuateFollowersClosure is copying contents to, and this 
region was found out to be an Old GC alloc region.

This change makes sure that we fill up the last card of the Old GC alloc 
region that was being allocated into, with a dummy object so that it 
does not get scanned by the remset scanning GC threads.

This change applies cleanly to 8u and 7u repos.

Thanks to Thomas Schatzl for his help in investigating the crash and 
suggesting this solution.

Testing:
- JPRT
- Testing by Coherence QA

Thanks,
Poonam

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20140817/bfd57ab5/attachment.htm>


More information about the hotspot-gc-dev mailing list