-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Describe the bug
Hi
I'm trying to build app-cds.jsa and use it at startup. Quarkus AppCDS Documentation
I've tried 17, 21 java, fast-jar, uber-jar. quarkus versions 3.20, 3.27, 3.28
I always get warning messages like this:
[0.023s][warning][cds] A jar file is not the one used while building the shared archive file: quarkus-run.jar
[0.023s][warning][cds] appcds-demo-1.0-SNAPSHOT-runner.jar timestamp has changed.
.....
[0.024s][warning][cds,dynamic] Unable to use shared archive. The top archive failed to load: app-cds.jsa
Here I am using Gradle. But, when I change Gradle to maven - all works.
I think, gradle (or plugin) do something with jar and change timestamp. And after this, jsa have wrong timestamp info.
Expected behavior
CDS report like in maven
[0.101s][info][cds] trying to map /usr/lib/jvm/java-21-openjdk-21.0.9.0.10-1.el9.x86_64/lib/server/classes.jsa
[0.101s][info][cds] Opened archive /usr/lib/jvm/java-21-openjdk-21.0.9.0.10-1.el9.x86_64/lib/server/classes.jsa.
[0.101s][info][cds] Archive was created with UseCompressedOops = 1, UseCompressedClassPointers = 1
[0.101s][info][cds] Core region alignment: 4096
[0.101s][info][cds] trying to map app-cds.jsa
[0.101s][info][cds] Opened archive app-cds.jsa.
[0.101s][info][cds] Archive was created with UseCompressedOops = 1, UseCompressedClassPointers = 1
[0.101s][info][cds] ArchiveRelocationMode == 1: always map archive(s) at an alternative address
[0.101s][info][cds] Try to map archive(s) at an alternative address
[0.101s][info][cds] Reserved archive_space_rs [0x00007f721e000000 - 0x00007f7220000000] (33554432) bytes
[0.101s][info][cds] Reserved class_space_rs [0x00007f7220000000 - 0x00007f7228000000] (134217728) bytes
[0.101s][info][cds] Mapped static region #0 at base 0x00007f721e000000 top 0x00007f721e483000 (ReadWrite)
[0.101s][info][cds] Mapped static region #1 at base 0x00007f721e483000 top 0x00007f721ec9f000 (ReadOnly)
[0.101s][info][cds] Mapped static region #2 at base 0x00007f7260713000 top 0x00007f7260751000 (Bitmap)
[0.107s][info][cds] Mapped dynamic region #0 at base 0x00007f721ec9f000 top 0x00007f721f342000 (ReadWrite)
[0.107s][info][cds] Mapped dynamic region #1 at base 0x00007f721f342000 top 0x00007f721fb8e000 (ReadOnly)
[0.107s][info][cds] Mapped dynamic region #2 at base 0x00007f72606d7000 top 0x00007f7260713000 (Bitmap)
[0.600s][info][cds] CDS archive was created with max heap size = 128M, and the following configuration:
[0.600s][info][cds] narrow_klass_base = 0x00007f721e000000, narrow_klass_shift = 0
[0.600s][info][cds] narrow_oop_mode = 0, narrow_oop_base = 0x0000000000000000, narrow_oop_shift = 0
[0.600s][info][cds] heap range = [0x00000000f8000000 - 0x0000000100000000]
[0.600s][info][cds] The current max heap size = 7956M, HeapRegion::GrainBytes = 4194304
[0.600s][info][cds] narrow_klass_base = 0x00007f721e000000, narrow_klass_shift = 0
[0.600s][info][cds] narrow_oop_mode = 1, narrow_oop_base = 0x0000000000000000, narrow_oop_shift = 3
[0.600s][info][cds] heap range = [0x000000060ec00000 - 0x0000000800000000]
[0.600s][info][cds] Requested heap region [0x00000000ffe00000 - 0x00000000fff0ccf0] = 1101040 bytes
[0.600s][info][cds] CDS heap data needs to be relocated because the archive was created with an incompatible oop encoding mode.
[0.600s][info][cds] CDS heap data relocation delta = 30062673920 bytes
[0.600s][info][cds] Trying to map heap data at 0x00000007ffc00000, size = 1101040 bytes
[0.600s][info][cds] optimized module handling: enabled
[0.600s][info][cds] full module graph: enabled
[0.600s][info][cds] use_full_module_graph = true; java.base = 0x00007f721e47d6e8
[0.600s][info][cds] patching heap embedded pointers: narrowOop 0xffe00000 -> 0xfff80000
[0.600s][info][cds] CDS heap data quick relocation not possible
[0.602s][info][cds] Unmapping region #2 at base 0x00007f7260713000 (Bitmap)
[0.602s][info][cds] Unmapping region #2 at base 0x00007f72606d7000 (Bitmap)
Actual behavior
[0.196s][info][cds] trying to map /usr/lib/jvm/java-21-openjdk-21.0.9.0.10-1.el9.x86_64/lib/server/classes.jsa
[0.196s][info][cds] Opened archive /usr/lib/jvm/java-21-openjdk-21.0.9.0.10-1.el9.x86_64/lib/server/classes.jsa.
[0.196s][info][cds] Archive was created with UseCompressedOops = 1, UseCompressedClassPointers = 1
[0.196s][info][cds] Core region alignment: 4096
[0.196s][info][cds] trying to map app-cds.jsa
[0.196s][info][cds] Opened archive app-cds.jsa.
[0.196s][info][cds] Archive was created with UseCompressedOops = 1, UseCompressedClassPointers = 1
[0.196s][info][cds] ArchiveRelocationMode == 1: always map archive(s) at an alternative address
[0.196s][info][cds] Try to map archive(s) at an alternative address
[0.196s][info][cds] Reserved archive_space_rs [0x00007fd796000000 - 0x00007fd798000000] (33554432) bytes
[0.196s][info][cds] Reserved class_space_rs [0x00007fd798000000 - 0x00007fd7a0000000] (134217728) bytes
[0.196s][info][cds] Mapped static region #0 at base 0x00007fd796000000 top 0x00007fd796483000 (ReadWrite)
[0.196s][info][cds] Mapped static region #1 at base 0x00007fd796483000 top 0x00007fd796c9f000 (ReadOnly)
[0.196s][info][cds] Mapped static region #2 at base 0x00007fd7b59a7000 top 0x00007fd7b59e5000 (Bitmap)
[0.406s][info][cds] Mapped dynamic region #0 at base 0x00007fd796c9f000 top 0x00007fd79733e000 (ReadWrite)
[0.406s][info][cds] Mapped dynamic region #1 at base 0x00007fd79733e000 top 0x00007fd797b84000 (ReadOnly)
[0.406s][info][cds] Mapped dynamic region #2 at base 0x00007fd7b596b000 top 0x00007fd7b59a7000 (Bitmap)
[0.899s][warning][cds] A jar file is not the one used while building the shared archive file: quarkus-run.jar
[0.899s][warning][cds] quarkus-run.jar timestamp has changed.
[0.899s][info ][cds] Unmapping region #0 at base 0x00007fd796c9f000 (ReadWrite)
[0.899s][info ][cds] Unmapping region #1 at base 0x00007fd79733e000 (ReadOnly)
[0.900s][info ][cds] Unmapping region #2 at base 0x00007fd7b596b000 (Bitmap)
[0.900s][warning][cds,dynamic] Unable to use shared archive. The top archive failed to load: app-cds.jsa
[0.900s][info ][cds ] CDS archive was created with max heap size = 128M, and the following configuration:
[0.900s][info ][cds ] narrow_klass_base = 0x00007fd796000000, narrow_klass_shift = 0
[0.900s][info ][cds ] narrow_oop_mode = 0, narrow_oop_base = 0x0000000000000000, narrow_oop_shift = 0
[0.900s][info ][cds ] heap range = [0x00000000f8000000 - 0x0000000100000000]
[0.900s][info ][cds ] The current max heap size = 7956M, HeapRegion::GrainBytes = 4194304
[0.900s][info ][cds ] narrow_klass_base = 0x00007fd796000000, narrow_klass_shift = 0
[0.900s][info ][cds ] narrow_oop_mode = 1, narrow_oop_base = 0x0000000000000000, narrow_oop_shift = 3
[0.900s][info ][cds ] heap range = [0x000000060ec00000 - 0x0000000800000000]
[0.900s][info ][cds ] Requested heap region [0x00000000ffe00000 - 0x00000000fff0ccf0] = 1101040 bytes
[0.900s][info ][cds ] CDS heap data needs to be relocated because the archive was created with an incompatible oop encoding mode.
[0.900s][info ][cds ] CDS heap data relocation delta = 30062673920 bytes
[0.900s][info ][cds ] Trying to map heap data at 0x00000007ffc00000, size = 1101040 bytes
[0.900s][info ][cds ] optimized module handling: enabled
[0.900s][info ][cds ] full module graph: enabled
[0.900s][error ][cds ] An error has occurred while processing the shared archive file.
[0.900s][error ][cds ] Unable to map shared spaces
Error occurred during initialization of VM
Unable to use shared archive.
How to Reproduce?
Output of uname -a or ver
No response
Output of java -version
No response
Quarkus version or git rev
No response
Build tool (ie. output of mvnw --version or gradlew --version)
No response
Additional information
No response