• Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • pipeline
    • Jenkins 1.609.3
      Workflow plugins 1.10
      Git plugin 2.4.0
      Git client plugin 1.19.0
      Brand new jenkins image with only the above installed: docker run -d -p 8080:8080 jenkins

      I stumbled across a way to hang a workflow, by creating and running the following script (it'll work fine with the equivalent freestyle job):

      node {
        git url:'https://github.com/jenkinsci/workflow-plugin.git', branch:'master'
        echo 'nope'
        sh 'git clean -fdx'
      }
      

      The following output is shown in the console:

      Started by user anonymous
      Running: Allocate node : Start
      Running on master in /var/jenkins_home/jobs/hangit/workspace
      Running: Allocate node : Body : Start
      Running: 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/jenkinsci/workflow-plugin.git # timeout=10
      Fetching upstream changes from https://github.com/jenkinsci/workflow-plugin.git
       > git --version # timeout=10
       > git -c core.askpass=true fetch --tags --progress https://github.com/jenkinsci/workflow-plugin.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 101be9ca2431ec22e6e39b84d94d503852bb8272 (refs/remotes/origin/master)
       > git config core.sparsecheckout # timeout=10
       > git checkout -f 101be9ca2431ec22e6e39b84d94d503852bb8272
      First time build. Skipping changelog.
      Running: Print Message
      nope
      Running: Shell Script
      [workspace] Running shell script
      

      The workflow can be aborted manually, but as far as I can tell does not complete (though it hasn't been left overnight, so it might finish eventually).

          [JENKINS-30884] Workflow hangs on git clean after clone

          Jesse Glick added a comment -

          A “well-known” issue: you cannot run shell steps which delete their own control directory.

          Jesse Glick added a comment - A “well-known” issue: you cannot run shell steps which delete their own control directory.

          Sam Van Oort added a comment -

          Is there a good list somewhere of all these "well-known" issues that I missed? (Preferably something in the workflow readmes). If not there needs to be something we can point people at clearly, like a "gotchas" or "known issues" list.

          IMO a failure would be acceptable for this, but it's extremely counterintuitive that the lack of a control file causes a hang rather than an error. Maybe if you're deeply familiar with workflow implementation this is an obvious thing, but it is very surprising otherwise.

          Sam Van Oort added a comment - Is there a good list somewhere of all these "well-known" issues that I missed? (Preferably something in the workflow readmes). If not there needs to be something we can point people at clearly, like a "gotchas" or "known issues" list. IMO a failure would be acceptable for this, but it's extremely counterintuitive that the lack of a control file causes a hang rather than an error. Maybe if you're deeply familiar with workflow implementation this is an obvious thing, but it is very surprising otherwise.

          Jesse Glick added a comment -

          The Workflow README has a link to the list of filed JIRA issues. “Someone” could perhaps spend time coming up with a curated list of bugs and RFEs which lots of people come across, or we could perhaps infer that from some JIRA field like votes.

          Jesse Glick added a comment - The Workflow README has a link to the list of filed JIRA issues. “Someone” could perhaps spend time coming up with a curated list of bugs and RFEs which lots of people come across, or we could perhaps infer that from some JIRA field like votes.

          Sam Van Oort added a comment -

          Doesn't even have to be that exhaustive, just "tips / troubleshooting notes" or similar so people have a place to go for "hey this doesn't work, what's up" to help people get over the initial humps, maybe a few bug links. Some of the issues new users encounter are just misunderstandings about how things works, others are tied to implementation, and a handful are real bugs.

          It would absolutely have to be started by "someone" who has context on some of the long-standing issues encountered, because they'd have the tribal knowledge on what people get tripped up by, but once begun anybody could add troubleshooting notes.

          Sam Van Oort added a comment - Doesn't even have to be that exhaustive, just "tips / troubleshooting notes" or similar so people have a place to go for "hey this doesn't work, what's up" to help people get over the initial humps, maybe a few bug links. Some of the issues new users encounter are just misunderstandings about how things works, others are tied to implementation, and a handful are real bugs. It would absolutely have to be started by "someone" who has context on some of the long-standing issues encountered, because they'd have the tribal knowledge on what people get tripped up by, but once begun anybody could add troubleshooting notes.

          Jesse Glick added a comment -

          Like this?

          Jesse Glick added a comment - Like this ?

            Unassigned Unassigned
            svanoort Sam Van Oort
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: