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

Too much output from SH executor causes the agent to freeze

    Details

    • Similar Issues:

      Description

      I have deployed two Jenkins nodes, one master and one agent, both running ubuntu 18.04 LTS.

      Both nodes are running: OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-0ubuntu0.18.04.1-b13)

      The Jenkins master is v2.138.2.

      I'm catting a file containing some terraform output (approximately 30KB) on the agent using the shell executor in a Jenkins pipeline (see below).

      As the job runs, only a section of the file content is displayed in my console log and then the job freezes. In some cases some more lines from the file are displayed after some time. In any case, an error message is thrown:

      Cannot contact jenkins-linux-agent: java.lang.InterruptedException
      Could not connect to jenkins-linux-agent to send interrupt signal to process
       

      The work around that I've found is to rate limit the number of bytes delivered to stdout using the linux utility pv.

       

      pipeline {  
      
        options {
          buildDiscarder(logRotator(numToKeepStr: '10'))
          ansiColor('xterm')
        }
        
        agent {
          node {
            label 'jenkins-linux-agent'
          }
        }
        
        stages {
          stage('Build') {      
            steps {
              script {
                sh 'cat /tmp/output | pv -l -L 100 -q'
              }
            }
          }
        }
      }
      

       

        Attachments

          Activity

          Hide
          jthompson Jeff Thompson added a comment -

          Could you provide any further logging output? Particularly agent logs. 

          My attempts at reproduction haven't succeeded yet. I haven't tried it with your configuration as I don't have Ubuntu systems immediately available.

          Show
          jthompson Jeff Thompson added a comment - Could you provide any further logging output? Particularly agent logs.  My attempts at reproduction haven't succeeded yet. I haven't tried it with your configuration as I don't have Ubuntu systems immediately available.
          Hide
          jthompson Jeff Thompson added a comment -

          Closing as Cannot Reproduce without additional response.

          Show
          jthompson Jeff Thompson added a comment - Closing as Cannot Reproduce without additional response.

            People

            • Assignee:
              jthompson Jeff Thompson
              Reporter:
              queeno Simon Aquino
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: