JDK-8368940 : Missing ResourceMark when stalling for shutdown
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 26
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2025-09-30
  • Updated: 2025-12-12
  • Resolved: 2025-10-16
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 26
26 b20Fixed
Related Reports
Causes :  
Description
Test: java/foreign/TestUpcallStress.java

The test log snippet:

 # A fatal error has been detected by the Java Runtime Environment:
 #
 #  Internal Error (src/hotspot/share/memory/resourceArea.cpp:54), pid=2357994, tid=2906501
 #  fatal error: memory leak: allocating without ResourceMark
 #
 [4794.416s][warning][gc,alloc] pool-198-thread-15: Stall for VM-Shutdown timed out; allocation may fail with OOME
 # JRE version: OpenJDK Runtime Environment HJDK-0 (26.0) (fastdebug build 26+-9d9c0e06)
 # Java VM: OpenJDK 64-Bit Server VM HJDK-0 (fastdebug 26+-9d9c0e06, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
 # Problematic frame:
 # V  [libjvm.so+0x16b6bf0][4794.418s][warning][gc,alloc] pool-456-thread-9: Stall for VM-Shutdown timed out; allocation may fail with OOME
 [4794.418s][warning][gc,alloc] pool-638-thread-15: Stall for VM-Shutdown timed out; allocation may fail with OOME
Comments
Changeset: 0168687f Branch: master Author: Thomas Schatzl <tschatzl@openjdk.org> Date: 2025-10-16 05:32:00 +0000 URL: https://git.openjdk.org/jdk/commit/0168687fc372e6649f8e9a5a96a3614e7bab8543
16-10-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/27814 Date: 2025-10-15 06:10:11 +0000
15-10-2025

Moved to GC team and reset
14-10-2025

[~syan] this was NOT a duplicate of JDK-8367967! The problem you reported was the problem in that JBS issue. This issue is about the missing ResourceMark which is a real problem and needs to be fixed.
14-10-2025

> # fatal error: Not monotonic [~syan] that is likely JDK-8367967
01-10-2025

Another phenomenon: # Internal Error (src/hotspot/share/opto/phaseX.cpp:2763), pid=3293435, tid=3294261 # fatal error: Not monotonic # # JRE version: OpenJDK Runtime Environment HJDK-0 (26.0) (fastdebug build 26+-9d9c0e06) # Java VM: OpenJDK 64-Bit Server VM HJDK-0 (fastdebug 26+-9d9c0e06, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64) # Problematic frame: # V [libjvm.so+0x15f6ba8] PhaseCCP::verify_type(Node*, Type const*, Type const*)+0x1a4
01-10-2025

V [libjvm.so+0xf1fd34] JavaThread::get_thread_name_string(char*, int) const+0x2a4 (javaThread.cpp:1657) V [libjvm.so+0x9b6b4c] CollectedHeap::stall_for_vm_shutdown()+0x8c (collectedHeap.cpp:626) The new stall_for_vm_shutdown needs the RM. + JavaThread::current()->sleep(2 * MILLIUNITS); + log_warning(gc, alloc)("%s: Stall for VM-Shutdown timed out; allocation may fail with OOME", Thread::current()->name()); +}
01-10-2025