AppCDS in 25 failing for JRuby command line

Charles Oliver Nutter headius at headius.com
Thu Oct 2 16:58:43 UTC 2025


Hello friends!

I was doing some testing of AppCDS on JDK 25, in hopes of having our Docker
images pre-generate an AppCDS archive. But I discovered an issue... AppCDS
does not appear to like the JRuby command line anymore in JDK 25.

Here's part of a session where I delete the old AppCDS archive and then run
the same command line twice with AutoCreateSharedArchive. The archive
generates ok in the first command, but then is rejected by the second
command:

[] jdk25 $ rm /Users/headius/work/jruby/lib/jruby-java25.jsa
[] jdk25 $
/Library/Java/JavaVirtualMachines/zulu-25.jdk/Contents/Home/bin/java
@/Users/headius/work/jruby/bin/.jruby.java_opts
@/Users/headius/work/jruby/bin/.jruby.module_opts -Xss2048k
-Djffi.boot.library.path=/Users/headius/work/jruby/lib/jni
-Djava.security.egd=file:/dev/urandom -XX:+AutoCreateSharedArchive
-XX:SharedArchiveFile=/Users/headius/work/jruby/lib/jruby-java25.jsa
--enable-native-access=org.jruby.dist --sun-misc-unsafe-memory-access=allow
--module-path /Users/headius/work/jruby/lib/jruby.jar -classpath :
-Djruby.home=/Users/headius/work/jruby
-Djruby.lib=/Users/headius/work/jruby/lib -Djruby.script=jruby
-Djruby.shell=/bin/sh org.jruby.Main -e 1
[1.074s][warning][cds] Skipping jdk/proxy2/$Proxy13: Unsupported location
[1.074s][warning][cds] Skipping jdk/proxy2/$Proxy25: Unsupported location
[1.074s][warning][cds] Skipping org/joda/time/field/MillisDurationField:
Old class has been linked
...
[1.076s][warning][cds] Skipping org/jruby/org/objectweb/asm/ClassWriter:
Old class has been linked
[1.076s][warning][cds] Skipping
org/joda/time/format/DateTimeFormatterBuilder$PaddedNumber: Old class has
been linked
[] jdk25 $
/Library/Java/JavaVirtualMachines/zulu-25.jdk/Contents/Home/bin/java
@/Users/headius/work/jruby/bin/.jruby.java_opts
@/Users/headius/work/jruby/bin/.jruby.module_opts -Xss2048k
-Djffi.boot.library.path=/Users/headius/work/jruby/lib/jni
-Djava.security.egd=file:/dev/urandom -XX:+AutoCreateSharedArchive
-XX:SharedArchiveFile=/Users/headius/work/jruby/lib/jruby-java25.jsa
--enable-native-access=org.jruby.dist --sun-misc-unsafe-memory-access=allow
--module-path /Users/headius/work/jruby/lib/jruby.jar -classpath :
-Djruby.home=/Users/headius/work/jruby
-Djruby.lib=/Users/headius/work/jruby/lib -Djruby.script=jruby
-Djruby.shell=/bin/sh org.jruby.Main -e 1
[0.008s][error][cds] An error has occurred while processing the shared
archive file. Run with -Xlog:aot,cds for details.
[0.008s][error][cds] optimized module handling: disabled because extra
module path(s) are specified
[0.008s][error][cds] Mismatched values for property
jdk.module.enable.native.access: org.jruby.dist specified during runtime
but not during dump time
[0.008s][error][cds] Disabling optimized module handling
[0.008s][error][cds] Mismatched values for property jdk.module.addopens:
java.base/java.io
=org.jruby.dist,java.base/java.nio.channels=org.jruby.dist,java.base/
sun.nio.ch=org.jruby.dist,java.management/sun.management=org.jruby.dist
specified during runtime but not during dump time
[0.008s][error][cds] Disabling optimized module handling

The errors make no sense because I'm doing exactly the same thing in both
command lines.

Here's the contents of the /Users/headius/work/jruby/bin/.jruby.module_opts
file (the .jruby.java_opts file is empty):

--add-opens java.base/java.io=org.jruby.dist
--add-opens java.base/java.nio.channels=org.jruby.dist
--add-opens java.base/sun.nio.ch=org.jruby.dist
--add-opens java.management/sun.management=org.jruby.dist

Running the same commands against JDK 21 works just fine... the jsa file is
generated and used correctly. Is there something I'm doing wrong with this
command line that JDK 25 does not like?

I can re-test with another JDK if necessary. Let me know if I should open a
bug for this.

Reproduce by downloading JRuby from https://jruby.org and unpacking. It
runs out of the box.

*Charles Oliver Nutter*
*Architect and Technologist*
Headius Enterprises
https://www.headius.com
headius at headius.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/leyden-dev/attachments/20251002/969c7a83/attachment.htm>


More information about the leyden-dev mailing list