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

PowerShell pipeline step does not seem to be durable

XMLWordPrintable

      While running a PowerShell pipeline step I triggered a graceful shutdown, while also monitoring the powershell.exe process on the Jenkins host. The PowerShell process unexpectedly crashed, and the job failed with a -1 exit code.

      Job definition:

      node ('Windows') {
          powershell '''
          while (1) {
              write-host "Testing"
              Start-Sleep 1
          }
          '''
      }
      

      Console output:

      Started by user Gabriel Loewen
      Running in Durability level: MAX_SURVIVABILITY
      [Pipeline] node
      Running on WinHost in C:\Program Files (x86)\Jenkins\workspace\Test Durability
      [Pipeline] {
      [Pipeline] powershell
      [Test Durability] Running PowerShell script
      Testing
      Testing
      Testing
      Testing
      Testing
      Testing
      Testing
      Testing
      Testing
      Testing
      Testing
      Testing
      Resuming build at Fri May 04 17:40:07 UTC 2018 after Jenkins restart
      Waiting to resume part of Test Durability #5: ???
      Testing
      Waiting to resume part of Test Durability #5: WinHost is offline
      Waiting to resume part of Test Durability #5: WinHost is offline
      Waiting to resume part of Test Durability #5: WinHost is offline
      Ready to run at Fri May 04 17:40:19 UTC 2018
      Testing
      Testing
      Testing
      Testing
      Testing
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      ERROR: script returned exit code -1
      Finished: FAILURE

       

      I ran the same test again and this time it hung, even though the PowerShell process seems to have crashed.

      At this point I do not know how to debug the issue, and what can be done to ensure durability in the powershell pipeline step.

      svanoort, teilo, let me know if you need any more details and if you can assist in this investigation.

            Unassigned Unassigned
            gabloe Gabriel Loewen
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: