The JVM crashes with a SIGSEGV during startup if the runtime image (lib/modules) exists but is unreadable. This case may happen due to deployment permission errors or strict security hardening.
The issue occurs in AOTClassLocationConfig::validate. The call to ClassLoader::get_jrt_entry() returns nullptr when the modules file cannot be read. The code subsequently attempts to dereference this null pointer to access ->name(), causing the crash.
Steps to Reproduce:
chmod a-r ./lib/modules ; ./bin/java -version
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f7bcf4a272a, pid=1700, tid=1701
#
# JRE version: (25.0.3) (fastdebug build )
# Java VM: OpenJDK 64-Bit Server VM
# Problematic frame:
# V [libjvm.so+0x6a272a] AOTClassLocationConfig::validate(char const*, bool, bool*) const+0x2aa
The issue occurs in AOTClassLocationConfig::validate. The call to ClassLoader::get_jrt_entry() returns nullptr when the modules file cannot be read. The code subsequently attempts to dereference this null pointer to access ->name(), causing the crash.
Steps to Reproduce:
chmod a-r ./lib/modules ; ./bin/java -version
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f7bcf4a272a, pid=1700, tid=1701
#
# JRE version: (25.0.3) (fastdebug build )
# Java VM: OpenJDK 64-Bit Server VM
# Problematic frame:
# V [libjvm.so+0x6a272a] AOTClassLocationConfig::validate(char const*, bool, bool*) const+0x2aa
- links to
-
Review(master)
openjdk/jdk/28982