Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-5703

Exception leaves zombie processes for slaves started by command on master

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • remoting
    • None

      I have several slaves that are started via the "Launch slave via execution of command on the Master." The command is a bash script that acquires Kerberos credentials and then ssh's over to the slave. Periodically, something happens that kills all the connections launched this way. Regardless, the original bash process is not collected by Hudson, and is left as a zombie or defunct process.

      The relevant excerpt from the hudson log appears to be:

      Feb 17, 2010 12:43:14 PM hudson.remoting.Channel$ReaderThread run
      SEVERE: I/O error in channel <host>
      java.io.EOFException
              at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2554)
              at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1297)
              at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
              at hudson.remoting.Channel$ReaderThread.run(Channel.java:852)
      

      I wonder if the fix is something as simple as adding a proc.destroy() to CommandLauncher.java?:

      @Override
      public void onClosed(Channel channel, IOException cause) {
          if (cause != null) {
              cause.printStackTrace(
                  listener.error(hudson.model.Messages.Slave_Terminated(getTimestamp())));
          }
          ProcessTree.get().killAll(proc, cookie);
          proc.destroy();
      }
      

            Unassigned Unassigned
            jsiirola jsiirola
            Votes:
            8 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: