JDK-8257641 : Shenandoah: Query is_at_shenandoah_safepoint() from control thread should return false
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 8-shenandoah,11.0.9,15,16
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-12-03
  • Updated: 2021-04-15
  • Resolved: 2020-12-03
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 11 JDK 15 JDK 16
11.0.10Fixed 15.0.2Fixed 16 b28Fixed
Related Reports
Relates :  
Description
Shenandoah GC specific safepoints are scheduled by control thread, therefore, query from control thread should return false.

I saw an assertion failure on x86_32, due to the wrong answer.

#  Internal Error (/home/zgu/ws/jdk/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp:2036), pid=1410312, tid=1410328
#  assert(nworkers == ParallelGCThreads) failed: Use ParallelGCThreads within safepoints

Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x14c3977]  ShenandoahHeap::assert_gc_workers(unsigned int)+0x157
V  [libjvm.so+0x1497a9e]  ShenandoahConcurrentGC::entry_evacuate()+0x8e
V  [libjvm.so+0x149a4de]  ShenandoahConcurrentGC::collect(GCCause::Cause)+0x28e
V  [libjvm.so+0x14ac296]  ShenandoahControlThread::service_concurrent_normal_cycle(GCCause::Cause)+0x96
V  [libjvm.so+0x14acddd]  ShenandoahControlThread::run_service()+0x74d
V  [libjvm.so+0x9455c6]  ConcurrentGCThread::run()+0x26
V  [libjvm.so+0x16c602a]  Thread::call_run()+0xfa
V  [libjvm.so+0x12cd3d7]  thread_native_entry(Thread*)+0x137
C  [libpthread.so.0+0x867e]  start_thread+0xee


Comments
Fix Request (15u) Same reason as for 15u, the related (breaking) backport went into 15.0.2 already.
04-12-2020

Fix Request (critical) (11u) This issue obscures testing for Jan CPU release, a regression from backport in 11.0.10. The fix is small, self-contained, affects fastdebug builds only. Patch applies cleanly to 11u, passes hotspot_gc_shenandoah and tier{1,2} with Shenandoah.
04-12-2020

Changeset: e29ee5b8 Author: Zhengyu Gu <zgu@openjdk.org> Date: 2020-12-03 18:42:42 +0000 URL: https://git.openjdk.java.net/jdk/commit/e29ee5b8
03-12-2020