-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 23 on Windows: VMError$HostedError: should not reach here: unexpected input could not be handled: linkToNative (possibly caused by Quarkus setup) #9727
Comments
Hi @jhutting, Thank you for reaching out to us! We'll take a look into this shortly and I'll keep you updated |
@selhagani any update on this? I'd like to share build times and resource usage during my talk at Devoxx next week, and considering the newer versions perform better in those aspects would prefer to use 23 or 24-ea. If I need to run with different flags to generate extra information just let me know. I currently don't know if the issue only occurs on my ancient i5 or also on more modern machines, just that GraalVM 21 and 22 don't have the issue. |
I tested with GraalVM for JDK 22 and it did indeed work but with GraalVM for JDK 23 I am getting a different error than the one you shared. This is the error I get |
@selhagani your issue seems to be caused by a vsvars/vswhere issue as also described in #8669 and might be an issue with how you set up visual studio - see Fabio's comment on March 31st. FWIW: I have the following components installed (using the linked instructions as a guideline). Perhaps your issue is caused by either not installing the visual studio editor as the user in #8669 or by not selecting the Apparently there's also a new Windows 10 SDK (20348) available, do you want me to try with that version? |
Hi @jhutting, thank you for the provided suggestion. |
Hi, |
@selhagani I consistently get the same error on other Quarkus project as well, I haven't seen the nullpointer you're experiencing. Just created a minimal hello world REST example which should be faster to build and uploaded it here: https://github.com/jhutting/quarkus-hello Are there any settings or flags I can try to add/adjust in the build? |
I can confirm the error when manually executing on Windows 2019 sever
And yet, it completed in CI before. I can see Jenkins CI passing with exactly the same build that fails for me manually. /me investigating... It's gonna be some setup. |
According to the documentation of jline since 3.24 by default it will use the FFM implementation when running on JDK >= 22. On I have not checked why this is not an issue on Linux. |
@zakkak The explanation of why this passed on CI is that the code path in Quarkus gets activated only when there is a real terminal attached. In batch mode, on CI, it is not triggered. I got momentarily confused by "JLine" but when I realized it's actually former JANSI it all clicked together as this is not our first problem in this area. I am still not sure why @jhutting TL;DR: I doubt this is GraalVM issue per se. We need to handle JLine lib correctly. |
Quarkus tracker: quarkusio/quarkus#43777 |
@jhutting Based on my findings in #9884, I can share that opting-out of the new JLine JDK capability works-around the problem. The capability was opt-in in JDK 21 by setting
|
@Karm sorry for the late reply, was kinda busy the past days. I slightly had to adjust the workaround you propose by adding FWIW: the build also ran fine without -J, what does that flag do? |
@jhutting I am glad it works for you.
|
Describe the issue
Native builds on Windows no longer work after upgrading to GraalVM 23+37.1 from 22.0.1+8.1 on my pc. The latest 24-ea build throws the same error: VMError$HostedError: should not reach here: unexpected input could not be handled: linkToNative (full stack below)
Building the native on Linux on the same machine works without issue, no issues on a M2 Mac with this version either. I can still build the executable on Windows using GraalVM 22.0.1+8.1
This seems restricted to Quarkus builds, native code with Spring does not throw the error but that could be related to using the native:compile plugin directly with Spring.
Steps to reproduce the issue
Please include both build steps as well as run steps
git clone --depth 1 https://github.com/Paladijn/D2Rcharviewer.git
mvn package -Dnative
Exactly the same outcome with this project:
git clone --depth 1 https://github.com/jhutting/green-native.git
cd native-code-with-quarkus
mvn package -Dnative
mvn native:compile -Pnative
Describe GraalVM and your environment:
More details
--native-image-info resulted in:
If you need me to run the build with other parameters, feel free to reach out.
Stacktrace on D2Rcharviewer
Stacktrace on the green IT example:
The text was updated successfully, but these errors were encountered: