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 fails to build with JDK 17.0.13+1 #779

Closed
jerboaa opened this issue Aug 16, 2024 · 2 comments · Fixed by #781
Closed

[23.0] Mandrel fails to build with JDK 17.0.13+1 #779

jerboaa opened this issue Aug 16, 2024 · 2 comments · Fixed by #781
Assignees
Labels
affects/JDK17 JDK17 related affects/23.0 bug Something isn't working

Comments

@jerboaa
Copy link
Collaborator

jerboaa commented Aug 16, 2024

Description

Since the latest early access build of JDK 17.0.13 we see mandrel build failures in CI:

Updated /home/runner/work/mandrel/mandrel/mandrel/substratevm/mxbuild/jdk17/svm-jvmfuncs-fallback-builder/src_gen/JvmFuncsFallbacks.c
Building com.oracle.svm.native.libchelper_amd64 with Ninja... [dependency DEFAULT_NINJA_TOOLCHAIN updated]
Building com.oracle.svm.native.jvm.posix_amd64 with Ninja... [dependency svm-jvmfuncs-fallback-builder updated]
Building com.oracle.svm.native.reporterchelper_amd64 with Ninja... [dependency DEFAULT_NINJA_TOOLCHAIN updated]
========================================================================================================================
GraalVM Native Image: Generating 'libnative-image-agent' (shared library)...
========================================================================================================================
For detailed information and explanations on the build output, visit:
https://github.com/oracle/graal/blob/master/docs/reference-manual/native-image/BuildOutput.md
------------------------------------------------------------------------------------------------------------------------
The URL protocol jar is not tested and might not work as expected.
Supported URL protocols enabled by default: file,resource. Supported URL protocols available on demand: http,https.
[1/8] Initializing...                                                                                    (3.6s @ 0.09GB)
 Java version: 17.0.13-beta+1-ea, vendor version: Mandrel-23.0.5.1-devd4f3b7e5
 Graal compiler: optimization level: 2, target machine: compatibility
 C compiler: gcc (linux, x86_64, 11.4.0)
 Garbage collector: Serial GC (max heap size: 80% of RAM)
 3 user-specific feature(s)
 - com.oracle.svm.agent.NativeImageAgent$RegistrationFeature
 - com.oracle.svm.configure.config.SignatureUtilFeature
 - com.oracle.svm.driver.APIOptionFeature

------------------------------------------------------------------------------------------------------------------------
                        0.2s (4.0% of total time) in 10 GCs | Peak RSS: 0.33GB | CPU load: 3.25
------------------------------------------------------------------------------------------------------------------------
Produced artifacts:
 /home/runner/work/mandrel/mandrelvm/lib/svm_err_b_20240803T002951.885_pid3215.md (build_info)
========================================================================================================================
Failed generating 'libnative-image-agent' after 3.7s.

The build process encountered an unexpected error:

> com.oracle.svm.core.util.VMError$HostedError: InternalFeature defined by com.oracle.svm.hosted.SecurityServicesFeature unexpectedly failed with a(n) com.oracle.svm.util.ReflectionUtil$ReflectionUtilError

Please inspect the generated error report at:
/home/runner/work/mandrel/mandrelvm/lib/svm_err_b_20240803T002951.885_pid3215.md

If you are unable to resolve this problem, please file an issue with the error report at:
https://graalvm.org/support
Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Failed, exit code: 1
	at OperatingSystem.exec(build.java:1712)
	at build.buildAgents(build.java:230)
	at build.main(build.java:212)
Caused by: java.lang.RuntimeException: Failed, exit code: 1
	at OperatingSystem.exec(build.java:1701)
	at build.buildAgents(build.java:230)
	at build.main(build.java:212)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
	at jdk.compiler/com.sun.tools.javac.launcher.Main.execute(Main.java:419)
	at jdk.compiler/com.sun.tools.javac.launcher.Main.run(Main.java:192)
	at jdk.compiler/com.sun.tools.javac.launcher.Main.main(Main.java:132)
Error: Process completed with exit code 1.

See:
https://github.com/graalvm/mandrel/actions/runs/10223728151/job/28290521379#step:8:553

How To Reproduce

Steps to reproduce the behavior:

  1. Build mandrel 23.0 with JDK 17.0.13+1 or better.

Configuration:

  • OS: Fedora 39
  • Architecture: AMD64
  • Mandrel version: 23.0 release tree.
  • JDK version: OpenJDK 17.0.13+1 (or newer)

Expected behavior

Mandrel 23.0 builds (including the native agents).

Additional context

This last worked with an OpenJDK 17.0.12 GA build.

@jerboaa jerboaa added bug Something isn't working affects/JDK17 JDK17 related affects/23.0 labels Aug 16, 2024
@jerboaa jerboaa added this to the 23.0.6.0-Final milestone Aug 16, 2024
@zakkak zakkak self-assigned this Aug 21, 2024
@zakkak
Copy link
Collaborator

zakkak commented Aug 21, 2024

Caused by https://bugs.openjdk.org/browse/JDK-8324646 backport to 17

Backporting oracle@05c1e79 (with the proper adaptation like in graalvm/graalvm-community-jdk21u#4) should resolve this.

zakkak added a commit that referenced this issue Aug 21, 2024
Fixes #716

Version agnostic adaptation of 05c1e79
(cherry picked from commit 0edb942)

Fix missing null check in 'Adopt "JDK-8324646: Avoid Class.forName in SecureRandom constructor"'

(cherry picked from commit dcecff7)

Fixes #779
zakkak added a commit to zakkak/mandrel that referenced this issue Aug 21, 2024
Version agnostic adaptation of 05c1e79
(cherry picked from commit 0edb942)

Fix missing null check in 'Adopt "JDK-8324646: Avoid Class.forName in SecureRandom constructor"'

(cherry picked from commit dcecff7)

Fixes graalvm#779
zakkak added a commit that referenced this issue Aug 21, 2024
Version agnostic adaptation of 05c1e79
(cherry picked from commit 0edb942)

Fix missing null check in 'Adopt "JDK-8324646: Avoid Class.forName in SecureRandom constructor"'

(cherry picked from commit dcecff7)

Fixes #779
@zakkak
Copy link
Collaborator

zakkak commented Aug 21, 2024

Closed by #781

@zakkak zakkak closed this as completed Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects/JDK17 JDK17 related affects/23.0 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants