Skip to content

[GR-62545][Native Image] Build fails with Found 1 violations of @Uninterruptible usage #12397

@zakkak

Description

@zakkak

Describe the Issue

In a recent github CI run we observed the following error

The build process encountered an unexpected error:

com.oracle.svm.core.util.VMError$HostedError: Found 1 violations of @Uninterruptible usage:
- Unannotated callee: com.oracle.svm.core.posix.PosixStat.S_IRUSR():int called by annotated caller com.oracle.svm.core.posix.PosixRawFileOperationSupport.open0(CCharPointer, int):RawFileOperationSupport$RawFileDescriptor
null
	at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:78)
	at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:137)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.code.UninterruptibleAnnotationChecker.reportViolations(UninterruptibleAnnotationChecker.java:108)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.code.UninterruptibleAnnotationChecker.checkBeforeCompilation(UninterruptibleAnnotationChecker.java:99)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.code.CompileQueue.checkUninterruptibleAnnotations(CompileQueue.java:485)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.code.CompileQueue.finish(CompileQueue.java:438)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:656)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:533)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:547)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:754)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.start(NativeImageGeneratorRunner.java:163)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:111)

I couldn't reproduce the issue locally.

Using the latest version of GraalVM can resolve many issues.

GraalVM Version

5674e69

Operating System and Version

Fedora 42

Build Command

native-image -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Dlogging.initial-configurator.min-level=500 -J-Duser.language=en -J-Duser.country=US -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=3 -H:+UnlockExperimentalVMOptions -H:IncludeLocales=en-US -H:-UnlockExperimentalVMOptions -J-Dfile.encoding=UTF-8 -J--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk=ALL-UNNAMED --features=io.quarkus.runner.Feature,io.quarkus.runtime.graal.DisableLoggingFeature,io.quarkus.runtime.graal.SkipConsoleServiceProvidersFeature -J--add-exports=java.security.jgss/sun.security.krb5=ALL-UNNAMED -J--add-exports=java.security.jgss/sun.security.jgss=ALL-UNNAMED -J--add-opens=java.base/java.text=ALL-UNNAMED -J--add-opens=java.base/java.io=ALL-UNNAMED -J--add-opens=java.base/java.lang.invoke=ALL-UNNAMED -J--add-opens=java.base/java.util=ALL-UNNAMED -H:+UnlockExperimentalVMOptions -H:BuildOutputJSONFile=quarkus-integration-test-openshift-client-999-SNAPSHOT-runner-build-output-stats.json -H:-UnlockExperimentalVMOptions -H:+UnlockExperimentalVMOptions -H:+GenerateBuildArtifactsFile -H:-UnlockExperimentalVMOptions -H:+UnlockExperimentalVMOptions -H:+AllowFoldMethods -H:-UnlockExperimentalVMOptions -J-Djava.awt.headless=true --no-fallback --link-at-build-time -H:+UnlockExperimentalVMOptions -H:+ReportExceptionStackTraces -H:-UnlockExperimentalVMOptions -J-Xmx13g -H:-AddAllCharsets --enable-url-protocols=http,https -H:NativeLinkerOption=-no-pie --enable-monitoring=heapdump -H:+UnlockExperimentalVMOptions -H:-UseServiceLoaderFeature -H:-UnlockExperimentalVMOptions -J--add-exports=org.graalvm.nativeimage/org.graalvm.nativeimage.impl=ALL-UNNAMED --exclude-config io\.netty\.netty-codec /META-INF/native-image/io\.netty/netty-codec/generated/handlers/reflect-config\.json --exclude-config io\.netty\.netty-handler /META-INF/native-image/io\.netty/netty-handler/generated/handlers/reflect-config\.json quarkus-integration-test-openshift-client-999-SNAPSHOT-runner -jar quarkus-integration-test-openshift-client-999-SNAPSHOT-runner.jar

Expected Behavior

Test should build

Actual Behavior

Test fails to build as described in the description

Steps to Reproduce

I could not reproduce locally but what triggered it in the CI was:

git clone https://github.com/quarkusio/quarkus.git     
cd quarkus                       
export GRAALVM_HOME=/path/to/latest/graalvm/build
./mvnw install -Dquickly -T2C
./mvnw -Dnative -pl integration-tests/openshift-client --fail-at-end -Dtest-containers -Dstart-containers -DfailIfNoTests=false -Dquarkus.native.native-image-xmx=13g -Dnative -Dnative.surefire.skip -Dformat.skip -Dno-descriptor-tests install -DskipDocs

Additional Context

No response

Build Log Output and Error Messages

No response

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions