JDK-8232802 : Shenandoah: transition between "cset" and "pinned_cset" does not require cancelled gc
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 8-shenandoah,11-shenandoah,14
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-10-22
  • Updated: 2020-01-22
  • Resolved: 2019-10-22
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 14
14 b20Fixed
Related Reports
Blocks :  
Description
Testing caught a failure in current jdk/jdk, in a rare corner case:

# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/jenkins/workspace/nightly/jdk-jdk/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp:203), pid=36780, tid=36787
#  guarantee(_heap->cancelled_gc()) failed: only valid when evac has been cancelled

---------------  S U M M A R Y ------------

Command Line: -Xmx1g -Xms1g -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:+UnlockDiagnosticVMOptions -XX:ShenandoahGCHeuristics=aggressive -XX:+ShenandoahVerifyOptoBarriers -XX:+ShenandoahOOMDuringEvacALot -XX:CompileCommandFile=/tmp/jmh6571298855984735825compilecommand org.openjdk.jmh.runner.ForkedMain 127.0.0.1 34213

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

Current thread (0x00007f7de8294800):  VMThread "VM Thread" [stack: 0x00007f7dd0132000,0x00007f7dd0232000] [id=36787]

Stack: [0x00007f7dd0132000,0x00007f7dd0232000],  sp=0x00007f7dd0230450,  free space=1017k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x1637b73]  ShenandoahHeapRegion::make_pinned()+0x83
V  [libjvm.so+0x1616c48]  ShenandoahHeap::sync_pinned_region_status()+0x98
V  [libjvm.so+0x161e466]  ShenandoahHeap::op_degenerated(ShenandoahHeap::ShenandoahDegenPoint)+0xc6
V  [libjvm.so+0x161e94c]  ShenandoahHeap::entry_degenerated(int)+0x10c
V  [libjvm.so+0x16a5d37]  VM_ShenandoahDegeneratedGC::doit()+0x37
V  [libjvm.so+0x18a64ed]  VM_Operation::evaluate()+0x13d
V  [libjvm.so+0x18d611a]  VMThread::evaluate_operation(VM_Operation*)+0x15a
V  [libjvm.so+0x18d68b5]  VMThread::loop()+0x2b5
V  [libjvm.so+0x18d6f73]  VMThread::run()+0xc3
V  [libjvm.so+0x17f268b]  Thread::call_run()+0xfb
V  [libjvm.so+0x140b609]  thread_native_entry(Thread*)+0x119

This says that transition from cset to pinned-cset is invalid when GC was not cancelled. However, this was only true before JDK-8232575 work. Now, this transition is done in sync_pinned_region_status that is supposed to work on all paths. In this case, Degenerated GC dropped the cancelled GC flag already, and thus blows up the check.

The check is excessive and should be removed.
Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/62e16c1e0f66 User: shade Date: 2019-10-22 16:53:56 +0000
22-10-2019