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

Fix smallrye ConfigValidationException not being handled properly at Quarkus startup #37543

Merged
merged 1 commit into from Dec 21, 2023

Conversation

MaciejDromin
Copy link
Contributor

@MaciejDromin MaciejDromin commented Dec 5, 2023

It fixes #36376
It was needed to wrap io.smallrye.config.ConfigValidationException exception with io.quarkus.runtime.configuration.ConfigurationException
And then as it turned out every exception thrown by RuntimeConfigSetup#deploy method was automatically wrapped into RuntimeException which later ApplicationLifecycleManager could handle. Screenshot shows how it is now behaving.

fixed

@quarkus-bot quarkus-bot bot added the area/core label Dec 5, 2023
Copy link
Member

@yrodiere yrodiere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this!

Here are a few comments. I think the changes to generated code, in particular, could be made a bit safer... This is very impacting code :)

@MaciejDromin
Copy link
Contributor Author

@yrodiere I changed the things from your review, please have a look now :)

@yrodiere yrodiere self-requested a review December 6, 2023 16:55
@yrodiere yrodiere dismissed their stale review December 6, 2023 16:55

Comments addressed

@quarkus-bot

This comment has been minimized.

Copy link
Member

@yrodiere yrodiere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is looking good to me.

I rebased to avoid the merge commit, and marked as draft while we try to figure out the test failures.

I wasn't able to check this works locally, because an unrelated regression on main is preventing my reproducer from starting. I'll give it another try and will report back.

@MaciejDromin
Copy link
Contributor Author

Thanks for Your help, yeah yesterday I wanted to sync up with main by pulling new changes and by mistake I clicked "Update branch" on Github which merged main into my branch...
I will take a look at those tests later, when I run clean build yesterday everything seemed fine

@yrodiere
Copy link
Member

yrodiere commented Dec 7, 2023

So I tried to test this locally, unfortunately I can't because of a different regression: #37193 (comment)

Will try again later, otherwise I'll have to ask someone else to approve.

I will take a look at those tests later

Thanks. The failing tests mention "Validation" failures, so it looks related, but it might just be that they expect a different error message to be produced, in which case updating the expectations could be fine.

@quarkus-bot

This comment has been minimized.

@MaciejDromin
Copy link
Contributor Author

Checked those tests, issues occur both at main and mine branch, so it seems like some regression (not the issue related to my changes).
class TransactionJdbcObjectStoreValidationFailureTest fails because the exception is NoSuchElementException instead of ConfigurationException
class OpaqueTokenVerificationWithUserInfoValidationTest fails due to some runtime exception where underneath is exception that is supposed to be caught
java.util.concurrent.CompletionException: java.lang.RuntimeException: Unable to start Quarkus test resource class io.quarkus.test.keycloak.server.KeycloakTestResourceLifecycleManager

@yrodiere
Copy link
Member

yrodiere commented Dec 8, 2023

While OpaqueTokenVerificationWithUserInfoValidationTest indeed looks like a flaky test, its failure looks very much related to this PR... At least I can see how such code could break with this PR.
I could not find any evidence of TransactionJdbcObjectStoreValidationFailureTest failing in other PRs, or in recent builds of main...

Did the test pass locally for you?

@MaciejDromin
Copy link
Contributor Author

You are right, when I tested TransactionJdbcObjectStoreValidationFailureTest failure yesterday there were some artifacts left from build of mine custom branch resulting in it failing even on main branch. Today I retested this clearing all cache and I see that this issue is not present on main only on my branch. I will try to investigate this issue today :)

@MaciejDromin
Copy link
Contributor Author

I had a second look at this failing test TransactionJdbcObjectStoreValidationFailureTest and to be honest I'm confused... On main branch it is working, rootCause is an instance of ConfigurationException and test is passing
On my branch rootCause is also of type ConfigurationException but instanceOf returns false for some unknown reason :/ Do you have any ideas why is this happening? (Screenshots in attachment)
FYI I will be away for couple of days, will be back at tuesday
my-branch-instanceof
my-branch-error

@yrodiere
Copy link
Member

On my branch rootCause is also of type ConfigurationException but instanceOf returns false for some unknown reason :/ Do you have any ideas why is this happening?

Yes, this is a telltale sign that multiple classloaders are involved, each with its own definition of ConfigurationException.

TBH I'm pretty sure there's a problem with classloading in QuarkusUnitTest, but having spent weeks trying to improve things there, I can tell you: you don't want to mess with that. It's not perfect, but super hard to improve.

The question is: which instanceof returns false?

If the instanceof in ApplicationLifecycleManager works fine, but the one in the test doesn't, then it's simply the test using a different classloader than the application it started, and then IMO we can do a dirty assertion like e.getClass().getName().equals(ConfigurationException.class.getName()) instead of an instanceof.

If the instanceof in ApplicationLifecycleManager or one of the generated classes doesn't work, then it's much more problematic as this patch may have introduced classloader issues (how though? :/) We'd have to see if the ConfigurationException can possibly be thrown higher up the stack, where we might be using the same classloader as wherever we catch the exception.

@quarkus-bot quarkus-bot bot added the area/narayana Transactions / Narayana label Dec 13, 2023
@MaciejDromin
Copy link
Contributor Author

MaciejDromin commented Dec 13, 2023

If the instanceof in ApplicationLifecycleManager works fine, but the one in the test doesn't, then it's simply the test using a different classloader than the application it started, and then IMO we can do a dirty assertion like e.getClass().getName().equals(ConfigurationException.class.getName()) instead of an instanceof.

Thanks for explanation, now I understand why this test was it failing (this is something new for me).
instanceof in test were failing, I changed to what You suggested retested it and now test is passing

Copy link
Member

@yrodiere yrodiere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@yrodiere yrodiere added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Dec 14, 2023
@yrodiere yrodiere marked this pull request as ready for review December 14, 2023 10:40
@quarkus-bot

This comment has been minimized.

@MaciejDromin
Copy link
Contributor Author

LGTM, thanks!

Thanks! If there is anything more that I have to do in order to merge this please let me know :)

@yrodiere
Copy link
Member

Thanks! If there is anything more that I have to do in order to merge this please let me know :)

Well now that you mention it... there seem to be new tests failing with your latest changes :x

I just force-pushed to your branch to rebase on the latest main just in case the problems were unrelated... CI does that sometimes :/ But if there are still failures on this new run, we'll need to have a closer look.

@quarkus-bot

This comment has been minimized.

@quarkus-bot quarkus-bot bot added area/grpc gRPC area/hibernate-orm Hibernate ORM labels Dec 17, 2023
@MaciejDromin
Copy link
Contributor Author

Well now that you mention it... there seem to be new tests failing with your latest changes :x

I just force-pushed to your branch to rebase on the latest main just in case the problems were unrelated... CI does that sometimes :/ But if there are still failures on this new run, we'll need to have a closer look.

I had a look into why they were failing and it was due to the same reason - it was checking in tests if throwable was an instance of ConfigurationException and was returning false. To fix them I did the same dirty assertion with class name and now it seemed okay :)

@MaciejDromin
Copy link
Contributor Author

MaciejDromin commented Dec 17, 2023

The build just finished and I see that now different tests having the same instanceof ConfigurationException are failing now. I think that there is no point of using this assertion hack - what is needed is this instanceof to be working properly. Do You maybe have an idea how to make this to work?

@yrodiere
Copy link
Member

The build just finished and I see that now different tests having the same instanceof ConfigurationException are failing now. I think that there is no point of using this assertion hack - what is needed is this instanceof to be working properly.

Agreed, that was a reasonable strategy with only one or two tests failing, but not if it means patching the whole codebase.

Do You maybe have an idea how to make this to work?

I just had a look at the code, and FWIW there is a way to handle instanceof differently, in a way that would work better across classloaders.

ConfigurationException extends ConfigurationProblem, which is from a different JAR, quarkus-development-mode-spi. Critically, that JAR is "parent-first", which in Quarkus lingo basically means it's loaded only once and its class definitions are shared among all classloaders... So each classloader might have its own definition of ConfigurationException, but they should share the same definition of ConfigurationProblem.

That means you might be able to to instanceof ConfigurationProblem more easily than instanceof ConfigurationException.

Now, obviously, we don't want to change all tests that do an instanceof ConfigurationException to do an instanceof ConfigurationProblem instead. So the above could just be one tool in a more involved solution.

What I'm wondering is why all those tests are failing... the only thing you did is to wrap ConfigurationValidationException with ConfigurationException... So why would pre-existing tests that expected ConfigurationException be affected? There is no ConfigurationValidationException involved there, so your changes should not affect the behavior... ? I think you'd need to find out what's happening before this can be solved :/

@MaciejDromin
Copy link
Contributor Author

MaciejDromin commented Dec 18, 2023

I think I was able to find the issue and fix it (not sure why it was happening in the first place tho)
So, the issue was actually checking and rethrowing this exception in MainClassBuildStep, I removed the logic from there and changed ApplicationLifecycleManager where It was getting a rootCause - now it checks if one item up the stack trace is an instanceof ConfigurationException if so, we know that it is wrapped ConfigValidationException so we get this, else we get rootCause as usual. Attached screenshot shows how this error is handled now.
Please have a second look and let me know if this approach is acceptable. In the meantime I will wait for build to finish :)
stack

Copy link
Member

@yrodiere yrodiere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. This could probably be made a bit more future-proof (see comment), but this seems relatively safe from side-effects, so let's see if it works :)

That being said, if we have to go through such hoops, we might want to reconsider whether instanceof really is the right way to do this... I mean, it's entirely possible that e.g. the Hibernate ORM extension would throw a ConfigurationException when it starts, because some configuration is incorrect, and in that case it would be perfectly safe to display the current config profile.

Let's step back a bit: the point of this detection code is to detect whether ConfigUtils.getProfiles() will return a correct value. But we can't really know here, because we don't know how far the application managed to boot.

I think I should probably open a follow-up issue to implement some kind of listener (similar to ApplicationStateNotification -- maybe we could use that?) to register the information "the application managed to create and validate configuration, error reporting code can use it safely". And we'd get rid of this attempt at guessing this information from very incomplete data.

@quarkus-bot

This comment has been minimized.

@yrodiere
Copy link
Member

Thanks, this looks good to me. Let's see what CI has to say, and merge if it's happy.

@MaciejDromin
Copy link
Contributor Author

Thanks, this looks good to me. Let's see what CI has to say, and merge if it's happy.

Fingers crossed :D Thanks @yrodiere for all the work and help!

@quarkus-bot

This comment has been minimized.

@yrodiere
Copy link
Member

The other failures are definitely unrelated, but I'm not sure about the one in oidc-client... See the stack trace below, it's unclear.

I couldn't find a similar failure in other PRs, though...

I'll rebase and attempt another build, to see if it was just a flake.


2023-12-19T16:37:03.5714188Z Error: Class initialization of io.quarkus.runner.ApplicationImpl failed. Use the option 
2023-12-19T16:37:03.5715039Z 
2023-12-19T16:37:03.5716989Z     '--initialize-at-run-time=io.quarkus.runner.ApplicationImpl'
2023-12-19T16:37:03.5718706Z 
2023-12-19T16:37:03.5719107Z  to explicitly request initialization of this class at run time.
2023-12-19T16:37:03.5720859Z com.oracle.svm.core.util.UserError$UserException: Class initialization of io.quarkus.runner.ApplicationImpl failed. Use the option 
2023-12-19T16:37:03.5723360Z 
2023-12-19T16:37:03.5723909Z     '--initialize-at-run-time=io.quarkus.runner.ApplicationImpl'
2023-12-19T16:37:03.5725592Z 
2023-12-19T16:37:03.5726059Z  to explicitly request initialization of this class at run time.
2023-12-19T16:37:03.5727414Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.UserError.abort(UserError.java:85)
2023-12-19T16:37:03.5731920Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.ClassInitializationSupport.ensureClassInitialized(ClassInitializationSupport.java:195)
2023-12-19T16:37:03.5738329Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.AllowAllHostedUsagesClassInitializationSupport.computeInitKindAndMaybeInitializeClass(AllowAllHostedUsagesClassInitializationSupport.java:191)
2023-12-19T16:37:03.5746397Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.AllowAllHostedUsagesClassInitializationSupport.computeInitKindAndMaybeInitializeClass(AllowAllHostedUsagesClassInitializationSupport.java:129)
2023-12-19T16:37:03.5752613Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.ClassInitializationSupport.maybeInitializeAtBuildTime(ClassInitializationSupport.java:161)
2023-12-19T16:37:03.5758355Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.ClassInitializationSupport.maybeInitializeAtBuildTime(ClassInitializationSupport.java:150)
2023-12-19T16:37:03.5762065Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.SVMHost.onTypeReachable(SVMHost.java:310)
2023-12-19T16:37:03.5765246Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisUniverse.onTypeReachable(AnalysisUniverse.java:699)
2023-12-19T16:37:03.5768752Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisType.lambda$new$0(AnalysisType.java:310)
2023-12-19T16:37:03.5787651Z 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
2023-12-19T16:37:03.5824088Z 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
2023-12-19T16:37:03.5900181Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.AnalysisFuture.ensureDone(AnalysisFuture.java:63)
2023-12-19T16:37:03.5902583Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisType.ensureOnTypeReachableTaskDone(AnalysisType.java:696)
2023-12-19T16:37:03.5905727Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisType.onReachable(AnalysisType.java:590)
2023-12-19T16:37:03.5907829Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.AtomicUtils.atomicSetAndRun(AtomicUtils.java:49)
2023-12-19T16:37:03.5910281Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisType.lambda$registerAsReachable$8(AnalysisType.java:562)
2023-12-19T16:37:03.5912557Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisType.forAllSuperTypes(AnalysisType.java:676)
2023-12-19T16:37:03.5914745Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisType.forAllSuperTypes(AnalysisType.java:659)
2023-12-19T16:37:03.5920216Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisType.forAllSuperTypes(AnalysisType.java:655)
2023-12-19T16:37:03.5923462Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisType.registerAsReachable(AnalysisType.java:562)
2023-12-19T16:37:03.5926473Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.reflect.ReflectionDataBuilder.registerClass(ReflectionDataBuilder.java:202)
2023-12-19T16:37:03.5930278Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.reflect.ReflectionDataBuilder.lambda$register$1(ReflectionDataBuilder.java:171)
2023-12-19T16:37:03.5935371Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.executeCommand(CompletionExecutor.java:187)
2023-12-19T16:37:03.5945694Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.lambda$executeService$0(CompletionExecutor.java:171)
2023-12-19T16:37:03.5947756Z 	at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1423)
2023-12-19T16:37:03.5949213Z 	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
2023-12-19T16:37:03.5950653Z 	at java.base/java.util.concurrent.ForkJoinPool.externalHelpQuiesce(ForkJoinPool.java:2260)
2023-12-19T16:37:03.5952156Z 	at java.base/java.util.concurrent.ForkJoinPool.helpQuiescePool(ForkJoinPool.java:2297)
2023-12-19T16:37:03.5953599Z 	at java.base/java.util.concurrent.ForkJoinPool.awaitQuiescence(ForkJoinPool.java:3565)
2023-12-19T16:37:03.5955448Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.complete(CompletionExecutor.java:237)
2023-12-19T16:37:03.5958427Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.PointsToAnalysis.doTypeflow(PointsToAnalysis.java:529)
2023-12-19T16:37:03.5961360Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.PointsToAnalysis.finish(PointsToAnalysis.java:517)
2023-12-19T16:37:03.5964434Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.AbstractAnalysisEngine.runAnalysis(AbstractAnalysisEngine.java:162)
2023-12-19T16:37:03.5977691Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:783)
2023-12-19T16:37:03.5979894Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:592)
2023-12-19T16:37:03.5981866Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:550)
2023-12-19T16:37:03.5983980Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:538)
2023-12-19T16:37:03.5986305Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:720)
2023-12-19T16:37:03.5988593Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.start(NativeImageGeneratorRunner.java:142)
2023-12-19T16:37:03.5990835Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:97)
2023-12-19T16:37:03.5992370Z Caused by: java.lang.ExceptionInInitializerError
2023-12-19T16:37:03.5993630Z 	at io.quarkus.runner.ApplicationImpl.<clinit>(Unknown Source)
2023-12-19T16:37:03.5994857Z 	at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
2023-12-19T16:37:03.5996193Z 	at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1160)
2023-12-19T16:37:03.6000310Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.ClassInitializationSupport.ensureClassInitialized(ClassInitializationSupport.java:177)
2023-12-19T16:37:03.6002628Z 	... 38 more
2023-12-19T16:37:03.6003757Z Caused by: java.lang.IllegalStateException: SRCFG00017: Configuration already registered for the given class loader
2023-12-19T16:37:03.6005708Z 	at io.smallrye.config.SmallRyeConfigProviderResolver.registerConfig(SmallRyeConfigProviderResolver.java:118)
2023-12-19T16:37:03.6007918Z 	at io.quarkus.runtime.configuration.QuarkusConfigFactory.setConfig(QuarkusConfigFactory.java:48)
2023-12-19T16:37:03.6009353Z 	at io.quarkus.runtime.generated.Config.<clinit>(Unknown Source)
2023-12-19T16:37:03.6010192Z 	... 42 more
2023-12-19T16:37:03.6012450Z Error: Class initialization of io.quarkus.runner.ApplicationImpl failed. This error is reported at image build time because class io.quarkus.runner.ApplicationImpl is registered for linking at image build time by command line and command line. Use the option 
2023-12-19T16:37:03.6014936Z 
2023-12-19T16:37:03.6015795Z     '--initialize-at-run-time=io.quarkus.runner.ApplicationImpl'
2023-12-19T16:37:03.6016459Z 
2023-12-19T16:37:03.6016883Z  to explicitly request initialization of this class at run time.
2023-12-19T16:37:03.6020208Z com.oracle.svm.core.util.UserError$UserException: Class initialization of io.quarkus.runner.ApplicationImpl failed. This error is reported at image build time because class io.quarkus.runner.ApplicationImpl is registered for linking at image build time by command line and command line. Use the option 
2023-12-19T16:37:03.6022823Z 
2023-12-19T16:37:03.6023573Z     '--initialize-at-run-time=io.quarkus.runner.ApplicationImpl'
2023-12-19T16:37:03.6024233Z 
2023-12-19T16:37:03.6024729Z  to explicitly request initialization of this class at run time.
2023-12-19T16:37:03.6027742Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.UserError.abort(UserError.java:85)
2023-12-19T16:37:03.6030101Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.ClassInitializationSupport.ensureClassInitialized(ClassInitializationSupport.java:187)
2023-12-19T16:37:03.6033924Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.AllowAllHostedUsagesClassInitializationSupport.computeInitKindAndMaybeInitializeClass(AllowAllHostedUsagesClassInitializationSupport.java:191)
2023-12-19T16:37:03.6038440Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.AllowAllHostedUsagesClassInitializationSupport.computeInitKindAndMaybeInitializeClass(AllowAllHostedUsagesClassInitializationSupport.java:129)
2023-12-19T16:37:03.6041088Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.ClassInitializationSupport.maybeInitializeAtBuildTime(ClassInitializationSupport.java:161)
2023-12-19T16:37:03.6042797Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.ClassInitializationSupport.maybeInitializeAtBuildTime(ClassInitializationSupport.java:150)
2023-12-19T16:37:03.6044096Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.SVMHost.isInitialized(SVMHost.java:318)
2023-12-19T16:37:03.6045146Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisType.isInitialized(AnalysisType.java:911)
2023-12-19T16:37:03.6046311Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.reflect.ReflectionFeature.createAccessor(ReflectionFeature.java:225)
2023-12-19T16:37:03.6047604Z 	at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
2023-12-19T16:37:03.6048957Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.reflect.ReflectionFeature.getOrCreateAccessor(ReflectionFeature.java:141)
2023-12-19T16:37:03.6050274Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.reflect.ReflectionDataBuilder.lambda$registerMethod$26(ReflectionDataBuilder.java:368)
2023-12-19T16:37:03.6051398Z 	at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
2023-12-19T16:37:03.6052653Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.reflect.ReflectionDataBuilder.registerMethod(ReflectionDataBuilder.java:367)
2023-12-19T16:37:03.6053949Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.reflect.ReflectionDataBuilder.lambda$register$16(ReflectionDataBuilder.java:275)
2023-12-19T16:37:03.6055216Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.executeCommand(CompletionExecutor.java:187)
2023-12-19T16:37:03.6056483Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.lambda$executeService$0(CompletionExecutor.java:171)
2023-12-19T16:37:03.6057603Z 	at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1423)
2023-12-19T16:37:03.6058416Z 	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
2023-12-19T16:37:03.6059203Z 	at java.base/java.util.concurrent.ForkJoinPool.externalHelpQuiesce(ForkJoinPool.java:2260)
2023-12-19T16:37:03.6060046Z 	at java.base/java.util.concurrent.ForkJoinPool.helpQuiescePool(ForkJoinPool.java:2297)
2023-12-19T16:37:03.6060887Z 	at java.base/java.util.concurrent.ForkJoinPool.awaitQuiescence(ForkJoinPool.java:3565)
2023-12-19T16:37:03.6061879Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.complete(CompletionExecutor.java:237)
2023-12-19T16:37:03.6063030Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.PointsToAnalysis.doTypeflow(PointsToAnalysis.java:529)
2023-12-19T16:37:03.6064109Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.PointsToAnalysis.finish(PointsToAnalysis.java:517)
2023-12-19T16:37:03.6065249Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.AbstractAnalysisEngine.runAnalysis(AbstractAnalysisEngine.java:162)
2023-12-19T16:37:03.6066476Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:783)
2023-12-19T16:37:03.6067624Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:592)
2023-12-19T16:37:03.6068679Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:550)
2023-12-19T16:37:03.6069831Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:538)
2023-12-19T16:37:03.6071057Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:720)
2023-12-19T16:37:03.6072230Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.start(NativeImageGeneratorRunner.java:142)
2023-12-19T16:37:03.6073408Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:97)
2023-12-19T16:37:03.6074451Z Caused by: java.lang.NoClassDefFoundError: Could not initialize class io.quarkus.runner.ApplicationImpl
2023-12-19T16:37:03.6075280Z 	at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
2023-12-19T16:37:03.6076002Z 	at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1160)
2023-12-19T16:37:03.6077193Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.ClassInitializationSupport.ensureClassInitialized(ClassInitializationSupport.java:177)
2023-12-19T16:37:03.6078167Z 	... 31 more
2023-12-19T16:37:03.6078782Z Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.ExceptionInInitializerError [in thread "main"]
2023-12-19T16:37:03.6079586Z 	at io.quarkus.runner.ApplicationImpl.<clinit>(Unknown Source)
2023-12-19T16:37:03.6080376Z 	at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
2023-12-19T16:37:03.6081105Z 	at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1160)
2023-12-19T16:37:03.6082291Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.ClassInitializationSupport.ensureClassInitialized(ClassInitializationSupport.java:177)
2023-12-19T16:37:03.6084416Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.AllowAllHostedUsagesClassInitializationSupport.computeInitKindAndMaybeInitializeClass(AllowAllHostedUsagesClassInitializationSupport.java:191)
2023-12-19T16:37:03.6086777Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.AllowAllHostedUsagesClassInitializationSupport.computeInitKindAndMaybeInitializeClass(AllowAllHostedUsagesClassInitializationSupport.java:129)
2023-12-19T16:37:03.6089072Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.ClassInitializationSupport.maybeInitializeAtBuildTime(ClassInitializationSupport.java:161)
2023-12-19T16:37:03.6090767Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.ClassInitializationSupport.maybeInitializeAtBuildTime(ClassInitializationSupport.java:150)
2023-12-19T16:37:03.6092051Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.SVMHost.onTypeReachable(SVMHost.java:310)
2023-12-19T16:37:03.6093121Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisUniverse.onTypeReachable(AnalysisUniverse.java:699)
2023-12-19T16:37:03.6094260Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisType.lambda$new$0(AnalysisType.java:310)
2023-12-19T16:37:03.6095172Z 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
2023-12-19T16:37:03.6095865Z 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
2023-12-19T16:37:03.6096740Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.AnalysisFuture.ensureDone(AnalysisFuture.java:63)
2023-12-19T16:37:03.6097929Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisType.ensureOnTypeReachableTaskDone(AnalysisType.java:696)
2023-12-19T16:37:03.6099118Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisType.onReachable(AnalysisType.java:590)
2023-12-19T16:37:03.6100210Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.AtomicUtils.atomicSetAndRun(AtomicUtils.java:49)
2023-12-19T16:37:03.6101363Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisType.lambda$registerAsReachable$8(AnalysisType.java:562)
2023-12-19T16:37:03.6102538Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisType.forAllSuperTypes(AnalysisType.java:676)
2023-12-19T16:37:03.6103672Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisType.forAllSuperTypes(AnalysisType.java:659)
2023-12-19T16:37:03.6104800Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisType.forAllSuperTypes(AnalysisType.java:655)
2023-12-19T16:37:03.6105940Z 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisType.registerAsReachable(AnalysisType.java:562)
2023-12-19T16:37:03.6107182Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.reflect.ReflectionDataBuilder.registerClass(ReflectionDataBuilder.java:202)
2023-12-19T16:37:03.6108464Z 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.reflect.ReflectionDataBuilder.lambda$register$1(ReflectionDataBuilder.java:171)
2023-12-19T16:37:03.6109251Z 	... 18 more

@yrodiere
Copy link
Member

BTW @MaciejDromin I'll squash your changes, too. Hope you don't mind.

@MaciejDromin
Copy link
Contributor Author

BTW @MaciejDromin I'll squash your changes, too. Hope you don't mind.

No I don't mind at all, please do. Also thanks for checking this test - yeah stack trace looks unclear but I'm not sure it is due to my changes. Let's wait for build if it fails again I will investigate what is happening - at least I will try to :D

@quarkus-bot
Copy link

quarkus-bot bot commented Dec 21, 2023

✔️ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

@MaciejDromin
Copy link
Contributor Author

@yrodiere Now it is all green, so it must have been a flaky test after all :D

@yrodiere
Copy link
Member

Yep. Merging, thanks!

@yrodiere yrodiere merged commit f2f971f into quarkusio:main Dec 21, 2023
49 checks passed
@quarkus-bot quarkus-bot bot added kind/bugfix and removed triage/waiting-for-ci Ready to merge when CI successfully finishes labels Dec 21, 2023
@quarkus-bot quarkus-bot bot added this to the 3.7 - main milestone Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants