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

Quarkus CLI crashes JVM when running on Windows in dev mode with gradle project #34302

Open
rsvoboda opened this issue Jun 26, 2023 · 5 comments
Labels
area/cli Related to quarkus cli (not maven/gradle/etc.) area/devmode area/gradle Gradle env/windows Impacts Windows machines kind/bug Something isn't working

Comments

@rsvoboda
Copy link
Member

Describe the bug

Quarkus CLI crashes JVM when running on Windows in dev mode with gradle project

Experienced with Quarkus 3.1.2.Final and Quarkus main.

Running gradlew quarkusDev works fine. Running quarkus dev end with JVM crash - see hs_err_pid1132.log.

I'm using https://community.chocolatey.org/packages/Temurin17 (17.0.7) and https://community.chocolatey.org/packages/quarkus (3.1.2.Final)

The failure was also reproduced by @brunobat

Expected behavior

No JVM crash

Actual behavior

Quarkus CLI crashes JVM when running on Windows in dev mode with gradle project

How to Reproduce?

Running gradlew quarkusDev works.

Output of uname -a or ver

Windows 10

Output of java -version

Java 17

GraalVM version (if different from Java)

No response

Quarkus version or git rev

3.1.2.Final

Build tool (ie. output of mvnw --version or gradlew --version)

gradlew from the code.quarkus app

Additional information

No response

@rsvoboda rsvoboda added kind/bug Something isn't working area/cli Related to quarkus cli (not maven/gradle/etc.) labels Jun 26, 2023
@quarkus-bot quarkus-bot bot added area/devmode area/gradle Gradle env/windows Impacts Windows machines labels Jun 26, 2023
@quarkus-bot
Copy link

quarkus-bot bot commented Jun 26, 2023

/cc @ebullient (cli), @glefloch, @maxandersen (cli), @quarkusio/devtools

@dresch86
Copy link

Are there any updates on this? I am still seeing the same behavior.

@maxandersen
Copy link
Member

Could this be caused by fusesource/jansi#66 ?

Basically two different versions being loaded?

@rsvoboda
Copy link
Member Author

I'm not sure if the linked issue is the problem, could be related though. This issue is Windows specific, wasn't hit on other operating system. Linked issue is not Windows specific.

dev mode works fine when invoked through gradlew. Quarkus CLI pulls in something problematic, but jansi is not dependency of devtools/cli and unzip -l quarkus-cli-3.10.1-runner.jar| grep -i jansi also didn't give anything.

I tried to force 1.18 using

configurations.all {
  resolutionStrategy {
    force 'org.fusesource.jansi:jansi:1.18'
  }
}

But I got this:

quarkus dev
...
Caused by: java.lang.NoSuchMethodError: 'org.fusesource.jansi.AnsiPrintStream org.fusesource.jansi.AnsiConsole.out()'
        at org.aesh.readline.terminal.impl.WinSysTerminal.<init>(WinSysTerminal.java:44)
        at org.aesh.readline.terminal.impl.WinSysTerminal.<init>(WinSysTerminal.java:40)
        at org.aesh.readline.terminal.TerminalBuilder.createWindowsTerminal(TerminalBuilder.java:148)
        at org.aesh.readline.terminal.TerminalBuilder.build(TerminalBuilder.java:117)
        at org.aesh.readline.tty.terminal.TerminalConnection.<init>(TerminalConnection.java:91)
        at org.aesh.readline.tty.terminal.TerminalConnection.<init>(TerminalConnection.java:108)
        at io.quarkus.deployment.console.ConsoleHelper.installConsole(ConsoleHelper.java:37)
        at io.quarkus.deployment.console.ConsoleProcessor.setupConsole(ConsoleProcessor.java:79)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1495)
        at java.base/java.lang.Thread.run(Thread.java:833)
        at org.jboss.threads.JBossThread.run(JBossThread.java:483)

Interestingly, when running gradlew quarkusDev on the same project (forcing org.fusesource.jansi:jansi:1.18) I don't get any compilation errors and dev mode is started. This is super strange to me :/

@FrodoOf9Fingers
Copy link

Also experiencing this issue, for the longest time thought it was a disconnect between my IDE and Quarkus. I can confirm that running quarkusDev directly via gradlew bypasses the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli Related to quarkus cli (not maven/gradle/etc.) area/devmode area/gradle Gradle env/windows Impacts Windows machines kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants