Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[23.0] Mandrel builds with 17.0.11 EA fail integration tests due to birth time change #680

Closed
jerboaa opened this issue Feb 19, 2024 · 8 comments · Fixed by #683
Closed
Assignees
Labels
bug Something isn't working

Comments

@jerboaa
Copy link
Collaborator

jerboaa commented Feb 19, 2024

Description

We see JDK 17.0.11 ea-based failures in all integration tests due to JDK-8316304 which is newly backported to 17.0.11+1 and better.

Failures look like this:

[INFO] Running org.test.NativeHelloResourceIT
2024-02-17 02:52:22,318 WARN  [io.qua.agr.dep.AgroalProcessor] (build-5) The Agroal dependency is present but no JDBC datasources have been defined.
2024-02-17 02:52:22,554 WARN  [io.qua.hib.orm.dep.HibernateOrmProcessor] (build-12) Hibernate ORM is disabled because no JPA entities were found
Executing "/home/runner/work/mandrel/mandrel/quarkus/integration-tests/jpa-without-entity/target/quarkus-integration-test-jpa-without-entity-999-SNAPSHOT-runner -Dquarkus.http.port=8081 -Dquarkus.http.ssl-port=8444 -Dtest.url=http://localhost:8081 -Dquarkus.log.file.path=/home/runner/work/mandrel/mandrel/quarkus/integration-tests/jpa-without-entity/target/quarkus.log -Dquarkus.log.file.enable=true -Dquarkus.log.category."io.quarkus".level=INFO -Dquarkus.native.native-image-xmx=13g"
Feb 17, 2024 2:52:23 AM io.quarkus.runtime.ApplicationLifecycleManager run
ERROR: Failed to start application (with profile [prod])
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:111)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:71)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:44)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:124)
	at io.quarkus.runner.GeneratedMain.main(Unknown Source)
Caused by: java.lang.NoSuchFieldError: sun.nio.fs.UnixFileAttributes.st_birthtime_sec
	at org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.functions.JNIFunctions$Support.getFieldID(JNIFunctions.java:1279)
	at org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.functions.JNIFunctions.GetFieldID(JNIFunctions.java:432)
	at java.base@17.0.11-beta/sun.nio.fs.UnixNativeDispatcher.init(Native Method)
	at java.base@17.0.11-beta/sun.nio.fs.UnixNativeDispatcher.<clinit>(UnixNativeDispatcher.java:668)
	at java.base@17.0.11-beta/sun.nio.fs.UnixFileSystemProvider.isDirectory(UnixFileSystemProvider.java:521)
	at java.base@17.0.11-beta/java.nio.file.Files.isDirectory(Files.java:2318)
	at io.smallrye.config.DotEnvConfigSourceProvider.getDotEnvFile(DotEnvConfigSourceProvider.java:63)
	at io.smallrye.config.DotEnvConfigSourceProvider.<init>(DotEnvConfigSourceProvider.java:22)
	at io.quarkus.runtime.configuration.RuntimeConfigBuilder.configBuilder(RuntimeConfigBuilder.java:24)
	at io.smallrye.config.SmallRyeConfigBuilder.lambda$build$0(SmallRyeConfigBuilder.java:722)
	at java.base@17.0.11-beta/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
	at java.base@17.0.11-beta/java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357)
	at java.base@17.0.11-beta/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:510)
	at java.base@17.0.11-beta/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base@17.0.11-beta/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
	at java.base@17.0.11-beta/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
	at java.base@17.0.11-beta/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base@17.0.11-beta/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
	at io.smallrye.config.SmallRyeConfigBuilder.build(SmallRyeConfigBuilder.java:722)
	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

Error:  Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 5.205 s <<< FAILURE! -- in org.test.NativeHelloResourceIT
Error:  org.test.NativeHelloResourceIT.testHelloEndpoint -- Time elapsed: 0.012 s <<< ERROR!

Example failure in weekly CI:
https://github.com/graalvm/mandrel/actions/runs/7938323570/job/21677410793#step:12:3244

@jerboaa jerboaa added the bug Something isn't working label Feb 19, 2024
@jerboaa
Copy link
Collaborator Author

jerboaa commented Feb 19, 2024

@zakkak I believe you've fixed this in 23.1, do you remember which change it was? Thanks!

@zakkak
Copy link
Collaborator

zakkak commented Feb 19, 2024

@zakkak I believe you've fixed this in 23.1

I couldn't find anything related in my notes, but it looks like we need to backport oracle@5a8a6ec (and oracle@1a3d489) to https://github.com/graalvm/graalvm-for-jdk17-community-backports

@jerboaa
Copy link
Collaborator Author

jerboaa commented Feb 19, 2024

@zakkak I believe you've fixed this in 23.1

I couldn't find anything related in my notes, but it looks like we need to backport oracle@5a8a6ec (and oracle@1a3d489) to https://github.com/graalvm/graalvm-for-jdk17-community-backports

OK. Is there some process documentation around this yet? Just file a PR?

@zakkak
Copy link
Collaborator

zakkak commented Feb 19, 2024

OK. Is there some process documentation around this yet? Just file a PR?

It's still undefined :/ I would start with creating a GH issue.

@jerboaa jerboaa self-assigned this Feb 27, 2024
@jerboaa
Copy link
Collaborator Author

jerboaa commented Feb 27, 2024

Simple reproducer for this:

$ cat LastModified.java
import java.nio.file.*;
import java.util.Map;
import java.nio.file.attribute.BasicFileAttributes;

public class LastModified {
    public static void main(String[] args) throws Exception {
	Path p = Path.of(args[0]);
        var attrs = Files.readAttributes(p, BasicFileAttributes.class);
	Map<String, Object> ats = Files.readAttributes(p, "basic:*", java.nio.file.LinkOption.NOFOLLOW_LINKS);
        System.out.printf(
            "   follow-symlink - symlink? %s%ncreated  (a): %s%nmodified (a): %s%n",
	    Boolean.valueOf(Files.isSymbolicLink(p)).toString(),
            attrs.creationTime(),
            attrs.lastModifiedTime()
        );
        System.out.printf(
            "no-follow-symlink - symlink? %s%ncreated  (b): %s%nmodified (b): %s%n",
	    Boolean.valueOf(Files.isSymbolicLink(p)).toString(),
            ats.get("creationTime"),
            ats.get("lastModifiedTime")
        );
    }
}
$ javac LastModified.java
$ native-image LastModified lm
[...]
$ ./lm test.txt 
Exception in thread "main" java.lang.NoSuchFieldError: sun.nio.fs.UnixFileAttributes.st_birthtime_sec
	at org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.functions.JNIFunctions$Support.getFieldID(JNIFunctions.java:1279)
	at org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.functions.JNIFunctions.GetFieldID(JNIFunctions.java:432)
	at java.base@17.0.11-beta/sun.nio.fs.UnixNativeDispatcher.init(Native Method)
	at java.base@17.0.11-beta/sun.nio.fs.UnixNativeDispatcher.<clinit>(UnixNativeDispatcher.java:668)
	at java.base@17.0.11-beta/sun.nio.fs.UnixFileAttributes.get(UnixFileAttributes.java:76)
	at java.base@17.0.11-beta/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:52)
	at java.base@17.0.11-beta/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:148)
	at java.base@17.0.11-beta/sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
	at java.base@17.0.11-beta/java.nio.file.Files.readAttributes(Files.java:1851)
	at LastModified.main(LastModified.java:8)

@jerboaa
Copy link
Collaborator Author

jerboaa commented Feb 27, 2024

PR for 23.0 in graalvm/graalvm-for-jdk17-community-backports#1 (if not accepted there, I'll post it as a PR for mandrel-23.0 branch)

@jerboaa jerboaa linked a pull request Feb 27, 2024 that will close this issue
@zakkak
Copy link
Collaborator

zakkak commented Feb 28, 2024

if not accepted there, I'll post it as a PR for mandrel-23.0 branch

FTR the change is now merged in mandrel/23.0 to allow the CI to give meaningful results until the issue gets resolved in upstream.

@jerboaa jerboaa added this to the 23.0.4.0-Final milestone Mar 5, 2024
@jerboaa
Copy link
Collaborator Author

jerboaa commented Mar 5, 2024

Closed with #683

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants