RFR: 8356324: JVM crash (SIGSEGV at ClassListParser::resolve_indy_impl) during -Xshare:dump starting from 21.0.5
Coleen Phillimore
coleenp at openjdk.org
Tue Aug 19 19:47:38 UTC 2025
On Thu, 14 Aug 2025 07:30:40 GMT, Koichi Sakata <ksakata at openjdk.org> wrote:
> A crash occurs when running with `-Xshare:dump` and specifying a class list file generated by an older JDK (e.g. JDK 17) via `-XX:SharedClassListFile`.
> This pull request fixes the issue and prevents the crash.
>
> # Details
> Example command to reproduce:
>
> $ ./jdk-26/fastdebug/bin/java -Xshare:dump -XX:SharedClassListFile=classes.list -XX:SharedArchiveFile=noop.jsa HelloWorld
> #
> # A fatal error has been detected by the Java Runtime Environment:
> #
> # SIGSEGV (0xb) at pc=0x0000ffff8610355c, pid=53155, tid=53156
> #
> # JRE version: OpenJDK Runtime Environment (26.0) (fastdebug build 26-internal-adhoc.jyukutyo.jyukutyo-jdk)
> # Java VM: OpenJDK 64-Bit Server VM (fastdebug 26-internal-adhoc.jyukutyo.jyukutyo-jdk, interpreted mode, compressed oops, compressed class ptrs, g1 gc, linux-
> aarch64)
> # Problematic frame:
> # V [libjvm.so+0x90355c] ClassListParser::resolve_indy_impl(Symbol*, JavaThread*)+0x2dc
> [full crash log omitted for brevity]
>
> The class list file that triggers the problem, generated by JDK 17, looks like this:
>
> @lambda-proxy java/lang/System$LoggerFinder run ()Ljava/security/PrivilegedAction; ()Ljava/lang/Object; REF_invokeStatic java/lang/System$LoggerFinder lambda$accessProvider$0 ()Ljava/lang/System$LoggerFinder; ()Ljava/lang/System$LoggerFinder;
>
>
> In contrast, the recent JDK generates class list contents as follows:
>
> @cp jdk/internal/logger/LoggerFinderLoader 15 21 30 96 99 105 110 117 118 122 141
> @cp jdk/internal/logger/DefaultLoggerFinder 1 2 7 8 14 22 2...
This looks good. I think resolved_indy_entry_at() should be valid because the index is a known indy so it would not have a null _resolved_indy_entries. Calling the length function may be called when dumping, so does need to defend against null as you saw in the crash.
The resolved indy work went in JDK 21 baselevel 16 - don't know which update that would be though.
-------------
Marked as reviewed by coleenp (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/26770#pullrequestreview-3133614452
More information about the hotspot-dev
mailing list