-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 Image Compilation Stack Trace Not Showing Underlying Error related to --initialize-at-run-time using Gradle #9306
Comments
/cc @quarkusio/devtools |
with
with |
Just to note, having We need to find out, what error comes from GraalVM and is it propagated through Gradle |
So if I understand this correctly, this is about the output from GraalVM not showing up in the logged error? |
@geoand That seems to be the case... I am wondering if this a Gradle issue where it's not showing all of the errors coming from native image |
I am facing the same issue trying to use AWS Secrets Manager SDK. Gradle doesn't show any useful info in the logs.
|
Potential related: |
@provCristianMaluenda, is there an reproducer application you can share (perhaps as a github repo)? |
I have never used Gradle before, but I have recently seen many users complaining about the lack of log messages (especially) when building native images with Quarkus. So I decided to take a look at this. To be honest, I am really surprised by the complete lack of logs that show up during a normal gradle build process of Quarkus application as compared to Maven, which prints out useful log messages during the same application build. To give others an idea, during native-image generation of a Quarkus application using Maven, we are used to seeing helpful messages like:
To my surprise, none of this shows up in Gradle builds. It's like watching a blank console which shows a progress bar without any of these details. So I looked into the Gradle code a bit more (well it turned out to be a mammoth exercise with all the logging wrappers/delegates/listeners/libraries spaghetti that we are used to seeing in the Java logging world :)). I ultimately found 2-3 issues that are stopping us from having a more informative build process for a Quarkus application. One such issue is within the Gradle tool itself which I have logged here gradle/gradle#13522. The other two issues have to do with certain configurations which I think we (Quarkus) can improve ourselves for the Gradle builds. I'll open a separate issue or a PR within this Quarkus repo for that, later. As for whether or not the fix for gradle/gradle#13522 will show up the real root cause of the native image generation failures in this issue, we can verify it by running it against a patched version of Gradle with the fix I've in mind. If one of you is interested in testing this fix, I'll share a Gradle forked repo which perhaps you can build yourself and use it to test against Quarkus app? Or maybe one of you can share an application (as a github repo) which reproduces this issue (preferably against |
#10137 has been merged in Quarkus. This should provide a bit more visibility in the native image build process in Quarkus when using Gradle. A few more enhancements will be needed to have this build process be almost on par with Maven when it comes to logging. I will get to those when I get a chance. |
Sorry @jaikiran, I missed your comment. I have a private project that I can not share, but I could create a new project for this issue if still you need it. |
Yes please. That will help us figure out what else will help to debug issues like these on Gradle. |
@jaikiran I have a project with issues to build the native image for you here: The GraalVM that I am using is:
I hope this helps! Thanks |
@provCristianMaluenda, thank you for that app. It helped. I gave it a try against the latest upstream of Quarkus (which has this fix #10137) and built your app in native mode. The build now clearly reports what went wrong:
I tried it against So the upcoming release of 1.6 of Quarkus which should have this fix, should help with these issues in Gradle. |
Now that I have seen/tried this fix against some real application, I'm going to mark this issue as fixed for (upcoming) 1.6 version of Quarkus. |
Describe the bug
This is using Gradle
quarkusBuild
, but may be present in Maven as well.I am working with a team at AWS to get their Deep Java Learning (DJL) library working in Quarkus native. I ran into a native compilation error.
Here is the strack trace from the error:
deepjavalibrary/djl#67 (comment)
Expected behavior
The stack trace should state what the underlying error is that is elevated by using
--initialize-at-run-time
.Actual behavior
Stack trace has no real error message.
To Reproduce
Reproducer coming.
The text was updated successfully, but these errors were encountered: