JDK-8286681 : ShenandoahControlThread::request_gc misses the case of GCCause::_codecache_GC_threshold
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 19
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-05-13
  • Updated: 2022-05-14
  • Resolved: 2022-05-14
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 19
19 masterFixed
Related Reports
Relates :  
Description
This bug was exposed after JDK-8282191.

Reproduce:
 run java/foreign/TestIntrinsics.java fails with -XX:+UseShenandoahGC

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/jvm/jdk/src/hotspot/share/gc/shenandoah/shenandoahControlThread.cpp:485), pid=42328, tid=42345
#  assert(GCCause::is_user_requested_gc(cause) || GCCause::is_serviceability_requested_gc(cause) || cause == GCCause::_metadata_GC_clear_soft_refs || cause == GCCause::_full_gc_alot || cause == GCCause::_wb_full_gc || cause == GCCause::_wb_breakpoint || cause == GCCause::_scavenge_alot) failed: only requested GCs here
#
# JRE version: OpenJDK Runtime Environment (19.0) (fastdebug build 19-internal-adhoc.jvm.jdk513)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 19-internal-adhoc.jvm.jdk513, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, shenandoah gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x16f3724]  ShenandoahControlThread::request_gc(GCCause::Cause)+0x224
#



Current thread (0x00007f852427d060):  JavaThread "Sweeper thread" daemon [_thread_in_vm, id=101859, stack(0x00007f84fe6ff000,0x00007f84fe800000)]

Stack: [0x00007f84fe6ff000,0x00007f84fe800000],  sp=0x00007f84fe7fec20,  free space=1023k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x126f367]  ShenandoahControlThread::request_gc(GCCause::Cause)+0x69
V  [libjvm.so+0x1283911]  ShenandoahHeap::collect(GCCause::Cause)+0x2b
V  [libjvm.so+0x13a0709]  NMethodSweeper::do_stack_scanning()+0x79
V  [libjvm.so+0x13a0b5f]  NMethodSweeper::sweep()+0x109
V  [libjvm.so+0x13a082a]  NMethodSweeper::sweeper_loop()+0xb0
V  [libjvm.so+0x8dcf5b]  CodeCacheSweeperThread::thread_entry(JavaThread*, JavaThread*)+0x15
V  [libjvm.so+0x13fd2e5]  JavaThread::thread_main_inner()+0x18b
V  [libjvm.so+0x13fd14e]  JavaThread::run()+0x234
V  [libjvm.so+0x13fa6d8]  Thread::call_run()+0x180
V  [libjvm.so+0x1132af5]  thread_native_entry(Thread*)+0x18f
Comments
Changeset: 9eb15c9b Author: Jie Fu <jiefu@openjdk.org> Date: 2022-05-14 10:13:49 +0000 URL: https://git.openjdk.java.net/jdk/commit/9eb15c9b100b87e332c572bbc24a818e1cceb180
14-05-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/8691 Date: 2022-05-13 02:43:55 +0000
13-05-2022