jenkinsci / jenkinsci/durable-task-plugin

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

Open
#417 3 comments 0 reactions 0 assignees View on GitHub
component:durable-task-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
30
Forks
101
PR merge metrics
No merged PRs in 30d

Description

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.

 

---
Originally reported by wouterslob, imported from: Pipeline 'bat' hangs on ws with forward slash path separator


  • status: Open
  • priority: Major
  • component(s): durable-task-plugin
  • resolution: Unresolved
  • votes: 1
  • watchers: 2
  • imported: 2025-12-09

Raw content of original issue

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.

 

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.