Details
Description
The while block between line 329 and line 352 in https://github.com/apache/karaf/blob/master/shell/core/src/main/java/org/apache/karaf/shell/impl/console/ConsoleSessionImpl.java will never break if Exception other than EndOfFileException is thrown, e.g. StreamClosed exception.
After executing a karaf command (the commands are in a scritp which will be executed via the command source) I happened to get the Interrupted error, then the branding screen was shown, followed by infinite Stream Closed IOException. Sorry I got this phenomenon only from time to time and cannot provide stable steps to reproduce it.
karaf@root() <some karaf command> Error executing command: java.lang.InterruptedException gogo: InterruptedException: null __ __ ____ / //_/____ __________ _/ __/ / ,< / __ `/ ___/ __ `/ /_ / /| |/ /_/ / / / /_/ / __/ /_/ |_|\__,_/_/ \__,_/_/ Apache Karaf (4.1.0-SNAPSHOT) Hit '<tab>' for a list of available commands and '[cmd] --help' for help on a specific command. Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown Karaf. karaf@root()> Error executing command: java.io.IOException: Stream Closed ... hunderts lines with same content ignored here ... karaf@root()> Error executing command: java.io.IOException: Stream Closed
I have attached the log.