Skip to content
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

[native] Integration test "rest-client" fails with GraalVM 20.3.1.2 #16128

Closed
zakkak opened this issue Mar 30, 2021 · 1 comment · Fixed by #16216
Closed

[native] Integration test "rest-client" fails with GraalVM 20.3.1.2 #16128

zakkak opened this issue Mar 30, 2021 · 1 comment · Fixed by #16216

Comments

@zakkak
Copy link
Contributor

zakkak commented Mar 30, 2021

Describe the bug

Native image of integration test rest-client fails to build with GraalVM 20.3.1.2

Expected behavior

The native image should buils and the test should pass.

Actual behavior

The native image fails to build with:

[quarkus-integration-test-rest-client-999-SNAPSHOT-runner:20]    classlist:   4,130.34 ms,  1.18 GB
[quarkus-integration-test-rest-client-999-SNAPSHOT-runner:20]        (cap):   1,242.44 ms,  1.18 GB
[quarkus-integration-test-rest-client-999-SNAPSHOT-runner:20]        setup:   4,100.21 ms,  1.18 GB
21:04:57,792 INFO  [org.jbo.threads] JBoss Threads version 3.2.0.Final
[quarkus-integration-test-rest-client-999-SNAPSHOT-runner:20]     (clinit):   1,082.62 ms,  3.80 GB
[quarkus-integration-test-rest-client-999-SNAPSHOT-runner:20]   (typeflow):  29,824.06 ms,  3.80 GB
[quarkus-integration-test-rest-client-999-SNAPSHOT-runner:20]    (objects):  30,768.11 ms,  3.80 GB
[quarkus-integration-test-rest-client-999-SNAPSHOT-runner:20]   (features):   1,540.44 ms,  3.80 GB
[quarkus-integration-test-rest-client-999-SNAPSHOT-runner:20]     analysis:  66,297.92 ms,  3.80 GB
Error: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported type java.lang.invoke.MemberName is reachable: All methods from java.lang.invoke should have been replaced during image building.
To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The unsupported element is then reported at run time when it is accessed the first time.
Detailed message:
Trace: 
	at parsing java.lang.invoke.MethodHandles$Lookup.unreflectSpecial(MethodHandles.java:1795)
Call path from entry point to java.lang.invoke.MethodHandles$Lookup.unreflectSpecial(Method, Class): 
	at java.lang.invoke.MethodHandles$Lookup.unreflectSpecial(MethodHandles.java:1793)
	at io.smallrye.faulttolerance.DefaultMethodFallbackProvider.getFallback(DefaultMethodFallbackProvider.java:22)
	at io.smallrye.faulttolerance.FaultToleranceInterceptor.lambda$prepareFallbackFunction$8(FaultToleranceInterceptor.java:470)
	at io.smallrye.faulttolerance.FaultToleranceInterceptor$$Lambda$1083/0x00000007c1743c40.call(Unknown Source)
	at io.smallrye.faulttolerance.core.fallback.CompletionStageFallback.lambda$apply$0(CompletionStageFallback.java:50)
	at io.smallrye.faulttolerance.core.fallback.CompletionStageFallback$$Lambda$1169/0x00000007c1760840.accept(Unknown Source)
	at java.util.stream.ReduceOps$4ReducingSink.accept(ReduceOps.java:220)
	at java.util.ArrayList.forEach(ArrayList.java:1541)
	at io.quarkus.micrometer.runtime.MicrometerRecorder$1.run(MicrometerRecorder.java:136)
	at java.lang.Thread.run(Thread.java:834)
	at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:519)
	at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
	at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0)

com.oracle.svm.core.util.UserError$UserException: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported type java.lang.invoke.MemberName is reachable: All methods from java.lang.invoke should have been replaced during image building.
To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The unsupported element is then reported at run time when it is accessed the first time.
Detailed message:
Trace: 
	at parsing java.lang.invoke.MethodHandles$Lookup.unreflectSpecial(MethodHandles.java:1795)
Call path from entry point to java.lang.invoke.MethodHandles$Lookup.unreflectSpecial(Method, Class): 
	at java.lang.invoke.MethodHandles$Lookup.unreflectSpecial(MethodHandles.java:1793)
	at io.smallrye.faulttolerance.DefaultMethodFallbackProvider.getFallback(DefaultMethodFallbackProvider.java:22)
	at io.smallrye.faulttolerance.FaultToleranceInterceptor.lambda$prepareFallbackFunction$8(FaultToleranceInterceptor.java:470)
	at io.smallrye.faulttolerance.FaultToleranceInterceptor$$Lambda$1083/0x00000007c1743c40.call(Unknown Source)
	at io.smallrye.faulttolerance.core.fallback.CompletionStageFallback.lambda$apply$0(CompletionStageFallback.java:50)
	at io.smallrye.faulttolerance.core.fallback.CompletionStageFallback$$Lambda$1169/0x00000007c1760840.accept(Unknown Source)
	at java.util.stream.ReduceOps$4ReducingSink.accept(ReduceOps.java:220)
	at java.util.ArrayList.forEach(ArrayList.java:1541)
	at io.quarkus.micrometer.runtime.MicrometerRecorder$1.run(MicrometerRecorder.java:136)
	at java.lang.Thread.run(Thread.java:834)
	at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:519)
	at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
	at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0)

	at com.oracle.svm.core.util.UserError.abort(UserError.java:82)
	at com.oracle.svm.hosted.FallbackFeature.reportAsFallback(FallbackFeature.java:217)
	at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:766)
	at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:556)
	at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:469)
	at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1407)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported type java.lang.invoke.MemberName is reachable: All methods from java.lang.invoke should have been replaced during image building.
To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The unsupported element is then reported at run time when it is accessed the first time.
Detailed message:
Trace: 
	at parsing java.lang.invoke.MethodHandles$Lookup.unreflectSpecial(MethodHandles.java:1795)
Call path from entry point to java.lang.invoke.MethodHandles$Lookup.unreflectSpecial(Method, Class): 
	at java.lang.invoke.MethodHandles$Lookup.unreflectSpecial(MethodHandles.java:1793)
	at io.smallrye.faulttolerance.DefaultMethodFallbackProvider.getFallback(DefaultMethodFallbackProvider.java:22)
	at io.smallrye.faulttolerance.FaultToleranceInterceptor.lambda$prepareFallbackFunction$8(FaultToleranceInterceptor.java:470)
	at io.smallrye.faulttolerance.FaultToleranceInterceptor$$Lambda$1083/0x00000007c1743c40.call(Unknown Source)
	at io.smallrye.faulttolerance.core.fallback.CompletionStageFallback.lambda$apply$0(CompletionStageFallback.java:50)
	at io.smallrye.faulttolerance.core.fallback.CompletionStageFallback$$Lambda$1169/0x00000007c1760840.accept(Unknown Source)
	at java.util.stream.ReduceOps$4ReducingSink.accept(ReduceOps.java:220)
	at java.util.ArrayList.forEach(ArrayList.java:1541)
	at io.quarkus.micrometer.runtime.MicrometerRecorder$1.run(MicrometerRecorder.java:136)
	at java.lang.Thread.run(Thread.java:834)
	at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:519)
	at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
	at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0)

	at com.oracle.graal.pointsto.constraints.UnsupportedFeatures.report(UnsupportedFeatures.java:126)
	at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:763)
	... 8 more
Caused by: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported type java.lang.invoke.MemberName is reachable: All methods from java.lang.invoke should have been replaced during image building.
To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The unsupported element is then reported at run time when it is accessed the first time.
	at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.lookup(AnnotationSubstitutionProcessor.java:119)
	at com.oracle.graal.pointsto.infrastructure.SubstitutionProcessor$ChainedSubstitutionProcessor.lookup(SubstitutionProcessor.java:113)
	at com.oracle.graal.pointsto.infrastructure.SubstitutionProcessor$ChainedSubstitutionProcessor.lookup(SubstitutionProcessor.java:113)
	at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:207)
	at com.oracle.graal.pointsto.infrastructure.WrappedConstantPool.lookupType(WrappedConstantPool.java:164)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.lookupType(BytecodeParser.java:4251)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genNewInstance(BytecodeParser.java:4566)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5364)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3400)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3207)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:1092)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:986)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:84)
	at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase.run(SharedGraphBuilderPhase.java:70)
	at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.run(Phase.java:49)
	at jdk.internal.vm.compiler/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:212)
	at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:42)
	at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:38)
	at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:223)
	at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:357)
	at com.oracle.graal.pointsto.flow.MethodTypeFlow.doParse(MethodTypeFlow.java:313)
	at com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureParsed(MethodTypeFlow.java:302)
	at com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:103)
	at com.oracle.graal.pointsto.DefaultAnalysisPolicy$DefaultSpecialInvokeTypeFlow.onObservedUpdate(DefaultAnalysisPolicy.java:368)
	at com.oracle.graal.pointsto.flow.TypeFlow.notifyObservers(TypeFlow.java:470)
	at com.oracle.graal.pointsto.flow.TypeFlow.update(TypeFlow.java:542)
	at com.oracle.graal.pointsto.BigBang$2.run(BigBang.java:547)
	at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:173)
	at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
	... 5 more
Error: Image build request failed with exit status 1

To Reproduce

./mvnw clean verify -Dnative -Dnative.surefire.skip -Dquarkus.native.container-build=true -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-native-image:20.3-java11 -pl integration-tests/rest-client

Environment (please complete the following information):

Output of uname -a or ver

Linux 5.10.20-200.fc33.x86_64

Output of java -version

11.0.10+9

GraalVM version (if different from Java)

20.3.1.2

Quarkus version or git rev

main: 06e7f62

Build tool (ie. output of mvnw --version or gradlew --version)

Maven 3.6.3

@zakkak zakkak added the kind/bug Something isn't working label Mar 30, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Mar 30, 2021

/cc @phillip-kruger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant