-
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
Windows native: JLINE(JANSI), ForeignAPISupport, JDK 23+ #43777
Comments
Workaround is to remove dependency on Merely disabling tests like so is not enough:
and that is concerning on its own :( |
Update, the actual culprit is jboss-logmanager and what it does internally that allows e.g. color print via JDK's internal jline terminal control devices. It needs additional config
WIP... |
This reproduces the issue in isolation, without Quarkus in the picture: https://github.com/Karm/dev-null/tree/main/jbosslogmanager Linux: OK
Adding Foreign Function support doesn't help:
|
The trace with a different terminal, plain cmd, looks diferently. It's not about color after all. In this case, jbosslogmanager bails out and
It fails all the same, just by plain trying to write:
|
I have narrowed it down to the switch between jline internal to JDK being opt-in up to JDK 21 and default later, e.g. in JDK 23+ where I am reproducing it. I'll open a GraalVM bug. I hit the issue at runtime without JBoss Log manager, and at build-time with it. WIP... |
Updated with workaround:
|
EDIT:
The cause is JBoss logging manager. Isolated reproducer: #43777 (comment)
Workaround
Based on the investigation in oracle/graal#9884 the workaround is to opt-out of the new JLine JDK support that enables Java runtime to talk to Windows native Kernel32 API to control "dumb" terminals that don't understand ESC symbols. You can do it like so:
Describe the bug
The library used to highlight and color terminal output on Windows, jline needs FFM. Hopefully, it doesn't do any upcalls...no idea why it should though.
We need to take a look at how we handle the library in Quarkus and to make it work on Windows.
This issue slipped CI, because the logic detects it is not running in a proper terminal and does not execute. You need a real terminal, like the vanilla
cmd
or https://cmder.app/ like I use to trigger it. Actually any terminal the JANSI (JLINE) can work with triggers the issue on Windows.Expected behavior
It works.
Actual behavior
It crashes during build.
Workaround
See EDIT at the beginning.
Remove quarkus-junit5 from the project.
How to Reproduce?
Log
Note that just simply adding the option doesn't help:
Output of
uname -a
orver
Windows 2019
Output of
java -version
23.0.0 23+37
Mandrel or GraalVM version (if different from Java)
OpenJDK 64-Bit Server VM Mandrel-24.1.0.0-Final (build 23+37, mixed mode)
Quarkus version or git rev
3.14.4, 3.15.0, 3.15.1
Build tool (ie. output of
mvnw --version
orgradlew --version
)mvnw
Additional information
No response
The text was updated successfully, but these errors were encountered: