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

jenkins blocks on pipeline, won't terminate until restart

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • git-plugin
    • None

      Tried to run this tiny script from an git scm pipeline:

      #!groovy
      node {
      git url: 'https://github.com/arangodb/arangodb.git'
      if (isUnix())

      { echo 'Hello Unix' sh 'cmake . ' sh 'make' }

      else

      { echo 'hello else' }

      }

      Pressed twice 'play' by accident. stopped the upper run. This seemed to have voided my workspace. The checkout command below would block in all subsequent attepmts:

      It starts cloning into arangodb:
      [Pipeline] {
      [Pipeline] git
      > git rev-parse --is-inside-work-tree # timeout=10
      Fetching changes from the remote Git repository
      > git config remote.origin.url https://github.com/arangodb/arangodb.git # timeout=10
      Fetching upstream changes from https://github.com/arangodb/arangodb.git
      > git --version # timeout=10
      > git -c core.askpass=true fetch --tags --progress https://github.com/arangodb/arangodb.git +refs/heads/:refs/remotes/origin/
      > git rev-parse refs/remotes/origin/master^

      {commit} # timeout=10
      > git rev-parse refs/remotes/origin/origin/master^{commit}

      # timeout=10
      Checking out Revision ed80c3d2e88953e5054c1ea43e35eda39052f043 (refs/remotes/origin/master)
      > git config core.sparsecheckout # timeout=10
      > git checkout -f ed80c3d2e88953e5054c1ea43e35eda39052f043 # timeout=10

      it then remains stuck. the git process vanishes from top/pstree.

      The complete pipeline will then remain in 'active' state, without a reaction to the X-button. Only restarting jenkins will get it out of this state.

      Flushing my workspace resolved this issue.

          [JENKINS-36529] jenkins blocks on pipeline, won't terminate until restart

          Wilfried Goesgens created issue -
          Wilfried Goesgens made changes -
          Description Original: Tried to run this tiny script from an git scm pipeline:

          #!groovy
          node {
            git url: 'https://github.com/arangodb/arangodb.git'
            if (isUnix()) {
              echo 'Hello Unix'
              sh 'cmake . '
              sh 'make'
            }
            else {
              echo 'hello else'
            }
          }

          It starts cloning into arangodb:
          [Pipeline] {
          [Pipeline] git
           > git rev-parse --is-inside-work-tree # timeout=10
          Fetching changes from the remote Git repository
           > git config remote.origin.url https://github.com/arangodb/arangodb.git # timeout=10
          Fetching upstream changes from https://github.com/arangodb/arangodb.git
           > git --version # timeout=10
           > git -c core.askpass=true fetch --tags --progress https://github.com/arangodb/arangodb.git +refs/heads/*:refs/remotes/origin/*
           > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
           > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
          Checking out Revision ed80c3d2e88953e5054c1ea43e35eda39052f043 (refs/remotes/origin/master)
           > git config core.sparsecheckout # timeout=10
           > git checkout -f ed80c3d2e88953e5054c1ea43e35eda39052f043 # timeout=10

          it then remains stuck. the git process vanishes from top/pstree.

          The complete pipeline will then remain in 'active' state, without a reaction to the X-button. Only restarting jenkins will get it out of this state.


          New: Tried to run this tiny script from an git scm pipeline:

          #!groovy
          node {
            git url: 'https://github.com/arangodb/arangodb.git'
            if (isUnix()) {
              echo 'Hello Unix'
              sh 'cmake . '
              sh 'make'
            }
            else {
              echo 'hello else'
            }
          }

          Pressed twice 'play' by accident. stopped the upper run. This seemed to have voided my workspace. The checkout command below would block in all subsequent attepmts:

          It starts cloning into arangodb:
          [Pipeline] {
          [Pipeline] git
           > git rev-parse --is-inside-work-tree # timeout=10
          Fetching changes from the remote Git repository
           > git config remote.origin.url https://github.com/arangodb/arangodb.git # timeout=10
          Fetching upstream changes from https://github.com/arangodb/arangodb.git
           > git --version # timeout=10
           > git -c core.askpass=true fetch --tags --progress https://github.com/arangodb/arangodb.git +refs/heads/*:refs/remotes/origin/*
           > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
           > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
          Checking out Revision ed80c3d2e88953e5054c1ea43e35eda39052f043 (refs/remotes/origin/master)
           > git config core.sparsecheckout # timeout=10
           > git checkout -f ed80c3d2e88953e5054c1ea43e35eda39052f043 # timeout=10

          it then remains stuck. the git process vanishes from top/pstree.

          The complete pipeline will then remain in 'active' state, without a reaction to the X-button. Only restarting jenkins will get it out of this state.

          Flushing my workspace resolved this issue.

          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 173242 ] New: JNJira + In-Review [ 185016 ]

          Getting the same thing here. Tried flushing the workspace, doesn't resolve it. Jenkins restarts seem to be the only thing to kick it over.

          Nathan Sullivan added a comment - Getting the same thing here. Tried flushing the workspace, doesn't resolve it. Jenkins restarts seem to be the only thing to kick it over.

          I meanwhile worked around this using a python script deployed into my build containers:

          https://github.com/arangodb-helper/build-docker-containers/blob/master/scripts/copyFileLockedIfNewer.py

          used in a sh-step in this function:

          https://github.com/arangodb-helper/JenkinsScripts/blob/master/ci/Jenkinsfile#L74

           

          Wilfried Goesgens added a comment - I meanwhile worked around this using a python script deployed into my build containers: https://github.com/arangodb-helper/build-docker-containers/blob/master/scripts/copyFileLockedIfNewer.py used in a sh-step in this function: https://github.com/arangodb-helper/JenkinsScripts/blob/master/ci/Jenkinsfile#L74  
          Andrew Bayer made changes -
          Component/s New: workflow-cps-plugin [ 21713 ]
          Component/s Original: pipeline-utility-steps-plugin [ 21135 ]
          Andrew Bayer made changes -
          Assignee Original: rsandell [ rsandell ]
          Andrew Bayer made changes -
          Component/s New: git-plugin [ 15543 ]
          Component/s Original: workflow-cps-plugin [ 21713 ]

          Andrew Bayer added a comment -

          This looks like some sort of race condition in the Git plugin.

          Andrew Bayer added a comment - This looks like some sort of race condition in the Git plugin.

            Unassigned Unassigned
            dothebart Wilfried Goesgens
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: