graalvm / mandrel

Mandrel is a downstream distribution of the GraalVM community edition. Mandrel's main goal is to provide a native-image release specifically to support Quarkus.
Other
396 stars 15 forks source link

[24.2] graal/master fails to build quarkus applications with JDK 24+19 #799

Closed zakkak closed 1 month ago

zakkak commented 1 month ago

Description

We see all quarkus native integration tests fail at run-time in CI since the 24+19 JDK ea build got used for building.

Failure with JDK 24+19 looks like:

Oct 11, 2024 1:09:54 AM io.quarkus.runtime.ApplicationLifecycleManager run
ERROR: Failed to start application
java.lang.RuntimeException: Failed to start quarkus
    at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
    at io.quarkus.runtime.Application.start(Application.java:101)
    at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:119)
    at io.quarkus.runtime.Quarkus.run(Quarkus.java:71)
    at io.quarkus.runtime.Quarkus.run(Quarkus.java:44)
    at io.quarkus.runner.GeneratedMain.main(Unknown Source)
    at java.base@24-beta/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)
Caused by: java.lang.NoSuchFieldError: sun.nio.fs.UnixFileAttributes.birthtime_available
    at org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.functions.JNIFunctions$Support.getFieldID(JNIFunctions.java:1869)
    at org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.functions.JNIFunctions.GetFieldID(JNIFunctions.java:461)
    at java.base@24-beta/sun.nio.fs.UnixNativeDispatcher.init(Native Method)
    at java.base@24-beta/sun.nio.fs.UnixNativeDispatcher.<clinit>(UnixNativeDispatcher.java:609)
    at java.base@24-beta/sun.nio.fs.UnixFileAttributes.getIfExists(UnixFileAttributes.java:87)
    at java.base@24-beta/sun.nio.fs.UnixFileSystemProvider.readAttributesIfExists(UnixFileSystemProvider.java:177)
    at java.base@24-beta/java.nio.file.Files.isDirectory(Files.java:2331)
    at io.smallrye.config.DotEnvConfigSourceProvider.getDotEnvFile(DotEnvConfigSourceProvider.java:56)
    at io.smallrye.config.DotEnvConfigSourceProvider.<init>(DotEnvConfigSourceProvider.java:19)
    at io.smallrye.config.SmallRyeConfigBuilder.getSystemSources(SmallRyeConfigBuilder.java:208)
    at io.smallrye.config.SmallRyeConfigBuilder.getDefaultSources(SmallRyeConfigBuilder.java:199)
    at io.smallrye.config.SmallRyeConfig$ConfigSources.buildSources(SmallRyeConfig.java:840)
    at io.smallrye.config.SmallRyeConfig$ConfigSources.<init>(SmallRyeConfig.java:767)
    at io.smallrye.config.SmallRyeConfig.<init>(SmallRyeConfig.java:86)
    at io.smallrye.config.SmallRyeConfigBuilder.build(SmallRyeConfigBuilder.java:736)
    at io.quarkus.runtime.generated.Config.readConfig(Unknown Source)
    at io.quarkus.runtime.generated.Config.createRunTimeConfig(Unknown Source)
    at io.quarkus.deployment.steps.RuntimeConfigSetup.deploy(Unknown Source)
    ... 7 more

How To Reproduce

Try running any quarkus native integration test, e.g.:

./mvnw -Dnative -pl integration-tests/main -Dnative.surefire.skip -Dformat.skip -Dno-descriptor-tests clean package -Dquarkus.native.container-build=false -Dstart-containers -Dtest-containers

Configuration:

Expected behavior

Mandrel integration test passes.

Additional context

We probably need to wait for the next JVMCI update from upstream to JDK 24+19.

jerboaa commented 1 month ago

OK. This is JDK bug (new in jdk 24+19): https://bugs.openjdk.org/browse/JDK-8341282

zakkak commented 1 month ago

Upstream PR expected to fix it https://github.com/oracle/graal/pull/9863