JDK-8345895 : TestPauseNotifications.java#generational intermittent assert Cannot use more than capacity
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 25
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows
  • CPU: x86_64
  • Submitted: 2024-12-10
  • Updated: 2025-04-01
  • Resolved: 2025-04-01
Related Reports
Duplicate :  
Relates :  
Description
The newly added test gc/shenandoah/mxbeans/TestPauseNotifications.java#generational intermittent trigger assert which observed from GHA https://github.com/sendaoYan/jdk-ysd/actions/runs/12253929063/job/34186348381, the test log snippet:

Received: Shenandoah Cycles/end of GC cycle
Warning: [0.987s][warning][gc,free] Forcing transfer of 502 to old reserve.
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (d:\a\jdk-ysd\jdk-ysd\src\hotspot\share\gc\shenandoah\shenandoahGeneration.cpp:1029), pid=1676, tid=5312
#  assert(ShenandoahHeap::heap()->is_full_gc_in_progress() || (_affiliated_region_count * ShenandoahHeapRegion::region_size_bytes() <= _max_capacity)) failed: Cannot use more than capacity
#
# JRE version: OpenJDK Runtime Environment (25.0) (fastdebug build 25-internal-sendaoYan-110539b0ac5abe0444e437f6e37f2e1c51b2be38)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 25-internal-sendaoYan-110539b0ac5abe0444e437f6e37f2e1c51b2be38, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, shenandoah gc, windows-amd64)
# Problematic frame:
# V  [jvm.dll+0xee646b]  ShenandoahGeneration::decrease_capacity+0x14b
#
# CreateCoredumpOnCrash turned off, no core file dumped
#
# An error report file with more information is saved as:
# D:\a\jdk-ysd\jdk-ysd\build\run-test-prebuilt\test-support\jtreg_test_hotspot_jtreg_tier1_gc\scratch_1\hs_err_pid1676.log
Warning: [1.136s][warning][os     ] Loading hsdis library failed
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
Comments
The fix for this assertion failure has been integrated.
01-04-2025

[~wkemper] The link type "duplicates" is only used when **closing** an issue as a duplicate. Since both issues are still open this is the wrong link type. Please change to "relates to" or close one of the issues.
31-01-2025

Similar issue on Linux aarch64, test gc/shenandoah/mxbeans/TestPauseNotifications.java#generational # Internal Error (/priv/jenkins/client-home/workspace/openjdk-jdk-linux_aarch64-dbg/jdk/src/hotspot/share/gc/shenandoah/shenandoahGeneration.cpp:1033), pid=32248, tid=32300 # assert(ShenandoahHeap::heap()->is_full_gc_in_progress() || (used_regions_size() <= _max_capacity)) failed: Cannot use more than capacity # # JRE version: OpenJDK Runtime Environment (25.0) (fastdebug build 25-internal-adhoc.jenkinsi.jdk) # Java VM: OpenJDK 64-Bit Server VM (fastdebug 25-internal-adhoc.jenkinsi.jdk, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, shenandoah gc, linux-aarch64) # Problematic frame: # V [libjvm.so+0x160dce8] ShenandoahGeneration::decrease_capacity(unsigned long)+0x3f8 # --------------- T H R E A D --------------- Current thread (0x0000ffff880f1910): WorkerThread "Shenandoah GC Threads#6" [id=32300, stack(0x0000ffff6e9ca000,0x0000ffff6ebc8000) (2040K)] Stack: [0x0000ffff6e9ca000,0x0000ffff6ebc8000], sp=0x0000ffff6ebc61f0, free space=2032k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x160dce8] ShenandoahGeneration::decrease_capacity(unsigned long)+0x3f8 (shenandoahGeneration.cpp:1033) V [libjvm.so+0x1611a88] ShenandoahGenerationSizer::force_transfer_to_old(unsigned long) const+0x78 (shenandoahGenerationSizer.cpp:190) V [libjvm.so+0x15ed46c] ShenandoahFreeSet::try_allocate_from_mutator(ShenandoahAllocRequest&, bool&)+0x2ec (shenandoahFreeSet.cpp:934) V [libjvm.so+0x1648fc8] ShenandoahHeap::allocate_memory_under_lock(ShenandoahAllocRequest&, bool&)+0x58 (shenandoahHeap.cpp:1057) V [libjvm.so+0x164f1e0] ShenandoahHeap::allocate_memory(ShenandoahAllocRequest&)+0x40 (shenandoahHeap.cpp:1005) V [libjvm.so+0x161f260] ShenandoahGenerationalHeap::allocate_new_plab(unsigned long, unsigned long, unsigned long*)+0x4c (shenandoahGenerationalHeap.cpp:537) V [libjvm.so+0x1620234] ShenandoahGenerationalHeap::allocate_from_plab_slow(Thread*, unsigned long, bool)+0x110 (shenandoahGenerationalHeap.cpp:489) V [libjvm.so+0x16290e8] ShenandoahGenerationalHeap::allocate_from_plab(Thread*, unsigned long, bool)+0x188 (shenandoahGenerationalHeap.cpp:430) V [libjvm.so+0x1620bc4] ShenandoahGenerationalHeap::try_evacuate_object(oop, Thread*, ShenandoahHeapRegion*, ShenandoahAffiliation)+0x4e0 (shenandoahGenerationalHeap.cpp:269) V [libjvm.so+0x1621810] ShenandoahGenerationalHeap::evacuate_object(oop, Thread*)+0x3c0 (shenandoahGenerationalHeap.cpp:226) V [libjvm.so+0x15d0dd0] ShenandoahEvacUpdateCleanupOopStorageRootsClosure::do_oop(oop*)+0x5f0 (shenandoahConcurrentGC.cpp:860) V [libjvm.so+0x15d24c8] void OopStorageSetWeakParState<true, false>::oops_do<ShenandoahEvacUpdateCleanupOopStorageRootsClosure>(ShenandoahEvacUpdateCleanupOopStorageRootsClosure*)+0x218 (oopStorage.inline.hpp:245) V [libjvm.so+0x15d2864] ShenandoahConcurrentWeakRootsEvacUpdateTask::work(unsigned int)+0x154 (shenandoahRootProcessor.inline.hpp:50) V [libjvm.so+0x19bfaac] WorkerThread::run()+0x98 (workerThread.cpp:70) V [libjvm.so+0x187cfb4] Thread::call_run()+0xb0 (thread.cpp:232) V [libjvm.so+0x13f4f58] thread_native_entry(Thread*)+0x138 (os_linux.cpp:860) C [libpthread.so.0+0x875c] start_thread+0x18c
09-01-2025