Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-4834

Infinite loop if Exception occurs during the execution of karaf.shell.init.script

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.0
    • Fix Version/s: 4.1.0
    • Component/s: karaf
    • Labels:
      None

      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.

        Attachments

        1. karaf.log
          23 kB
          Lijun Liao

          Activity

            People

            • Assignee:
              gnt Guillaume Nodet
              Reporter:
              lliao Lijun Liao
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: