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

Unsupported type MethodAccessorGenerator on several extensions #15085

Closed
Sgitario opened this issue Feb 15, 2021 · 4 comments · Fixed by #15145
Closed

Unsupported type MethodAccessorGenerator on several extensions #15085

Sgitario opened this issue Feb 15, 2021 · 4 comments · Fixed by #15145
Assignees
Labels
kind/bug Something isn't working triage/needs-triage
Milestone

Comments

@Sgitario
Copy link
Contributor

Describe the bug
We're getting failures when building a Quarkus app with some extensions (it happens with either Artemis, Camel, and maybe more). See steps about to reproduce it.

This is happening since this commit has been merged into master: #15043
The deleted file JavaIOSubstitutions.java was introduced to exactly avoid the issue that we're experiencing again: #9633.

Note that I've checked that when reverting this commit, everything works as expected.

Therefore, this is a regression issue and the above commit should be reverted.

The error is:

[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on GraalVM Version 20.3.1 (Java Version 11.0.10+8-jvmci-20.3-b09)
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] docker run -v /home/runner/work/beefy-scenarios/beefy-scenarios/003-quarkus-many-extensions/target/003-quarkus-many-extensions-1.0.0-SNAPSHOT-native-image-source-jar:/project:z --env LANG=C --user 1001:121 --rm quay.io/quarkus/ubi-quarkus-native-image:20.3.1-java11 -J-DCoordinatorEnvironmentBean.transactionStatusManagerEnable=false -J-Dcom.mysql.cj.disableAbandonedConnectionCleanup=true -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true -J-Drx.unsafe-disable=true -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=1 -J-Duser.language=en -J-Duser.country= -J-Dfile.encoding=UTF-8 --initialize-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy\$BySpaceAndTime -H:+JNI -H:+AllowFoldMethods -jar 003-quarkus-many-extensions-1.0.0-SNAPSHOT-runner.jar -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -J-Xmx4g -H:+AddAllCharsets -H:EnableURLProtocols=http,https --enable-all-security-services --no-server -H:-UseServiceLoaderFeature -H:+StackTrace 003-quarkus-many-extensions-1.0.0-SNAPSHOT-runner
[003-quarkus-many-extensions-1.0.0-SNAPSHOT-runner:24]    classlist:  15,995.86 ms,  1.70 GB
[003-quarkus-many-extensions-1.0.0-SNAPSHOT-runner:24]        (cap):     833.96 ms,  1.70 GB
[003-quarkus-many-extensions-1.0.0-SNAPSHOT-runner:24]        setup:   3,391.77 ms,  1.70 GB
15:29:20,115 INFO  [org.hib.val.int.uti.Version] HV000001: Hibernate Validator 6.2.0.Final
15:30:21,847 INFO  [org.hib.Version] HHH000412: Hibernate ORM core version 5.4.28.Final
15:30:28,848 INFO  [org.jbo.threads] JBoss Threads version 3.2.0.Final
[003-quarkus-many-extensions-1.0.0-SNAPSHOT-runner:24]     (clinit):   1,758.61 ms,  2.90 GB
[003-quarkus-many-extensions-1.0.0-SNAPSHOT-runner:24]   (typeflow):  70,333.47 ms,  2.90 GB
[003-quarkus-many-extensions-1.0.0-SNAPSHOT-runner:24]    (objects):  63,891.73 ms,  2.90 GB
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 jdk.internal.reflect.ReflectionFactory.generateConstructor(ReflectionFactory.java:513)
Call path from entry point to jdk.internal.reflect.ReflectionFactory.generateConstructor(Class, Constructor): 
	at jdk.internal.reflect.ReflectionFactory.generateConstructor(ReflectionFactory.java:513)
	at jdk.internal.reflect.ReflectionFactory.newConstructorForSerialization(ReflectionFactory.java:506)
	at java.io.ObjectStreamClass.getSerializableConstructor(ObjectStreamClass.java:1531)
	at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:509)
	at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:484)
	at com.oracle.svm.core.jdk.Target_java_security_AccessController.doPrivileged(SecuritySubstitutions.java:102)
	at sun.security.ssl.TransportContext$NotifyHandshake.run(TransportContext.java:659)
	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
	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 jdk.internal.reflect.MethodAccessorGenerator is reachable
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
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  03:48 min
[INFO] Finished at: 2021-02-15T15:31:40Z
[INFO] ------------------------------------------------------------------------
Error:  Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project 003-quarkus-many-extensions: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
Error: r]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: java.lang.RuntimeException: Failed to build native image
Error:  	at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:309)
Error:  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Error:  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
Error:  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Error:  	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
Error:  	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:920)
Error:  	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
Error:  	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2415)
Error:  	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
Error:  	at java.base/java.lang.Thread.run(Thread.java:834)
Error:  	at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Error:  Caused by: java.lang.RuntimeException: Image generation failed. Exit code: 1
Error:  	at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.imageGenerationFailed(NativeImageBuildStep.java:576)
Error:  	at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:277)
Error:  	... 10 more
Error:  -> [Help 1]

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/quarkus-qe/beefy-scenarios
  2. cd beefy-scenarios/003-quarkus-many-extensions
  3. mvn clean verify -Dnative -Dquarkus.native.container-build=true -Dquarkus.native.native-image-xmx=4g -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-native-image:20.3.1-java11

Environment (please complete the following information):

  • Output of java -version: 11
  • GraalVM version (if different from Java): 20.3.1
  • Quarkus version or git rev: 999-SNAPHOT
@Sgitario Sgitario added the kind/bug Something isn't working label Feb 15, 2021
@Sgitario
Copy link
Contributor Author

@stuartwdouglas
Copy link
Member

stuartwdouglas commented Feb 15, 2021

This is because 20.3 is being used instead of 21.0. @gsmet are we still planning on supporting 20.3 for the next release?

@galderz
Copy link
Member

galderz commented Feb 17, 2021

@stuartwdouglas Yes

@gsmet
Copy link
Member

gsmet commented Feb 17, 2021

I created #15145 .

@quarkus-bot quarkus-bot bot added this to the 1.13 - master milestone Feb 19, 2021
@gsmet gsmet modified the milestones: 1.13 - master, 1.12.1.Final Feb 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working triage/needs-triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants