apache / apache/maven-mvnd

Package crashes due to java.io.IOException

Open
#705 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
3.5k
Forks
250
Avg merge
16h 22m
Merged PRs (30d)
36

Description

Hi there,

Before describing the issue I'm facing, my setup is as follow:
```
mvnd 0.8.1 linux-amd64 native client (821c6a54a20ce4c4a2b94419334aaf125a128caf)
Terminal: org.jline.terminal.impl.PosixSysTerminal with pty org.jline.terminal.impl.jansi.linux.LinuxNativePty
Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
Java version: 1.8.0_162, vendor: Oracle Corporation, runtime: /usr/local/jdk1.8.0_162/jre
OS name: "linux", version: "3.10.0-1127.13.1.el7.x86_64", arch: "amd64", family: "unix"
```

I userd mvnd to built the modules on Jenkins concurrently. The command is "mvnd -Dmaven.settings=/home/jenkins/.m2/settings.xml -Dmaven.legacyLocalRepo=true clean package -T3",sometime it works well,but sometime it crashed. The error is as follows:
```
Purged 2 log files (log available in /home/jenkins/.m2/mvnd/registry/0.8.1/purge-2022-10-08.log)
Exception in thread "main" java.lang.RuntimeException: java.io.IOException: Stream closed
at org.mvndaemon.mvnd.common.logging.TerminalOutput.update(TerminalOutput.java:526)
at org.mvndaemon.mvnd.common.logging.TerminalOutput.accept(TerminalOutput.java:200)
at org.mvndaemon.mvnd.client.DefaultClient.execute(DefaultClient.java:352)
at org.mvndaemon.mvnd.client.DefaultClient.main(DefaultClient.java:131)
Caused by: java.io.IOException: Stream closed
at java.io.BufferedWriter.ensureOpen(BufferedWriter.java:107)
at java.io.BufferedWriter.flushBuffer(BufferedWriter.java:117)
at java.io.BufferedWriter.flush(BufferedWriter.java:256)
at org.mvndaemon.mvnd.common.logging.TerminalOutput$FileLog.flush(TerminalOutput.java:858)
at org.mvndaemon.mvnd.common.logging.TerminalOutput.update(TerminalOutput.java:524)
... 3 more
```
If you need more elements to help with the issue, just let me know. Thanks a lot for any help.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the stack trace in common logging, especially TerminalOutput.update and TerminalOutput$FileLog.flush, and reproduce the intermittent failure with the reported mvnd command and environment. Check the referenced purge-2022-10-08.log and determine the conditions that close the stream; done means the command no longer crashes with Stream closed.

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
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.