-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[GR-44056] Cannot invoke "java.util.Set.iterator()" because "triggers" is null. #5868
Comments
Hi @ddobrin, I'm having troubles following your instructions to reproduce the issue. When I check out the code, I seem to be able to build the application without a problem. What dependencies do I need to remove? I'm assuming with Java agent you mean the Trace Agent from Native Image? How do I run the application with the agent? Also, could you please provide a longer stack trace? It seems that you are hitting this line with graal/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/meta/HostedUniverse.java Line 369 in 45e350a
|
@fniephaus You should be able to reproduce the failure if you remove these dependencies from the pom. |
That's what I tried but the builds still succeeds on my Linux AMD64 machine. |
I can trigger this error but it's not the one reported by @ddobrin:
|
Let me double-check the failure that I saw on my Intel Mac. |
The failure that I see is the following:
This aligns with the title suggesting that there are some situations where #5318 can still occur. To reproduce the
I haven't tried this though. |
Hi @fniephaus :
Built with Failure:
|
I can reproduce the
Will look into why the build requires and fails due to |
I think I nailed down the problem: it seems that <plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<configuration>
<buildArgs>
<arg>-H:+RunReachabilityHandlersConcurrently</arg>
</buildArgs>
</configuration>
</plugin> Nonetheless, I will ask the team to look into the problem that happens when |
Tested it, thank you very much @fniephaus Interesting to see what the analysis would bring |
Probably the same issue: Describe the issue When running native-image with Issue first reported in apache/camel-quarkus#5006 @fniephaus this is probably a duplicate of #5868 Steps to reproduce the issue
It might require multiple runs untill a crash. Describe GraalVM and your environment:
More details I tried reproducing the issue on GraalVM 22.3 with no success.
Closing #6904 as duplicate |
I am having a similar issue, after adding a
|
We recently merged #6985, which ensures that |
@fniephaus I don't see how #6985 could help in this case. I can still reproduce the issue as described in #5868 (comment) with latest Note that this is compiling a simple HelloWorld: public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World!");
}
} No JNI/reflection registrations. GraalVM Native Image Error ReportBuild Output
Stack Tracecom.oracle.svm.core.util.VMError$HostedError: InternalFeature defined by com.oracle.svm.hosted.ReachabilityHandlerFeature unexpectedly failed with a(n) java.lang.NullPointerException
at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:86)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.FeatureHandler.handleFeatureError(FeatureHandler.java:287)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:92)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$12(NativeImageGenerator.java:793)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.AbstractAnalysisEngine.runAnalysis(AbstractAnalysisEngine.java:172)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:790)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:588)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:553)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:524)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:699)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.start(NativeImageGeneratorRunner.java:139)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:94)
Caused by: java.lang.NullPointerException: Cannot invoke "java.util.Set.iterator()" because "triggers" is null
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.ReachabilityHandlerFeature.processReachable(ReachabilityHandlerFeature.java:173)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.ReachabilityHandlerFeature.duringAnalysis(ReachabilityHandlerFeature.java:128)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$11(NativeImageGenerator.java:793)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:90)
... 9 more
Caused by:
com.oracle.svm.core.util.VMError$HostedError: InternalFeature defined by com.oracle.svm.hosted.ReachabilityHandlerFeature unexpectedly failed with a(n) java.lang.NullPointerException
at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:86)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.FeatureHandler.handleFeatureError(FeatureHandler.java:287)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:92)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$12(NativeImageGenerator.java:793)
at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.AbstractAnalysisEngine.runAnalysis(AbstractAnalysisEngine.java:172)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:790)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:588)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:553)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:524)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:699)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.start(NativeImageGeneratorRunner.java:139)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:94)
Caused by: java.lang.NullPointerException: Cannot invoke "java.util.Set.iterator()" because "triggers" is null
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.ReachabilityHandlerFeature.processReachable(ReachabilityHandlerFeature.java:173)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.ReachabilityHandlerFeature.duringAnalysis(ReachabilityHandlerFeature.java:128)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$11(NativeImageGenerator.java:793)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:90)
... 9 more GraalVM Setup
GraalVM
|
Oh I think you are right and I got confused. |
Prevent data races in reachability handlers registration when using `-H:-RunReachabilityHandlersConcurrently`. Closes oracle#5868
@fniephaus I opened #7736 which appears to resolve the issue. Could you please assign it to the appropriate engineer for review? Thank you. |
Prevent data races in reachability handlers registration when using `-H:-RunReachabilityHandlersConcurrently`. Closes oracle#5868
Prevent data races in reachability handlers registration when using `-H:-RunReachabilityHandlersConcurrently`. Closes oracle#5868
I am getting error when I am going hit api by aws proxy http Lambda function. java.lang.NullPointerException |
Prevent data races in reachability handlers registration when using `-H:-RunReachabilityHandlersConcurrently`. Closes oracle#5868 (cherry picked from commit 777cb82)
Reported today in Spring Boot first: Spring Boot 3 Native Needs RomeTools and Kotlin Serialization JARs.
Issue can be reproduced on Mac Intel and Mac M1 and Linux.
The repro is here
Env: Spring Boot 3.0.2, GraalVM 22.3.
Java version:
openjdk version "17.0.5" 2022-10-18
OpenJDK Runtime Environment GraalVM CE 22.3.0 (build 17.0.5+8-jvmci-22.3-b08)
OpenJDK 64-Bit Server VM GraalVM CE 22.3.0 (build 17.0.5+8-jvmci-22.3-b08, mixed mode, sharing)
The service uses Google Native Java Client Libraries and accesses Vision and Firestore; uses the latest Google BOM.
Native image builds and works fine when adding rometools & kotlinx to the pom.xml:
...
com.rometools
rome
...
org.jetbrains.kotlinx
kotlinx-serialization-core
Without the added dependencies, it can be built with the Java agent, collect the generated *.json files, copy them to src/main/resources/META-INF and build the native image, which will fail with:
[6/7] Compiling methods... [********] (65.0s @ 6.35GB)
Fatal error: java.lang.NullPointerException: Cannot invoke "jdk.vm.ci.meta.JavaField.format(String)" because "field" is null
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.meta.HostedUniverse.lookup(HostedUniverse.java:369)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.meta.HostedUniverse.lookup(HostedUniverse.java:282)
These dependency requirements did not exist in Boot 3 M5, however libraries have evolved since.
The text was updated successfully, but these errors were encountered: