-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Enable Safe Composition of Metadata for ShardingSphere Proxy Native #33179
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
linghengqian
force-pushed
the
scm-re
branch
8 times, most recently
from
October 10, 2024 08:36
8018a74
to
d4cd0ac
Compare
linghengqian
commented
Oct 10, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- This PR became quite complicated because the Warning Log even included GraalVM CE's internal missing GRM, which definitely involved multiple potential GraalVM bugs.
Before supporting compiling shardingsphere project with GraalVM CE For JDK23, I needed to change-H:ThrowMissingRegistrationErrors=
to-H:ThrowMissingRegistrationErrors=org.apache.shardingsphere
to avoid a wider range of impacts.
org.graalvm.nativeimage.MissingReflectionRegistrationError: The program tried to reflectively access
com.oracle.svm.core.genscavenge.HeapImplMemoryMXBean.getConstructors()
without it being registered for runtime reflection. Add com.oracle.svm.core.genscavenge.HeapImplMemoryMXBean.getConstructors() to the reflection metadata to solve this problem. See https://www.graalvm.org/latest/reference-manual/native-image/metadata/#reflection for help.
java.base@22.0.2/java.lang.Class.getConstructors(DynamicHub.java:1028)
java.management@22.0.2/com.sun.jmx.mbeanserver.MBeanIntrospector.findConstructors(MBeanIntrospector.java:461)
java.management@22.0.2/com.sun.jmx.mbeanserver.MBeanIntrospector.getClassMBeanInfo(MBeanIntrospector.java:432)
java.management@22.0.2/com.sun.jmx.mbeanserver.MBeanIntrospector.getMBeanInfo(MBeanIntrospector.java:391)
- The path scanned by seata client is also suspicious. I don't believe the seata client uses the
registry
file directly.
com.oracle.svm.core.jdk.resources.MissingResourceRegistrationError: The program tried to access the resource at path
registry
without it being registered as reachable. Add it to the resource metadata to solve this problem. See https://www.graalvm.org/latest/reference-manual/native-image/metadata/#resources-and-resource-bundles for help
java.base@22.0.2/java.lang.ClassLoader.getResource(ClassLoader.java:1407)
org.apache.seata.config.FileConfiguration.getFileFromClasspath(FileConfiguration.java:194)
org.apache.seata.config.FileConfiguration.getConfigFile(FileConfiguration.java:144)
org.apache.seata.config.FileConfiguration.<init>(FileConfiguration.java:108)
- Also see,
- Limit external configuration sources parsing in native-mode quarkusio/quarkus#42140
- Improve exception handling when application fails to start quarkusio/quarkus#42270
- [GR-50180] Do not register inner classes for Class.forName oracle/graal#7876
- Run metadata tests with
-H:+ThrowMissingRegistrationErrors
. oracle/graalvm-reachability-metadata#499
linghengqian
force-pushed
the
scm-re
branch
3 times, most recently
from
October 10, 2024 16:04
4e0fc60
to
b66fc2d
Compare
strongduanmu
approved these changes
Oct 11, 2024
49 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For #29052.
Changes proposed in this pull request:
Adds GraalVM Reachability Metadata for
ch.qos.logback:logback-core:1.2.13
Adds GraalVM Reachability Metadata for
com.alibaba:druid:1.2.7
Adds GraalVM Reachability Metadata for
com.github.docker-java:docker-java:3.4.0
Adds GraalVM Reachability Metadata for
com.mysql:mysql-connector-j:8.3.0
Adds GraalVM Reachability Metadata for
io.grpc:grpc-netty:1.65.1
Adds GraalVM Reachability Metadata for
io.vertx:vertx-core:4.5.1
Adds GraalVM Reachability Metadata for
io.netty:netty-transport-classes-epoll:4.1.112.Final
Adds GraalVM Reachability Metadata for
org.apache.groovy:groovy:4.0.22
Adds GraalVM Reachability Metadata for
org.apache.hadoop:hadoop-common:3.3.6
Adds GraalVM Reachability Metadata for
org.apiguardian:apiguardian-api:1.1.2
Adds GraalVM Reachability Metadata for
org.jboss.logging:jboss-logging:3.2.1.Final
Adds GraalVM Reachability Metadata for
org.jboss.narayana.jta:jta:5.12.7.Final
Adds GraalVM Reachability Metadata for
org.junit.jupiter:junit-jupiter:5.11.1
Adds GraalVM Reachability Metadata for
org.testcontainers:junit-jupiter:1.20.2
Adds GraalVM Reachability Metadata for
com.typesafe:config:1.2.1
Adds GraalVM Reachability Metadata for
com.google.protobuf:protobuf-java:3.21.12
. This sounds like what I missed in Add support forcom.google.protobuf:protobuf-java-util:3.21.12
oracle/graalvm-reachability-metadata#167 .Adds GraalVM Reachability Metadata for
org.springframework:spring-jcl:5.3.27
Adds GraalVM Reachability Metadata for
com.clickhouse:clickhouse-jdbc:0.6.3
Updates documentation. According to Unable to apply parallel builds to thread-unsafe
native-maven-plugin
graalvm/native-build-tools#619 , GraalVM Native Build Tools 0.10.3 no longer prevents parallel builds of Maven.As for [GR-49770] Safe Composition of Metadata oracle/graal#5173, the SCM proposal involving
buildArg
entered GraalVM CE For JDK22 as an experimental option and became an official option on GraalVM CE For JDK23. The SCM proposal brings more readable Error Logs, which is definitely beneficial to contributors. The Error Logs brought by the SCM proposal are as follows.{"excludeClasses": "java.**"}
. Because this type of GRM begins to be required by Safe Composition of Metadata. There are obviously too manyjava.**
GRM JSONs that need to be defined.Before committing this PR, I'm sure that I have checked the following options:
./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e
.