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

Pipeline plugin sh script returned exit code -1 on windows node after a short while

      I've got many nodes running on different Linux distribution and also few windows nodes running with SSH slaves and Cygwin (https://wiki.jenkins-ci.org/display/JENKINS/SSH+slaves+and+Cygwin)

      Using the following pipeline script:

      _node('linuxHost') {
      stage('linuxHost linux')

      { sh '''sleep 30''' }

      }
      node('windowsHost') {
      stage('windowsHost cygwin')

      { bat 'sleep 30' sh '''sleep 30''' }

      }_

      On my windows node I always got an error "ERROR: script returned exit code -1" if my script execution time is greater than about 250ms no matter what the command content is (that's why I'm using a basic sleep for this example). I've got the exact same behavior for all of my windows nodes.

      Here are the execution logs:
      _Started by user Administrateur Jenkins
      [Pipeline] node
      Running on linuxHost in /var/jenkins_home/workspace/Unstable/TestShInPipeline
      [Pipeline] {
      [Pipeline] stage
      [Pipeline]

      { (linuxHost linux) [Pipeline] sh [TestShInPipeline] Running shell script + sleep 30 [Pipeline] }

      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] node
      Running on windowsHost in C:/Users/localuser/jenkins_home/workspace/Unstable/TestShInPipeline
      [Pipeline] {
      [Pipeline] stage
      [Pipeline]

      { (windowsHost cygwin) [Pipeline] bat [C:/Users/localuser/jenkins_home/workspace/Unstable/TestShInPipeline] Running batch script C:\Users\localuser\jenkins_home\workspace\Unstable\TestShInPipeline>sleep 30 [Pipeline] sh [TestShInPipeline] Running shell script + sleep 30 [Pipeline] }

      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      ERROR: script returned exit code -1
      Finished: FAILURE_

      May be related to JENKINS-32017 ?
      It works fine using the same node and the "Execute Shell" build step in a freestyle project.

          [JENKINS-38682] Pipeline plugin sh script returned exit code -1 on windows node after a short while

          Benoît Desvages created issue -
          Ben Gamari made changes -
          Priority Original: Minor [ 4 ] New: Critical [ 2 ]
          Ben Gamari made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Ben Gamari made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Oleg Nenashev made changes -
          Link New: This issue is duplicated by JENKINS-42405 [ JENKINS-42405 ]
          Jesse Glick made changes -
          Component/s New: durable-task-plugin [ 18622 ]
          Component/s Original: pipeline [ 21692 ]
          Jesse Glick made changes -
          Link New: This issue duplicates JENKINS-47791 [ JENKINS-47791 ]
          Jesse Glick made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: In Review [ 10005 ] New: Resolved [ 5 ]

            Unassigned Unassigned
            bdesvages Benoît Desvages
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: