xuxiaowei-com-cn commented on PR #8162:
URL: https://github.com/apache/incubator-seata/pull/8162#issuecomment-5723442900
- 个人电脑环境无法执行构建,代码回滚到历史记录,也会出现下列异常(已排除了代理等问题)
- The build cannot be executed in my personal computer environment. Even
after rolling the code back to a historical version, the following exception
still occurs (proxy and other issues have already been ruled out).
```
[2/8] Performing analysis... []
(10.2s @ 3.57GB)
25,564 types, 38,172 fields, and 134,756 methods found reachable
11,444 types, 9,588 fields, and 38,137 methods registered for
reflection
2 downcalls and 0 upcalls registered for foreign access
1 native library: -framework CoreServices
Fatal error:
com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: An object of
type 'java.io.ProxyingConsole' was found in the image heap. This type, however,
is marked for initialization at image run time for the following reason:
classes are initialized at run time by default.
This is not allowed for correctness reasons: All objects that are stored in
the image heap must be initialized at build time.
You now have two options to resolve this:
1) If it is intended that objects of type 'java.io.ProxyingConsole' are
persisted in the image heap, add
'--initialize-at-build-time=java.io.ProxyingConsole'
to the native-image arguments. Note that initializing new types can store
additional objects to the heap. It is advised to check the static fields of
'java.io.ProxyingConsole' to see if they are safe for build-time
initialization, and that they do not contain any sensitive data that should
not become part of the image.
2) If these objects should not be stored in the image heap, you can use
'--trace-object-instantiation=java.io.ProxyingConsole'
to find classes that instantiate these objects. Once you found such a class,
you can mark it explicitly for run time initialization with
'--initialize-at-run-time=<culprit>'
to prevent the instantiation of the object.
If you are seeing this message after upgrading to a new GraalVM release,
this means that some objects ended up in the image heap without their type
being marked with --initialize-at-build-time.
To fix this, include '--initialize-at-build-time=java.io.ProxyingConsole' in
your configuration. If the classes do not originate from your code, it is
advised to update all library or framework dependencies to the latest version
before addressing this error.
The following detailed trace displays from which field in the code the
object was reached.
Object was reached by
scanning root java.io.ProxyingConsole@64824592:
java.io.ProxyingConsole@64824592 embedded in
sun.security.util.Password$ConsoleHolder.readPassword(Password.java:177)
parsing method
sun.security.util.Password$ConsoleHolder.readPassword(Password.java:176)
reachable via the parsing context <no parsing context available>
at
org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.heap.ImageHeapScanner.onObjectReachable(ImageHeapScanner.java:618)
at
org.graalvm.nativeimage.builder/com.oracle.svm.hosted.heap.SVMImageHeapScanner.onObjectReachable(SVMImageHeapScanner.java:127)
at
org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.heap.ImageHeapScanner.lambda$markReachable$0(ImageHeapScanner.java:589)
at
org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.executeCommand(CompletionExecutor.java:166)
at
org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.lambda$executeService$0(CompletionExecutor.java:152)
at
java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.compute(ForkJoinTask.java:1753)
at
java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.compute(ForkJoinTask.java:1745)
at
java.base/java.util.concurrent.ForkJoinTask$InterruptibleTask.exec(ForkJoinTask.java:1662)
at
java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:511)
at
java.base/java.util.concurrent.ForkJoinPool.externalHelpQuiesce(ForkJoinPool.java:2509)
at
java.base/java.util.concurrent.ForkJoinPool.helpQuiescePool(ForkJoinPool.java:2543)
at
java.base/java.util.concurrent.ForkJoinPool.awaitQuiescence(ForkJoinPool.java:4159)
at
org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.complete(CompletionExecutor.java:208)
at
org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.PointsToAnalysis.doTypeflow(PointsToAnalysis.java:682)
at
org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.PointsToAnalysis.finish(PointsToAnalysis.java:648)
at
org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.AbstractAnalysisEngine.runAnalysis(AbstractAnalysisEngine.java:160)
at
org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:841)
at
org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:569)
at
org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:534)
at
org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:548)
at
org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:761)
at
org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.start(NativeImageGeneratorRunner.java:163)
at
org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:111)
Caused by:
com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: An object of
type 'java.io.ProxyingConsole' was found in the image heap. This type, however,
is marked for initialization at image run time for the following reason:
classes are initialized at run time by default.
This is not allowed for correctness reasons: All objects that are stored in
the image heap must be initialized at build time.
You now have two options to resolve this:
1) If it is intended that objects of type 'java.io.ProxyingConsole' are
persisted in the image heap, add
'--initialize-at-build-time=java.io.ProxyingConsole'
to the native-image arguments. Note that initializing new types can store
additional objects to the heap. It is advised to check the static fields of
'java.io.ProxyingConsole' to see if they are safe for build-time
initialization, and that they do not contain any sensitive data that should
not become part of the image.
2) If these objects should not be stored in the image heap, you can use
'--trace-object-instantiation=java.io.ProxyingConsole'
to find classes that instantiate these objects. Once you found such a class,
you can mark it explicitly for run time initialization with
'--initialize-at-run-time=<culprit>'
to prevent the instantiation of the object.
If you are seeing this message after upgrading to a new GraalVM release,
this means that some objects ended up in the image heap without their type
being marked with --initialize-at-build-time.
To fix this, include '--initialize-at-build-time=java.io.ProxyingConsole' in
your configuration. If the classes do not originate from your code, it is
advised to update all library or framework dependencies to the latest version
before addressing this error.
The following detailed trace displays from which field in the code the
object was reached.
at
org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.ClassInitializationFeature.checkImageHeapInstance(ClassInitializationFeature.java:205)
at
org.graalvm.nativeimage.builder/com.oracle.svm.hosted.SVMHost.validateReachableObject(SVMHost.java:371)
at
org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.heap.ImageHeapScanner.onObjectReachable(ImageHeapScanner.java:607)
... 22 more
------------------------------------------------------------------------------------------------------------------------
1.3s (8.0% of total time) in 131 GCs | Peak RSS:
5.74GB | CPU load: 10.93
========================================================================================================================
Failed generating 'seata-server-2.8.0-SNAPSHOT-darwin-arm64' after 15.5s.
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 26.730 s (Wall Clock)
[INFO] Finished at: 2026-09-18T08:49:35+08:00
[INFO]
------------------------------------------------------------------------
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]