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

JDK 24+13 based Mandrel 24.2 builds produce warnings #278

Closed
jerboaa opened this issue Sep 9, 2024 · 7 comments
Closed

JDK 24+13 based Mandrel 24.2 builds produce warnings #278

jerboaa opened this issue Sep 9, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@jerboaa
Copy link
Collaborator

jerboaa commented Sep 9, 2024

After oracle/graal#9621, mandrel builds produce warnings due to some GraalVM enterprise modules which aren't there for mandrel. Example warning:

WARNING: Unknown module: com.oracle.svm.svm_enterprise specified to --enable-native-access
WARNING: Unknown module: com.oracle.graal.graal_enterprise specified to --enable-native-access

Seen in CI here:
https://github.com/graalvm/mandrel/actions/runs/10747037745/job/29809505730#step:11:12828

We'd need a patch in upstream GraalVM so as to not add those modules for Mandrel. Example patch:
jerboaa/graal@74a2e81

@jerboaa
Copy link
Collaborator Author

jerboaa commented Sep 9, 2024

Discussion about this here:
oracle/graal#9621 (comment)

@jerboaa
Copy link
Collaborator Author

jerboaa commented Sep 11, 2024

This should be fixed once oracle/graal#9654 merges.

@zakkak
Copy link
Collaborator

zakkak commented Sep 23, 2024

oracle/graal#9654 is now merged but there are still related warnings showing up in some cases, e.g.:

WARNING: A restricted method in java.lang.System has been called
WARNING: Restricted methods will be blocked in a future release unless native access is enabled
WARNING: java.lang.System::loadLibrary has been called by com.aayushatharva.brotli4j.Brotli4jLoader in an unnamed module (file:/D:/a/mandrel/mandrel/apps/quarkus-full-microprofile/target/quarkus-native-image-source-jar/lib/com.aayushatharva.brotli4j.brotli4j-1.16.0.jar)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module ==> expected: <true> but was: <false>
	at org.graalvm.tests.integration.RuntimesSmokeTest.testRuntime(RuntimesSmokeTest.java:156)
	at org.graalvm.tests.integration.RuntimesSmokeTest.quarkusFullMicroProfile(RuntimesSmokeTest.java:200)

See https://github.com/graalvm/mandrel/actions/runs/10985696189/job/30498692042

@jerboaa
Copy link
Collaborator Author

jerboaa commented Sep 23, 2024

oracle/graal#9654 is now merged but there are still related warnings showing up in some cases, e.g.:

WARNING: A restricted method in java.lang.System has been called
WARNING: Restricted methods will be blocked in a future release unless native access is enabled
WARNING: java.lang.System::loadLibrary has been called by com.aayushatharva.brotli4j.Brotli4jLoader in an unnamed module (file:/D:/a/mandrel/mandrel/apps/quarkus-full-microprofile/target/quarkus-native-image-source-jar/lib/com.aayushatharva.brotli4j.brotli4j-1.16.0.jar)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module ==> expected: <true> but was: <false>
	at org.graalvm.tests.integration.RuntimesSmokeTest.testRuntime(RuntimesSmokeTest.java:156)
	at org.graalvm.tests.integration.RuntimesSmokeTest.quarkusFullMicroProfile(RuntimesSmokeTest.java:200)

See https://github.com/graalvm/mandrel/actions/runs/10985696189/job/30498692042

Hmm, this seems to be the intended warnings that need to happen after https://openjdk.org/jeps/472. I.e. the brotli library needs to have enabled native access configured or the coarse grain --enable-native-access=ALL-UNNAMED needs to be added wholesale. The alternative is to allow-list those log lines. Example happening at image build time here:

https://github.com/graalvm/mandrel/actions/runs/10985696189/job/30498692042#step:10:8773

@zakkak
Copy link
Collaborator

zakkak commented Sep 24, 2024

The alternative is to allow-list those log lines. Example happening at image build time here:

https://github.com/graalvm/mandrel/actions/runs/10985696189/job/30498692042#step:10:8773

The warning shows up in Quarkus integration tests as well so I believe this is something to be handled in Quarkus.

@jerboaa
Copy link
Collaborator Author

jerboaa commented Sep 24, 2024

The alternative is to allow-list those log lines. Example happening at image build time here:
https://github.com/graalvm/mandrel/actions/runs/10985696189/job/30498692042#step:10:8773

The warning shows up in Quarkus integration tests as well so I believe this is something to be handled in Quarkus.

It would be great if Quarkus could move to automatic modules.

@jerboaa
Copy link
Collaborator Author

jerboaa commented Sep 26, 2024

I'm closing this as it was originally about svm modules that produced warnings, which is gone. The brotli issue is tracked in: #284

@jerboaa jerboaa closed this as completed Sep 26, 2024
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

No branches or pull requests

2 participants