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

Pipeline 'bat' hangs on ws with forward slash path separator

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • durable-task-plugin
    • None

      After upgrading Jenkins LTS (from 2.89.2 to 2.89.4) and several plugins yesterday we have an issue with hanging "bat" commands on windows nodes.

      The following pipeline illustrates the issue:

      node() {
          ws('D:\\') {
              bat 'echo Hello 1'
          }
      
          ws('D:/') {
              bat 'echo Hello 2'
          }
      }
      

      The output is:

      Running in Durability level: MAX_SURVIVABILITY
      [Pipeline] node
      Running on XXX in C:\Jenkins\workspace\YYY
      [Pipeline] {
      [Pipeline] ws
      Running in D:\src
      [Pipeline] {
      [Pipeline] bat
      [src] Running batch script

      D:\src>echo Hello 1
      Hello 1
      [Pipeline] }
      [Pipeline] // ws
      [Pipeline] ws
      Running in D:/src
      [Pipeline] {
      [Pipeline] bat
      [D:/src] Running batch script

      D:\src>echo Hello 2
      Hello 2

      And the pipeline hangs here / does not finish ever.

      So it looks like setting a workspace with a path containing a forward slash does not work anymore with bat commands.

      I also tried the powershell command and that works without issues.

       

          [JENKINS-49986] Pipeline 'bat' hangs on ws with forward slash path separator

          Wouter Slob created issue -
          Wouter Slob made changes -
          Summary Original: Pipelin bat hangs on ws with forward slash path separator New: Pipeline 'bat' hangs on ws with forward slash path separator
          Wouter Slob made changes -
          Description Original: After upgrading Jenkins LTS (from 2.89.2 to 2.89.4) and several plugins yesterday we have an issue with hanging "bat" commands on windows nodes.

          The following pipeline illustrates the issue:
          {code:java}
          node() {
              ws("D:\\") {
                  bat 'echo Hello 1'
              }

              ws("D:/") {
                  bat 'echo Hello 2'
              }
          }
          {code}
          The output is:

          Running in Durability level: MAX_SURVIVABILITY
          [Pipeline] node
          Running on XXX in C:\Jenkins\workspace\YYY
          [Pipeline] \{
          [Pipeline] ws
          Running in D:\src
          [Pipeline] \{
          [Pipeline] bat
          [src] Running batch script

          D:\src>echo Hello 1
          Hello 1
          [Pipeline] }
          [Pipeline] // ws
          [Pipeline] ws
          Running in D:/src
          [Pipeline] \{
          [Pipeline] bat
          [D:/src] Running batch script

          D:\src>echo Hello 2
          Hello 2

          And the pipeline hangs here / does not finish ever.

          So it looks like setting a workspace with a path containing a forward slash does not work anymore with bat commands.

          I also tried the powershell command and that works without issues.

           
          New: After upgrading Jenkins LTS (from 2.89.2 to 2.89.4) and several plugins yesterday we have an issue with hanging "bat" commands on windows nodes.

          The following pipeline illustrates the issue:
          {code:java}
          node() {
              ws("D:\\") {
                  bat 'echo Hello 1'
              }

              ws("D:/") {
                  bat 'echo Hello 2'
              }
          }
          {code}
          The output is:
          {quote}Running in Durability level: MAX_SURVIVABILITY
           [Pipeline] node
           Running on XXX in C:\Jenkins\workspace\YYY
           [Pipeline] \{
           [Pipeline] ws
           Running in D:\src
           [Pipeline] \{
           [Pipeline] bat
           [src] Running batch script

          D:\src>echo Hello 1
           Hello 1
           [Pipeline] }
           [Pipeline] // ws
           [Pipeline] ws
           Running in D:/src
           [Pipeline] \{
           [Pipeline] bat
           [D:/src] Running batch script

          D:\src>echo Hello 2
           Hello 2
          {quote}
          And the pipeline hangs here / does not finish ever.

          So it looks like setting a workspace with a path containing a forward slash does not work anymore with bat commands.

          I also tried the powershell command and that works without issues.

           
          Wouter Slob made changes -
          Description Original: After upgrading Jenkins LTS (from 2.89.2 to 2.89.4) and several plugins yesterday we have an issue with hanging "bat" commands on windows nodes.

          The following pipeline illustrates the issue:
          {code:java}
          node() {
              ws("D:\\") {
                  bat 'echo Hello 1'
              }

              ws("D:/") {
                  bat 'echo Hello 2'
              }
          }
          {code}
          The output is:
          {quote}Running in Durability level: MAX_SURVIVABILITY
           [Pipeline] node
           Running on XXX in C:\Jenkins\workspace\YYY
           [Pipeline] \{
           [Pipeline] ws
           Running in D:\src
           [Pipeline] \{
           [Pipeline] bat
           [src] Running batch script

          D:\src>echo Hello 1
           Hello 1
           [Pipeline] }
           [Pipeline] // ws
           [Pipeline] ws
           Running in D:/src
           [Pipeline] \{
           [Pipeline] bat
           [D:/src] Running batch script

          D:\src>echo Hello 2
           Hello 2
          {quote}
          And the pipeline hangs here / does not finish ever.

          So it looks like setting a workspace with a path containing a forward slash does not work anymore with bat commands.

          I also tried the powershell command and that works without issues.

           
          New: After upgrading Jenkins LTS (from 2.89.2 to 2.89.4) and several plugins yesterday we have an issue with hanging "bat" commands on windows nodes.

          The following pipeline illustrates the issue:
          {code:java}
          node() {
              ws('D:\\') {
                  bat 'echo Hello 1'
              }

              ws('D:/') {
                  bat 'echo Hello 2'
              }
          }
          {code}
          The output is:
          {quote}Running in Durability level: MAX_SURVIVABILITY
           [Pipeline] node
           Running on XXX in C:\Jenkins\workspace\YYY
           [Pipeline] \{
           [Pipeline] ws
           Running in D:\src
           [Pipeline] \{
           [Pipeline] bat
           [src] Running batch script

          D:\src>echo Hello 1
           Hello 1
           [Pipeline] }
           [Pipeline] // ws
           [Pipeline] ws
           Running in D:/src
           [Pipeline] \{
           [Pipeline] bat
           [D:/src] Running batch script

          D:\src>echo Hello 2
           Hello 2
          {quote}
          And the pipeline hangs here / does not finish ever.

          So it looks like setting a workspace with a path containing a forward slash does not work anymore with bat commands.

          I also tried the powershell command and that works without issues.

           
          Wouter Slob made changes -
          Priority Original: Minor [ 4 ] New: Major [ 3 ]

            Unassigned Unassigned
            wouterslob Wouter Slob
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: