<div dir="ltr">Hello all!<div>I'm trying to run an AOTCaching optimized app in debug mode; unfortunately, it does not seem to be supported.</div><div><br></div><div>Using a JDK 25.0.1, during the training run I have:</div><div><br></div><div>```</div><div> [creator]     Temporary AOTConfiguration recorded: application.aot.config<br>    [creator]     Launching child process /layers/paketo-buildpacks_bellsoft-liberica/jre/bin/java to assemble AOT cache application.aot using configuration application.aot.config<br>    [creator]     Picked up JAVA_TOOL_OPTIONS: -Djava.class.path=runner.jar:lib/spring-cloud-bindings-2.0.4.jar -agentlib:jdwp=transport=dt_socket,server=y,address=*:8000,suspend=n -XX:+AOTClassLinking -Dspring.context.exit=onRefresh -XX:AOTCacheOutput=application.aot -XX:AOTConfiguration=application.aot.config -XX:AOTMode=create<br>    [creator]     Reading AOTConfiguration application.aot.config and writing AOTCache application.aot<br>    [creator]     [0.262s][warning][aot] Skipping io/micrometer/core/instrument/config/InvalidConfigurationException: Unlinked class not supported by AOTClassLinking<br>    [creator]     [0.262s][warning][aot] Skipping org/springframework/web/servlet/view/freemarker/FreeMarkerView: Unlinked class not supported by AOTClassLinking<br>    [creator]     [0.262s][warning][aot] Skipping org/springframework/boot/logging/log4j2/Log4J2LoggingSystem: Unlinked class not supported by AOTClassLinking<br>    [creator]     [0.263s][warning][aot] Skipping org/springframework/core/ReactiveAdapterRegistry$ReactorAdapter: Unlinked class not supported by AOTClassLinking<br>    [creator]     AOTCache creation is complete: application.aot 56819712 bytes<br>    [creator]     Removed temporary AOT configuration file application.aot.config<br></div><div>```</div><div><br></div><div>but at runtime, I have:</div><div>```</div><div>Picked up JAVA_TOOL_OPTIONS: -Djava.security.properties=/layers/paketo-buildpacks_bellsoft-liberica/java-security-properties/java-security.properties -XX:+ExitOnOutOfMemoryError -agentlib:jdwp=transport=dt_socket,server=y,address=*:8000,suspend=n -XX:MaxDirectMemorySize=10M -Xmx14945375K -XX:MaxMetaspaceSize=78944K -XX:ReservedCodeCacheSize=240M -Xss1M -XX:+UnlockDiagnosticVMOptions -XX:NativeMemoryTracking=summary -XX:+PrintNMTStatistics -XX:AOTCache=application.aot -Dorg.springframework.cloud.bindings.boot.enable=true<br>[0.032s][error][aot] AOT cache has aot-linked classes. It cannot be used with JDWP agent<br>[0.034s][error][aot] An error has occurred while processing the AOT cache. Run with -Xlog:aot for details.<br>[0.034s][error][aot] Unable to map shared spaces<br>Listening for transport dt_socket at address: 8000<br></div><div>```</div><div><br></div><div>If I enable `-Xlog:aot` at runtime, I have:</div><div><br></div><div>```</div><div>Picked up JAVA_TOOL_OPTIONS: -Xlog:aot -Djava.security.properties=/layers/paketo-buildpacks_bellsoft-liberica/java-security-properties/java-security.properties -XX:+ExitOnOutOfMemoryError -agentlib:jdwp=transport=dt_socket,server=y,address=*:8000,suspend=n -XX:MaxDirectMemorySize=10M -Xmx15196043K -XX:MaxMetaspaceSize=78944K -XX:ReservedCodeCacheSize=240M -Xss1M -XX:+UnlockDiagnosticVMOptions -XX:NativeMemoryTracking=summary -XX:+PrintNMTStatistics -XX:AOTCache=application.aot -Dorg.springframework.cloud.bindings.boot.enable=true<br>[0.033s][info][aot] trying to map application.aot<br>[0.033s][info][aot] Opened AOT cache application.aot.<br>[0.033s][info][aot] The AOT cache was created with UseCompressedOops = 1, UseCompressedClassPointers = 1, UseCompactObjectHeaders = 0<br>[0.033s][info][aot] Core region alignment: 65536<br>[0.033s][info][aot] ArchiveRelocationMode: 1<br>[0.033s][info][aot] ArchiveRelocationMode == 1: always map archive(s) at an alternative address<br>[0.033s][info][aot] Try to map archive(s) at an alternative address<br>[0.033s][info][aot] Reserved archive_space_rs [0x0000003000000000 - 0x0000003004000000] (67108864) bytes (includes protection zone)<br>[0.033s][info][aot] Reserved class_space_rs   [0x0000003004000000 - 0x0000003008000000] (67108864) bytes<br>[0.033s][info][aot] Mapped static  region #0 at base 0x0000003000010000 top 0x0000003001500000 (ReadWrite)<br>[0.033s][info][aot] Mapped static  region #1 at base 0x0000003001500000 top 0x0000003003200000 (ReadOnly)<br>[0.033s][info][aot] Mapped static  region #2 at base 0x0000ffff5c120000 top 0x0000ffff5c1e0000 (Bitmap)<br>[0.069s][info][aot] archived module property jdk.module.main: (null)<br>[0.069s][info][aot] archived module property jdk.module.addexports: (null)<br>[0.069s][info][aot] archived module property jdk.module.addmods: (null)<br>[0.069s][info][aot] archived module property jdk.module.enable.native.access: (null)<br>[0.069s][info][aot] archived module property jdk.module.addopens: (null)<br>[0.069s][info][aot] archived module property jdk.module.addreads: (null)<br>[0.069s][info][aot] optimized module handling: enabled<br>[0.069s][info][aot] full module graph: enabled<br>[0.069s][error][aot] AOT cache has aot-linked classes. It cannot be used with JDWP agent<br>[0.069s][info ][aot] Unmapping region #0 at base 0x0000003000010000 (ReadWrite)<br>[0.069s][info ][aot] Region #0 (ReadWrite) is in a reserved space, it will be freed when the space is released<br>[0.069s][info ][aot] Unmapping region #1 at base 0x0000003001500000 (ReadOnly)<br>[0.069s][info ][aot] Region #1 (ReadOnly) is in a reserved space, it will be freed when the space is released<br>[0.069s][info ][aot] Unmapping region #2 at base 0x0000ffff5c120000 (Bitmap)<br>[0.069s][error][aot] An error has occurred while processing the AOT cache. Run with -Xlog:aot for details.<br>[0.069s][error][aot] Unable to map shared spaces<br>Listening for transport dt_socket at address: 8000<br></div><div>```</div><div><br></div><div>I have tried several variations using ` -XX:+AOTClassLinking` during the training run, but that did not change a thing.</div><div><br></div><div>Is it possible to use AOTCaching when debug is enabled?</div><div><br></div><div>Thank you!</div><div><br></div><div><br></div></div>