When batch task is included in a Pipeline job it will hang on completion of the batch task. I can see in task manager that the job startup it logs data to jenkins-log.txt. The batch completes and I see in task manager that the batch is nolonger running. But Jenkins is still waiting for the task to complete. I do not see jenkins-result.txt writen to the workspace tmp durabletask directory. If I create the file manually or run the workflow-wrap.bat manually the task completes. This is an itermitent bug. Task might work 3 time then fail 5 times then work 8 times. No change to the system during this time. I am setting the job to run every min to see what the stats look like for longer run.

      job:

      node { 
       bat 'ping 127.0.0.1 -n 10'
       echo 'batch completed'
      }
      

      Could be any command you want ping is just an easy one to have it take a little bit of time. And require nothing else installed on machine.

      I see many other task like this I have tested on serveral differnt machines using a base install of Jenkins.

        1. jenkins2-pipeline-batch-nohang.png
          jenkins2-pipeline-batch-nohang.png
          98 kB
        2. jenkins2-pipeline-batch-hang.png
          jenkins2-pipeline-batch-hang.png
          109 kB
        3. How.png
          How.png
          321 kB
        4. durable-task.hpi
          41 kB
        5. durable-task.hpi
          41 kB

          [JENKINS-34150] Pipeline Batch hangs

          Daniel Daugherty created issue -
          Daniel Daugherty made changes -
          Epic Link New: JENKINS-31152 [ 165808 ]
          R. Tyler Croy made changes -
          Description Original: When batch task is included in a Pipeline job it will hang on completion of the batch task. I can see in task manager that the job startup it logs data to jenkins-log.txt. The batch completes and I see in task manager that the batch is nolonger running. But Jenkins is still waiting for the task to complete. I do not see jenkins-result.txt writen to the workspace tmp durabletask directory. If I create the file manually or run the workflow-wrap.bat manually the task completes. This is an itermitent bug. Task might work 3 time then fail 5 times then work 8 times. No change to the system during this time. I am setting the job to run every min to see what the stats look like for longer run.

          job:
          node {
           bat 'ping 127.0.0.1 -n 10'
           echo 'batch completed'
          }

          Could be any command you want ping is just an easy one to have it take a little bit of time. And require nothing else installed on machine.

          I see many other task like this I have tested on serveral differnt machines using a base install of Jenkins.
          New: When batch task is included in a Pipeline job it will hang on completion of the batch task. I can see in task manager that the job startup it logs data to jenkins-log.txt. The batch completes and I see in task manager that the batch is nolonger running. But Jenkins is still waiting for the task to complete. I do not see jenkins-result.txt writen to the workspace tmp durabletask directory. If I create the file manually or run the workflow-wrap.bat manually the task completes. This is an itermitent bug. Task might work 3 time then fail 5 times then work 8 times. No change to the system during this time. I am setting the job to run every min to see what the stats look like for longer run.

          job:
          {code}
          node {
           bat 'ping 127.0.0.1 -n 10'
           echo 'batch completed'
          }
          {code}

          Could be any command you want ping is just an easy one to have it take a little bit of time. And require nothing else installed on machine.

          I see many other task like this I have tested on serveral differnt machines using a base install of Jenkins.
          R. Tyler Croy made changes -
          Labels Original: workflow New: 2.0 workflow

          R. Tyler Croy added a comment -

          I have just tried this on a Windows Server 2012R2 instance on EC2 with the Jenkins 2.0RC1 installer.

          Using the Pipeline script:

          node {
            bat 'ping 127.0.0.1 -n 10'
            echo 'pinging done!'
          }
          

          I was able to successfully run the Pipeline a few times. I added a sleep 30 and was also able to abort the Pipeline successfully.

          This is with:

          • Durable Task 1.9
          • Pipeline 2.0
          • Pipeline Job, Pipeline Groovy 2.1

          R. Tyler Croy added a comment - I have just tried this on a Windows Server 2012R2 instance on EC2 with the Jenkins 2.0RC1 installer. Using the Pipeline script: node { bat 'ping 127.0.0.1 -n 10' echo 'pinging done!' } I was able to successfully run the Pipeline a few times. I added a sleep 30 and was also able to abort the Pipeline successfully. This is with: Durable Task 1.9 Pipeline 2.0 Pipeline Job, Pipeline Groovy 2.1
          R. Tyler Croy made changes -
          Attachment New: jenkins2-pipeline-batch-nohang.png [ 32426 ]
          R. Tyler Croy made changes -
          Labels Original: 2.0 workflow New: 2.0 testfest workflow

          R. Tyler Croy added a comment -

          dpd_30 I'm going to mark this as "Cannot Reproduce" but please re-open if you have additional reproduction steps that I could use to help verify.

          R. Tyler Croy added a comment - dpd_30 I'm going to mark this as "Cannot Reproduce" but please re-open if you have additional reproduction steps that I could use to help verify.
          R. Tyler Croy made changes -
          Assignee Original: Jesse Glick [ jglick ] New: R. Tyler Croy [ rtyler ]
          Resolution New: Cannot Reproduce [ 5 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          R. Tyler Croy added a comment -

          I think I actually found the reproduction case for this!

          If you click the "Build Now" button a lot to where pipelines are running in parallel the pipelines will all hang.

          R. Tyler Croy added a comment - I think I actually found the reproduction case for this! If you click the "Build Now" button a lot to where pipelines are running in parallel the pipelines will all hang.
          R. Tyler Croy made changes -
          Resolution Original: Cannot Reproduce [ 5 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]

            amuniz Antonio Muñiz
            dpd_30 Daniel Daugherty
            Votes:
            18 Vote for this issue
            Watchers:
            34 Start watching this issue

              Created:
              Updated:
              Resolved: