Karm / mandrel-integration-tests

Integration tests for GraalVM and its Mandrel distribution. Runs Quarkus, Helidon and Micronaut applications and small targeted reproducers. The focus is solely on native-image utility and compilation of Java applications into native executables.
Apache License 2.0
5 stars 3 forks source link

[24.1] imageio AWT tests fail with JDK 23 ea #262

Open jerboaa opened 1 week ago

jerboaa commented 1 week ago

The imageio AWT integration tests seem to fail a JDK 23-based Mandrel 24.1 build with:

[...]
[INFO] --- shade:2.4.3:shade (default) @ imageio ---
[WARNING] Parameter 'localRepository' is deprecated core expression; Avoid use of ArtifactRepository type. If you need access to local repository, switch to '${repositorySystemSession}' expression and get LRM from it instead.
[INFO] Including org.jfree:org.jfree.svg:jar:4.1 in the shaded jar.
[INFO] Including org.jfree:jfreechart:jar:1.5.2 in the shaded jar.
[INFO] Replacing original artifact with shaded artifact.
[INFO] Replacing /disk/graal/upstream-sources/mandrel-integration-tests/apps/imageio/target/imageio.jar with /disk/graal/upstream-sources/mandrel-integration-tests/apps/imageio/target/imageio-1-shaded.jar
[INFO] Dependency-reduced POM written at: /disk/graal/upstream-sources/mandrel-integration-tests/apps/imageio/dependency-reduced-pom.xml
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.804 s
[INFO] Finished at: 2024-06-26T15:07:24+02:00
[INFO] ------------------------------------------------------------------------
2024-06-26 15:07:24.284 INFO  [o.g.t.i.u.Commands$ProcessRunner] (run) Command: [java, -Djava.awt.headless=true, -agentlib:native-image-agent=config-output-dir=src/main/resources/META-INF/native-image, -jar, target/imageio.jar]
2024-06-26 15:07:26.031 INFO  [o.g.t.i.u.Commands$ProcessRunner] (run) Command: [jar, uf, target/imageio.jar, -C, src/main/resources/, META-INF]
2024-06-26 15:07:26.361 INFO  [o.g.t.i.u.Commands$ProcessRunner] (run) Command: [native-image, -J-Djava.awt.headless=true, --no-fallback, -jar, target/imageio.jar, target/imageio]
Warning: Option 'DynamicProxyConfigurationResources' is deprecated and might be removed in a future release. Please refer to the GraalVM release notes.
========================================================================================================================
GraalVM Native Image: Generating 'imageio' (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...                                                                                    (3.0s @ 0.16GB)
 Java version: 23-beta+28-202406240955, vendor version: Mandrel-24.1.0-dev22e2e94bb8f2
 Graal compiler: optimization level: 2, target machine: x86-64-v3
 C compiler: gcc (redhat, x86_64, 13.3.1)
 Garbage collector: Serial GC (max heap size: 80% of RAM)
 1 user-specific feature(s):
 - com.oracle.svm.thirdparty.gson.GsonFeature
------------------------------------------------------------------------------------------------------------------------
Build resources:
 - 26.49GB of memory (42.4% of 62.55GB system memory, determined at start)
 - 12 thread(s) (100.0% of 12 available processor(s), determined at start)
[2/8] Performing analysis...  [****]                                                                    (12.6s @ 0.57GB)
    5,798 reachable types   (75.9% of    7,644 total)
    9,530 reachable fields  (49.7% of   19,176 total)
   29,244 reachable methods (50.9% of   57,414 total)
    1,783 types,    79 fields, and   776 methods registered for reflection
       58 types,    58 fields, and    52 methods registered for JNI access
        4 native libraries: dl, pthread, rt, z
[3/8] Building universe...                                                                               (2.0s @ 0.65GB)
[4/8] Parsing methods...      [*]                                                                        (1.6s @ 0.44GB)
[5/8] Inlining methods...     [***]                                                                      (1.3s @ 0.52GB)
[6/8] Compiling methods...    [****]                                                                    (13.7s @ 0.77GB)
[7/8] Laying out methods...   [**]                                                                       (2.9s @ 0.96GB)
[8/8] Creating image...       [**]                                                                       (2.5s @ 1.12GB)
  13.02MB (46.83%) for code area:    17,964 compilation units
  14.20MB (51.09%) for image heap:  164,395 objects and 58 resources
 593.18kB ( 2.08%) for other data
  27.80MB in total
------------------------------------------------------------------------------------------------------------------------
Top 10 origins of code area:                                Top 10 object types in image heap:
   6.12MB java.base                                            3.41MB byte[] for code metadata
   5.27MB java.desktop                                         2.16MB byte[] for java.lang.String
   1.07MB svm.jar (Native Image)                               1.62MB java.lang.String
 116.92kB java.logging                                         1.36MB java.lang.Class
  67.01kB org.graalvm.nativeimage.base                         1.19MB byte[] for embedded resources
  49.32kB java.datatransfer                                  498.27kB com.oracle.svm.core.hub.DynamicHubCompanion
  48.63kB jdk.proxy2                                         359.67kB java.util.HashMap$Node
  43.31kB imageio.jar                                        325.87kB java.lang.String[]
  42.34kB jdk.proxy1                                         300.65kB byte[] for general heap data
  26.56kB jdk.internal.vm.ci                                 297.81kB byte[] for reflection metadata
  41.84kB for 6 more packages                                  2.72MB for 1215 more object types
------------------------------------------------------------------------------------------------------------------------
Recommendations:
 AWT:  Use the tracing agent to collect metadata for AWT.
 HEAP: Set max heap for improved and more predictable memory usage.
 CPU:  Enable more CPU features with '-march=native' for improved performance.
------------------------------------------------------------------------------------------------------------------------
                        1.8s (4.3% of total time) in 356 GCs | Peak RSS: 1.62GB | CPU load: 9.35
------------------------------------------------------------------------------------------------------------------------
Build artifacts:
 /disk/graal/upstream-sources/mandrel-integration-tests/apps/imageio/target/imageio (executable)
 /disk/graal/upstream-sources/mandrel-integration-tests/apps/imageio/target/libawt.so (jdk_library)
 /disk/graal/upstream-sources/mandrel-integration-tests/apps/imageio/target/libawt_headless.so (jdk_library)
 /disk/graal/upstream-sources/mandrel-integration-tests/apps/imageio/target/libawt_xawt.so (jdk_library)
 /disk/graal/upstream-sources/mandrel-integration-tests/apps/imageio/target/libfontmanager.so (jdk_library)
 /disk/graal/upstream-sources/mandrel-integration-tests/apps/imageio/target/libfreetype.so (jdk_library)
 /disk/graal/upstream-sources/mandrel-integration-tests/apps/imageio/target/libjava.so (jdk_library_shim)
 /disk/graal/upstream-sources/mandrel-integration-tests/apps/imageio/target/libjavajpeg.so (jdk_library)
 /disk/graal/upstream-sources/mandrel-integration-tests/apps/imageio/target/libjvm.so (jdk_library_shim)
 /disk/graal/upstream-sources/mandrel-integration-tests/apps/imageio/target/liblcms.so (jdk_library)
========================================================================================================================
Finished generating 'imageio' in 40.6s.
2024-06-26 15:08:08.376 INFO  [o.g.t.i.AppReproducersTest] (imageioAWT) Running...
2024-06-26 15:08:09.381 INFO  [o.g.t.i.u.Commands] (runCommand) Command: [./target/imageio, -Djava.home=., -Djava.awt.headless=true]
2024-06-26 15:08:09.424 INFO  [o.g.t.i.u.Commands] (pidKiller) Killing PID: 109047, forcefully: true
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 48.851 s <<< FAILURE! - in org.graalvm.tests.integration.AppReproducersTest
[ERROR] imageioAWTTest{TestInfo}  Time elapsed: 47.981 s  <<< FAILURE!
org.opentest4j.AssertionFailedError: 
There were errors checking the generated image files, see:
mytest.jpg was not generated.
mytest_toL.png was not generated.
mytest.bmp was not generated.
mytest_toG.png was not generated.
mytest.gif was not generated.
mytest.svg was not generated.
mytest.png was not generated.
mytest.tiff was not generated.
mytest_Resized_Grace_M._Hopper.png was not generated.
mytest_toC.png was not generated.
mytest_toP.png was not generated.
mytest.wbmp was not generated.
mytest_toS.png was not generated. ==> expected: <true> but was: <false>
    at org.graalvm.tests.integration.AppReproducersTest.imageioAWT(AppReproducersTest.java:607)
    at org.graalvm.tests.integration.AppReproducersTest.imageioAWTTest(AppReproducersTest.java:501)

[INFO] 
[INFO] Results:
[INFO] 
[ERROR] Failures: 
[ERROR]   AppReproducersTest.imageioAWTTest:501->imageioAWT:607 There were errors checking the generated image files, see:
mytest.jpg was not generated.
mytest_toL.png was not generated.
mytest.bmp was not generated.
mytest_toG.png was not generated.
mytest.gif was not generated.
mytest.svg was not generated.
mytest.png was not generated.
mytest.tiff was not generated.
mytest_Resized_Grace_M._Hopper.png was not generated.
mytest_toC.png was not generated.
mytest_toP.png was not generated.
mytest.wbmp was not generated.
mytest_toS.png was not generated. ==> expected: <true> but was: <false>
[INFO] 
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Native image integration TS 1.0.0-SNAPSHOT:
[INFO] 
[INFO] Native image integration TS ........................ SUCCESS [  0.104 s]
[INFO] testsuite .......................................... FAILURE [ 51.810 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  51.982 s
[INFO] Finished at: 2024-06-26T15:08:09+02:00
[INFO] ------------------------------------------------------------------------

Steps to reproduce

export JAVA_HOME=/path/to/mandrel-24.1
export GRAALVM_HOME=$JAVA_HOME
export PATH=$JAVA_HOME/bin:$PATH
mvn clean verify -Dquarkus.version=999-SNAPSHOT -Ptestsuite -Dtest=AppReproducersTest#imageioAWTTest
jerboaa commented 1 week ago

/cc @Karm