[GR-52650] When `experimental-class-define-support=true`'s `buildArg` is passed to GraalVM Tracing Agent, incorrect Conditional Metadata is generated #8396
Describe the issue
A clear and concise description of the issue. We recommend using the latest snapshot builds to replicate the issue as bugs are constantly being fixed in the master branch
When experimental-class-define-support=true's buildArg is passed to GraalVM Tracing Agent, incorrect Conditional Metadata is generated.
Unit testing requires SDKMAN! and Docker Engine to be installed.
I'd happily assume this is an issue with GraalVM CE. Because if I switch to generate GraalVM Reachability Metadata in Standard form there will be no problem.
Steps to reproduce the issue
Please include both build steps as well as run steps
Use the following steps to complete verification through GraalVM Native Build Tools. Wrong GraalVM Reachability Metadata in Conditional form will cause failure when executing the Maven Goal of native:metadata-copy. Log is provided below.
sdk install java 21.0.2-graalce
sdk use java 21.0.2-graalce
sudo apt-get install build-essential libz-dev zlib1g-dev -y
git clone git@github.com:linghengqian/experimental-class-define-support-v2312-test.git
cd ./experimental-class-define-support-v2312-test/
./mvnw -e -T1C clean test
./mvnw -PgenerateMetadata -DskipNativeTests -e -T1C clean test native:metadata-copy
Describe GraalVM and your environment:
GraalVM version (latest snapshot builds can be found here), or commit id if built from source: [e.g. EE 19.3, CE 20.0, CE 20.1.0-dev-20200304_0848]
JDK major version: [e.g.:8]21
OS: [e.g. macOS Catalina]Ubuntu 22.04.3
Architecture: [e.g.: AMD64]AMD64
More details
Add any other information about the problem here. Especially important are stack traces or log output. Feel free to link to gists or to screenshots if necessary.
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 13.96 s -- in com.lingh.SeataTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] --- native:0.10.0:merge-agent-files (test-native) @ experimental-class-define-support-v2312-test ---
[INFO] Merging agent 1 files into /home/linghengqian/TwinklingLiftWorks/git/public/experimental-class-define-support-v2312-test/target/native/agent-output/test
[INFO]
[INFO] --- native:0.10.0:test (test-native) @ experimental-class-define-support-v2312-test ---
[INFO] Skipping native-image tests (parameter 'skipTests' or 'skipNativeTests' is true).
[INFO]
[INFO] --- native:0.10.0:metadata-copy (default-cli) @ experimental-class-define-support-v2312-test ---
[WARNING] Destination directory /home/linghengqian/TwinklingLiftWorks/git/public/experimental-class-define-support-v2312-test/src/test/resources/META-INF/native-image/io.seata/seata-all/2.0.0/ doesn't exist.
[WARNING] Creating directory at: /home/linghengqian/TwinklingLiftWorks/git/public/experimental-class-define-support-v2312-test/src/test/resources/META-INF/native-image/io.seata/seata-all/2.0.0/
[INFO] Found GraalVM installation from JAVA_HOME variable.
[INFO] Copying files from: test
[ERROR] Metadata copy process failed with code: 1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18.953 s (Wall Clock)
[INFO] Finished at: 2024-02-19T00:08:43+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.graalvm.buildtools:native-maven-plugin:0.10.0:metadata-copy (default-cli) on project experimental-class-define-support-v2312-test: Metadata copy process failed. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.graalvm.buildtools:native-maven-plugin:0.10.0:metadata-copy (default-cli) on project experimental-class-define-support-v2312-test: Metadata copy process failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:333)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:193)
at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:180)
at java.util.concurrent.FutureTask.run (FutureTask.java:317)
at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:572)
at java.util.concurrent.FutureTask.run (FutureTask.java:317)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1144)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:642)
at java.lang.Thread.run (Thread.java:1583)
Caused by: org.apache.maven.plugin.MojoExecutionException: Metadata copy process failed.
at org.graalvm.buildtools.maven.MetadataCopyMojo.executeCopy (MetadataCopyMojo.java:163)
at org.graalvm.buildtools.maven.MetadataCopyMojo.execute (MetadataCopyMojo.java:115)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:193)
at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:180)
at java.util.concurrent.FutureTask.run (FutureTask.java:317)
at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:572)
at java.util.concurrent.FutureTask.run (FutureTask.java:317)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1144)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:642)
at java.lang.Thread.run (Thread.java:1583)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Describe the issue A clear and concise description of the issue. We recommend using the latest snapshot builds to replicate the issue as bugs are constantly being fixed in the master branch
experimental-class-define-support=true
'sbuildArg
is passed to GraalVM Tracing Agent, incorrect Conditional Metadata is generated.26403
port is idle. More notes are in the README at https://github.com/linghengqian/experimental-class-define-support-v2312-test .SDKMAN!
andDocker Engine
to be installed.Standard
form there will be no problem.Steps to reproduce the issue Please include both build steps as well as run steps
Conditional
form will cause failure when executing the Maven Goal ofnative:metadata-copy
. Log is provided below.Describe GraalVM and your environment:
21
Ubuntu 22.04.3
AMD64
More details Add any other information about the problem here. Especially important are stack traces or log output. Feel free to link to gists or to screenshots if necessary.