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

Allow-list --enable-native-access warnings on JDK 24-based builds related to brotli library #284

Closed
jerboaa opened this issue Sep 26, 2024 · 0 comments · Fixed by #288
Closed
Assignees

Comments

@jerboaa
Copy link
Collaborator

jerboaa commented Sep 26, 2024

We have some failing CI builds due to new warnings being produced:

[INFO] Running org.graalvm.tests.integration.DebugSymbolsTest
2024-09-26 01:23:59.135 INFO  [o.g.t.i.DebugSymbolsTest] (debugSymbolsQuarkus) Testing app: DEBUG_QUARKUS_FULL_MICROPROFILE
2024-09-26 01:23:59.147 INFO  [o.g.t.i.u.Commands$ProcessRunner] (run) Command: [mvn, package, -Pnative, -Dquarkus.native.debug.enabled=true, -Dquarkus.version=999-SNAPSHOT, -Dquarkus.native.additional-build-args=-H:+UnlockExperimentalVMOptions,-H:Log=registerResource:,-H:-UnlockExperimentalVMOptions,--trace-object-instantiation=java.util.Random]
[INFO] Scanning for projects...
[INFO] 
[INFO] ------< org.graalvm.tests.integration:quarkus-full-microprofile >-------
[INFO] Building quarkus-full-microprofile 1.0.0-SNAPSHOT
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ quarkus-full-microprofile ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO] 
[INFO] --- quarkus-maven-plugin:999-SNAPSHOT:generate-code (default) @ quarkus-full-microprofile ---
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ quarkus-full-microprofile ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 12 source files to /home/runner/work/mandrel/mandrel/mandrel-integration-tests/apps/quarkus-full-microprofile/target/classes
[INFO] 
[INFO] --- quarkus-maven-plugin:999-SNAPSHOT:generate-code-tests (default) @ quarkus-full-microprofile ---
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ quarkus-full-microprofile ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/runner/work/mandrel/mandrel/mandrel-integration-tests/apps/quarkus-full-microprofile/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ quarkus-full-microprofile ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ quarkus-full-microprofile ---
[INFO] No tests to run.
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ quarkus-full-microprofile ---
[INFO] Building jar: /home/runner/work/mandrel/mandrel/mandrel-integration-tests/apps/quarkus-full-microprofile/target/quarkus.jar
[INFO] 
[INFO] --- quarkus-maven-plugin:999-SNAPSHOT:build (default) @ quarkus-full-microprofile ---
Warning:  [io.quarkus.deployment.configuration] Configuration property 'quarkus.package.type' has been deprecated and replaced by: [quarkus.package.jar.enabled, quarkus.package.jar.type, quarkus.native.enabled, quarkus.native.sources-only]
[INFO] [io.quarkus.smallrye.jwt.deployment.SmallRyeJwtProcessor] Adding META-INF/resources/publicKey.pem to native image
[INFO] [io.quarkus.deployment.pkg.steps.JarResultBuildStep] Building native image source jar: /home/runner/work/mandrel/mandrel/mandrel-integration-tests/apps/quarkus-full-microprofile/target/quarkus-native-image-source-jar/quarkus-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Building native image from /home/runner/work/mandrel/mandrel/mandrel-integration-tests/apps/quarkus-full-microprofile/target/quarkus-native-image-source-jar/quarkus-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on MANDREL 24.2.0-devd159abe9 JDK 24-beta+16-ea
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildRunner] /home/runner/work/mandrel/mandrel/graalvm-home/bin/native-image -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dlogging.initial-configurator.min-level=500 -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=3 -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Duser.language=en -J-Duser.country=US -J-Dfile.encoding=UTF-8 --features=io.quarkus.runner.Feature,io.quarkus.runtime.graal.DisableLoggingFeature -H:+UnlockExperimentalVMOptions -H:+TrackNodeSourcePosition -H:-UnlockExperimentalVMOptions -H:+UnlockExperimentalVMOptions -H:+DebugCodeInfoUseSourceMappings -H:-UnlockExperimentalVMOptions -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-runner-build-output-stats.json -H:-UnlockExperimentalVMOptions -H:+UnlockExperimentalVMOptions -H:+GenerateBuildArtifactsFile -H:-UnlockExperimentalVMOptions -H:+UnlockExperimentalVMOptions -H:Log=registerResource: -H:-UnlockExperimentalVMOptions --trace-object-instantiation=java.util.Random -H:+UnlockExperimentalVMOptions -H:+AllowFoldMethods -H:-UnlockExperimentalVMOptions -J-Djava.awt.headless=true --no-fallback --link-at-build-time -H:+UnlockExperimentalVMOptions -H:+ReportExceptionStackTraces -H:-UnlockExperimentalVMOptions -g -H:+UnlockExperimentalVMOptions -H:DebugInfoSourceSearchPath=app-sources -H:-UnlockExperimentalVMOptions -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-runner -jar quarkus-runner.jar
Warning: Option 'DynamicProxyConfigurationResources' is deprecated and might be removed in a future release: This can be caused by a proxy-config.json file in your META-INF directory. Consider including proxy configuration in the reflection section of reachability-metadata.md instead.. Please refer to the GraalVM release notes.
========================================================================================================================
GraalVM Native Image: Generating 'quarkus-runner' (executable)...
========================================================================================================================
For detailed information and explanations on the build output, visit:
https://github.com/oracle/graal/blob/master/docs/reference-manual/native-image/BuildOutput.md
------------------------------------------------------------------------------------------------------------------------
[1/8] Initializing...                                                                                    (9.0s @ 0.20GB)
 Java version: 24-beta+16-ea, vendor version: Mandrel-24.2.0-devd159abe9
 Graal compiler: optimization level: 2, target machine: x86-64-v3
 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.thirdparty.gson.GsonFeature
 - io.quarkus.runner.Feature: Auto-generated class by Quarkus from the existing extensions
 - io.quarkus.runtime.graal.DisableLoggingFeature: Disables INFO logging during the analysis phase
------------------------------------------------------------------------------------------------------------------------
 8 experimental option(s) unlocked:
 - '-H:+DebugCodeInfoUseSourceMappings' (origin(s): command line)
 - '-H:+AllowFoldMethods' (origin(s): command line)
 - '-H:DebugInfoSourceSearchPath' (origin(s): command line)
 - '-H:BuildOutputJSONFile' (origin(s): command line)
 - '-H:-UseServiceLoaderFeature' (origin(s): command line)
 - '-H:+TrackNodeSourcePosition' (origin(s): command line)
 - '-H:Log' (origin(s): command line)
 - '-H:+GenerateBuildArtifactsFile' (origin(s): command line)
------------------------------------------------------------------------------------------------------------------------
Build resources:
 - 11.43GB of memory (73.2% of 15.62GB system memory, determined at start)
 - 4 thread(s) (100.0% of 4 available processor(s), determined at start)
WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::loadLibrary has been called by com.aayushatharva.brotli4j.Brotli4jLoader in an unnamed module (file:/home/runner/work/mandrel/mandrel/mandrel-integration-tests/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
WARNING: Restricted methods will be blocked in a future release unless native access is enabled

[2/8] Performing analysis...  [*****]                                                                   (63.2s @ 1.71GB)
   17,506 reachable types   (88.4% of   19,799 total)
   24,867 reachable fields  (53.3% of   46,647 total)
   83,965 reachable methods (58.3% of  144,096 total)
    5,118 types,    39 fields, and 1,346 methods registered for reflection
       62 types,    67 fields, and    55 methods registered for JNI access
        4 native libraries: dl, pthread, rt, z
[3/8] Building universe...                                                                               (9.5s @ 1.92GB)
[4/8] Parsing methods...      [***]                                                                      (8.6s @ 2.17GB)
[5/8] Inlining methods...     [***]                                                                      (5.7s @ 2.41GB)
[6/8] Compiling methods...    [********]                                                                (69.0s @ 2.04GB)
[7/8] Laying out methods...   [***]                                                                      (6.1s @ 2.57GB)
[8/8] Creating image...       [*******]                                                                 (50.1s @ 5.65GB)
  33.36MB ( 9.76%) for code area:    54,397 compilation units
  35.94MB (10.52%) for image heap:  418,999 objects and 98 resources
 264.76MB (77.48%) for debug info generated in 20.7s
   7.63MB ( 2.23%) for other data
 341.70MB in total
------------------------------------------------------------------------------------------------------------------------
Top 10 origins of code area:                                Top 10 object types in image heap:
  13.37MB java.base                                            9.24MB byte[] for code metadata
   2.29MB quarkus-runner.jar                                   5.56MB byte[] for java.lang.String
   1.93MB svm.jar (Native Image)                               4.40MB java.lang.Class
   1.78MB c.f.jackson.core.jackson-databind-2.17.2.jar         3.66MB java.lang.String
   1.31MB modified-io.vertx.vertx-core-4.5.10.jar              1.47MB com.oracle.svm.core.hub.DynamicHubCompanion
 944.74kB io.smallrye.smallrye-open-api-core-3.12.0.jar        1.26MB byte[] for general heap data
 595.27kB io.netty.netty-buffer-4.1.111.Final.jar            999.34kB byte[] for reflection metadata
 571.70kB com.fasterxml.jackson.core.jackson-core-2.17.2.jar 728.13kB java.lang.String[]
 506.55kB io.netty.netty-common-4.1.111.Final.jar            643.95kB heap alignment
 480.15kB io.quarkus.quarkus-vertx-http-999-SNAPSHOT.jar     635.35kB c.o.svm.core.hub.DynamicHub$ReflectionMetadata
   9.27MB for 146 more packages                                7.41MB for 4462 more object types
------------------------------------------------------------------------------------------------------------------------
Recommendations:
 HEAP: Set max heap for improved and more predictable memory usage.
 CPU:  Enable more CPU features with '-march=native' for improved performance.
------------------------------------------------------------------------------------------------------------------------
                       20.8s (9.2% of total time) in 2103 GCs | Peak RSS: 7.22GB | CPU load: 3.27
------------------------------------------------------------------------------------------------------------------------
Build artifacts:
 /home/runner/work/mandrel/mandrel/mandrel-integration-tests/apps/quarkus-full-microprofile/target/quarkus-native-image-source-jar/build-artifacts.json (build_info)
 /home/runner/work/mandrel/mandrel/mandrel-integration-tests/apps/quarkus-full-microprofile/target/quarkus-native-image-source-jar/quarkus-runner (executable)
 /home/runner/work/mandrel/mandrel/mandrel-integration-tests/apps/quarkus-full-microprofile/target/quarkus-native-image-source-jar/quarkus-runner-build-output-stats.json (build_info)
 /home/runner/work/mandrel/mandrel/mandrel-integration-tests/apps/quarkus-full-microprofile/target/quarkus-native-image-source-jar/quarkus-runner.debug (debug_info)
 /home/runner/work/mandrel/mandrel/mandrel-integration-tests/apps/quarkus-full-microprofile/target/quarkus-native-image-source-jar/sources (debug_info)
========================================================================================================================
Finished generating 'quarkus-runner' in 3m 44s.
[INFO] [io.quarkus.deployment.QuarkusAugmentor] Quarkus augmentation completed in 231657ms
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  03:57 min
[INFO] Finished at: 2024-09-26T01:27:57Z
[INFO] ------------------------------------------------------------------------
[...]
 Error:  debugSymbolsQuarkus{TestInfo}  Time elapsed: 310.868 s  <<< FAILURE!
org.opentest4j.AssertionFailedError: 
build-and-run.log log should not contain error or warning lines that are not whitelisted. See /home/runner/work/mandrel/mandrel/mandrel-integration-tests/testsuite/target/archived-logs/org.graalvm.tests.integration.DebugSymbolsTest/debugSymbolsQuarkus/build-and-run.log and check these offending lines: 
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:/home/runner/work/mandrel/mandrel/mandrel-integration-tests/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.DebugSymbolsTest.debugSymbolsQuarkus(DebugSymbolsTest.java:290)

See: https://github.com/graalvm/mandrel/actions/runs/11043295615/job/30678091813#step:11:15583

This is due to https://openjdk.org/jeps/472 new in JDK 24. While this essentially is a Quarkus issue (why is brotli there to begin with?) or a library issue, we need to allow list those lines for now so as to reduce test noise.

@jerboaa jerboaa self-assigned this Sep 26, 2024
jerboaa added a commit to jerboaa/mandrel-integration-tests that referenced this issue Sep 26, 2024
This should fix failures due to new warnings coming from the JDK in the
following tests:

- DebugSymbolsTest.debugSymbolsQuarkus
- JFRTest.jfrPerfTest
- RuntimesSmokeTest.quarkusFullMicroProfile

Closes: Karm#284
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant