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

durable-task-lib binary wrapper not correctly spawning independent processes on windows agents

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • durable-task-plugin
    • None
    • using latest jenkins and a windows VM to host the permanent agent. OpenSSH installed on VM and agent connection is via SSH

      Should actually be for `durable-task-lib` (https://github.com/jenkinsci/lib-durable-task) but that did not come up as a possible component

      Stand up a controller and create a permanent windows agent. I used the following system properties:

      JENKINS_OPTIONS="-Dorg.jenkinsci.plugins.durabletask.WindowsBatchScript.USE_BINARY_WRAPPER=true -Dorg.jenkinsci.plugins.durabletask.PowershellScript.USE_BINARY_WRAPPER=true -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.USE_BINARY_WRAPPER=true -Dorg.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep.USE_WATCHING=true -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.HEARTBEAT_CHECK_INTERVAL=30"
      
      

      Create a job like this:

      
      pipeline {
          agent {
            label 'seco'
          }
      
           stages {
              stage('Long Running Process') {
                  steps {
                      echo "Starting long-running process on Windows node"
                      
                      // Use a single command with ping to create a long-running process
                      // Ping 127.0.0.1 1800 times with 1 second interval = 30 minutes
                      //bat 'ping 127.0.0.1 -n 1800 > null'
                      bat 'ping 127.0.0.1 -n 1800'
                      //bat 'c:\test.bat'
      
                      echo "After long-running process"
                  }
              }
          }
      }
      

      now execute this job. After it starts to run, kill the agent process in windows. Observe that the wrapper and its child ping process both exit immediately.

            Unassigned Unassigned
            mikecirioli mike cirioli
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: