Unexpected "freeze / prompts" before and after the build when using Git Bash on Windows
- Dominant language
- Java
- Stars
- 3.5k
- Forks
- 250
- Avg merge
- 16h 22m
- Merged PRs (30d)
- 36
Description
I'm currently trying mvnd, with very promising results in terms of build times, but some "usability" bugs which seem related to the communication with the terminal.
In my case, Git Bash on Windows.
**First problem (if not using winpty)**
If starting normally, it always freezes without printing anything, until I press "enter" again. And when I do press enter, I get this exception before the build actually starts.
> $ /C/java/mvnd-0.7.1-windows-amd64/bin/mvnd clean install
Exception in thread "Thread-0" java.lang.NullPointerException
at org.mvndaemon.mvnd.common.logging.TerminalOutput.readInputLoop(TerminalOutput.java:477)
at java.lang.Thread.run(Thread.java:833)
at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:596)
at com.oracle.svm.core.windows.WindowsJavaThreads.osThreadStartRoutine(WindowsJavaThreads.java:138)
This issue disappears if I launch with winpty, like `$ winpty /C/java/mvnd-0.7.1-windows-amd64/bin/mvnd clean install`
In that case, build starts immediately and without exceptions.
**Second problem (no matter if I'm using winpty or not)**
Sometimes, mvnd will freeze at the end of the build, like this :
> Building root daemon: aed2fcc7 threads used/hidden/max: 0/0/7 progress: 33/33 100% time: 02:14
Note that the actual build is finished since ~00:50, but mvnd is just stuck counting the time, and I have to kill it with ctrl+C.
Important note : this second issue happens both with and without winpty, and it seems to occur only when reusing an existing daemon.
When mvnd starts a new daemon at the beginning of the build, it seems to release the terminal properly at the end.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with org.mvndaemon.mvnd.common.logging.TerminalOutput.readInputLoop at TerminalOutput.java:477 and reproduce the reported commands in Git Bash on Windows, both with and without winpty. Compare a new daemon with a reused daemon and observe terminal input before the build and process termination afterward. Done means the build starts without an extra prompt or NullPointerException and exits after completion without hanging.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100