JDK-8351313 : VM crashes when AOTMode/AOTCache/AOTConfiguration are empty
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 25
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-03-05
  • Updated: 2025-05-13
  • Resolved: 2025-05-07
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 25
25 b22Fixed
Related Reports
Causes :  
Description
There are several cases when JVM doesn't behave properly in case AOT config or cache files are not properly specified:

1) JVM crashes in case AOT config file is not specified:

   #  Internal Error (/home/katya/work/JavaSE/Hotspot/ws/git/jdk.jdk.master/open/src/hotspot/share/cds/filemap.cpp:397), pid=30574, tid=30575
   #  assert(_archive_name != nullptr) failed: Archive name is null


   steps to reproduce:
   > TESTED_JDK/bin/java -XX:AOTMode=create -XX:AOTConfiguration= -XX:AOTCache=aot.cache -version

     

2) JVM crashes in case AOT cache file is not specified:
   
   #  Internal Error (/home/katya/work/JavaSE/Hotspot/ws/git/jdk.jdk.master/open/src/hotspot/share/cds/metaspaceShared.cpp:696), pid=30667, tid=30679
   #  assert(static_archive != nullptr) failed: SharedArchiveFile not set?

   steps to reproduce:
   > TESTED_JDK/bin/java -XX:AOTMode=record -XX:AOTConfiguration=aot.conf -version
   > TESTED_JDK/bin/java -XX:AOTMode=create -XX:AOTConfiguration=aot.conf -XX:AOTCache= -version


3) No error message is printed in case AOT config file is not specified:

  steps to reproduce:

   > TESTED_JDK/bin/java  -XX:AOTMode=record -XX:AOTConfiguration= -version
     Java(TM) SE Runtime Environment (fastdebug build 25-internal-LTS-2025-03-04-2232391.katya...)
     Java HotSpot(TM) 64-Bit Server VM (fastdebug build 25-internal-LTS-2025-03-04-2232391.katya..., mixed mode)
     AOTConfiguration recorded: (null)
Comments
Changeset: 28e6b7cb Branch: master Author: Ioi Lam <iklam@openjdk.org> Date: 2025-05-07 17:40:44 +0000 URL: https://git.openjdk.org/jdk/commit/28e6b7cb7462b0e231698c86ff57828e9e288087
07-05-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/25078 Date: 2025-05-07 04:06:12 +0000
07-05-2025

One more crash is when AOT config file point to nonexistent location: It crashes with # Internal Error (/home/katya/work/JavaSE/Hotspot/ws/git/jdk.jdk.master/open/src/hotspot/share/runtime/handles.cpp:39), pid=4587, tid=4588 # assert(_handle_mark_nesting > 1) failed: memory leak: allocating handle outside HandleMark in jdk main baseline and with # Internal Error (/home/katya/work/JavaSE/Hotspot/ws/git/leyden.premain/open/src/hotspot/share/runtime/java.cpp:548), pid=4613, tid=4614 # assert(!thread->has_pending_exception()) failed: must be in leyden premain. Steps to reproduce: > .TESTED_JAVA/bin/java -XX:AOTMode=record -XX:AOTConfiguration=DIR_DOESNOT_EXIST/test.aotconf -version
09-04-2025

The issue was introduced in b12.
05-03-2025