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

Quarkus Master - Classes that should be initialized at run time got initialized during image building #1126

Closed
jamesnetherton opened this issue Apr 23, 2020 · 1 comment
Assignees

Comments

@jamesnetherton
Copy link
Contributor

I observed some failures building camel-quarkus with the latest Quarkus 999-SNAPSHOT.

This happens on at least the HTTP and Telegram native tests. Given this is related to Netty, it's likely it fails for other extensions too.

INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on GraalVM Version 19.3.1 CE
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] docker run -v camel-quarkus/integration-tests/http/target/camel-quarkus-integration-test-http-1.1.0-SNAPSHOT-native-image-source-jar:/project:z --env LANG=C --user 1000:1000 --rm quay.io/quarkus/ubi-quarkus-native-image:19.3.1-java11 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dsun.nio.ch.maxUpdateArraySize=100 -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-Dfile.encoding=UTF-8 --initialize-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime -H:+JNI -jar camel-quarkus-integration-test-http-1.1.0-SNAPSHOT-runner.jar -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:-AddAllCharsets -H:-IncludeAllTimeZones -H:EnableURLProtocols=http,https --enable-all-security-services --no-server -H:-UseServiceLoaderFeature -H:+StackTrace camel-quarkus-integration-test-http-1.1.0-SNAPSHOT-runner
[camel-quarkus-integration-test-http-1.1.0-SNAPSHOT-runner:24]    classlist:   8,447.56 ms
[camel-quarkus-integration-test-http-1.1.0-SNAPSHOT-runner:24]        (cap):   1,372.91 ms
[camel-quarkus-integration-test-http-1.1.0-SNAPSHOT-runner:24]        setup:   3,101.71 ms
06:43:27,457 INFO  [io.und.web.jsr] UT026003: Adding annotated server endpoint class org.apache.camel.quarkus.component.http.it.GreetingServerEndpoint for path /ahc-ws/greeting
[camel-quarkus-integration-test-http-1.1.0-SNAPSHOT-runner:24]     analysis:  21,620.84 ms
Error: Classes that should be initialized at run time got initialized during image building:
 io.netty.util.concurrent.GlobalEventExecutor the class was requested to be initialized at build time (from the command line). To see why io.netty.util.concurrent.GlobalEventExecutor got initialized use -H:+TraceClassInitialization
io.netty.util.concurrent.ScheduledFutureTask the class was requested to be initialized at build time (from the command line). To see why io.netty.util.concurrent.ScheduledFutureTask got initialized use -H:+TraceClassInitialization
io.netty.util.concurrent.ImmediateEventExecutor the class was requested to be initialized at build time (from the command line). To see why io.netty.util.concurrent.ImmediateEventExecutor got initialized use -H:+TraceClassInitialization

com.oracle.svm.core.util.UserError$UserException: Classes that should be initialized at run time got initialized during image building:
 io.netty.util.concurrent.GlobalEventExecutor the class was requested to be initialized at build time (from the command line). To see why io.netty.util.concurrent.GlobalEventExecutor got initialized use -H:+TraceClassInitialization
io.netty.util.concurrent.ScheduledFutureTask the class was requested to be initialized at build time (from the command line). To see why io.netty.util.concurrent.ScheduledFutureTask got initialized use -H:+TraceClassInitialization
io.netty.util.concurrent.ImmediateEventExecutor the class was requested to be initialized at build time (from the command line). To see why io.netty.util.concurrent.ImmediateEventExecutor got initialized use -H:+TraceClassInitialization

	at com.oracle.svm.core.util.UserError.abort(UserError.java:65)
	at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.checkDelayedInitialization(ConfigurableClassInitialization.java:510)
	at com.oracle.svm.hosted.classinitialization.ClassInitializationFeature.duringAnalysis(ClassInitializationFeature.java:187)
	at com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$8(NativeImageGenerator.java:710)
	at com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:63)
	at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:710)
	at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:530)
	at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:445)
	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:177)

@lburgazzoli
Copy link
Contributor

I don't know if this is the culprit but there's a number of io.netty.util.concurrent classes here: https://github.com/AsyncHttpClient/async-http-client/blob/master/client/src/main/java/org/asynchttpclient/netty/channel/ChannelManager.java

@jamesnetherton jamesnetherton self-assigned this Apr 23, 2020
ppalaga pushed a commit to ppalaga/camel-quarkus that referenced this issue May 12, 2020
jamesnetherton added a commit to jamesnetherton/camel-quarkus that referenced this issue Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants