-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[GraalVM for JDK 22] quarkus-integration-test-jpa-postgresql test fails with latest GraalVM master #37498
Comments
It looks like this is caused by #35113. Interestingly it doesn't seem to fail with Mandrel 23.1 (see https://github.com/quarkusio/quarkus/actions/runs/6959004824/job/18938761459#step:14:557). Part of the size increase is also noticeable with Mandrel 23.1. In https://github.com/quarkusio/quarkus/actions/runs/6959004824/job/18938761459#step:14:415 (after the merge) the reported image size is 78.90MB in total while in https://github.com/quarkusio/quarkus/actions/runs/6957069306/job/18929685671#step:14:415 (before the merge) the reported size was 73.81MB in total. |
I'm guessing this is caused by the addition of Jackson as a dependency to that module: https://github.com/quarkusio/quarkus/pull/35113/files#diff-a7c108a7c682a73ce46773f1cb0016dd8b8e59b212a9b3222cc7e22431e6f958 That was necessary to test JSON formats, but indeed I can see how this could cause nasty side-effects when generating native images. I think we should just move the tests related to JSON to a separate module... maybe @marko-bekhta Do you think you could have a look? Beware, I refactored all these tests just a few days ago :) |
Hey, yes, sure. I'll see what I can do 😃. And yeah, I've seen the updates 😉 |
I think i know what the problem is and I suspect this might affect other situations out there: The issue starts to happen when oracle/graal@1ed2a58 was integrated. The effect that it has is that looking up a constant has the side effect of making that constant part of the image heap as an image heap constant. I've pinged @cstancu about this and whether it can be improved/changed. Why is this a problem in this case? Both before and after the commit, svm would resolve the constructor of
And through that it discovers the constructor. The constructor is found because of the changes in #35113. So, because the constructor is found (due to #35113) AND because the constructor now becomes an image heap constant (due to oracle/graal@1ed2a58), an entry point in the universe is created for the constructor, represented as a factory method. This is exactly what we see in the call tree report:
And once you have that entry point, all the XML baggage is added to the universe. Changes to GraalVM aside, I don't see an obvious substitution that can be done here, other than maybe reimplement |
The problematic part of the commit is this change. So, this issue affects reflection related constant lookups at the very minimum (e.g. constructors discovered as a result of class lookups), which now become image heap constants, but other constants have a similar treatment too. |
I've just created oracle/graal#8019 to try to find a solution to the problem upstream. In the mean time I'm looking at workarounds to avoid the issue. A substitution that reimplements |
A draft PR with a workaround can be found in #37732. |
This should be fixed with oracle/graal#8041. I still need to verify this is now gone for good. |
FYI: The latest nightly CI run of ours didn't include the fix yet (it built revision |
I've quickly run it locally and the latest oracle master fixes this. |
Describe the bug
The native integration test tracking that XML factories from the JDK are not included are failing with latest GraalVM master builds and JDK
22+25
early access. The failure looks like this (and has been seen from around Nov 22 onwards):See:
https://github.com/graalvm/mandrel/actions/runs/7087354809/job/19288795063#step:12:521
And indeed the image size increased from
~74MB
(from a Nov 22 build) to~87MB
which is about the same size as the one including the XML factories.We see the same failure on JDK 21-based GraalVM CE builds. See:
https://github.com/graalvm/mandrel/actions/runs/7087354812/job/19288620329#step:12:522
The text was updated successfully, but these errors were encountered: