jenkinsci / jenkinsci/durable-task-plugin

[JENKINS-58499] jenkins windows cmd process never stops

Open
#459 0 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

Please assist.  Thank you for reading!

We have a simple jenkins job that runs a .bat or dos cmd file.  "execute windows batch command"

c:\test.bat

exit /b

The job runs on a schedule but each time it creates a cmd process (see screenshot). These cmd process never end, even after the job ends. They become like zombies and hang around forever. Eventually, we get 20 or more of them which impact our QA tests. To avoid having this happen to the master jenkins server we often run most of our jobs on windows slaves and this problem still happens.  The slaves are running windows 10 and often in the slave console mode so the slave runs in a cmd window and not as service. That means if we just kill all the cmd's we also risk killing the slave node.  I think this is a bug. If it worked correctly after a time the cmd's would go away once the job is complete.  I see no way to make this happen now.  Right now  every run of the job creates a cmd that sticks around forever. Please assist. Thank you.

 

 

 

 

 

 

 

---
Originally reported by heropurpose, imported from: jenkins windows cmd process never stops


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

Raw content of original issue

Please assist.  Thank you for reading!

We have a simple jenkins job that runs a .bat or dos cmd file.  "execute windows batch command"

c:\test.bat
exit /b

The job runs on a schedule but each time it creates a cmd process (see screenshot). These cmd process never end, even after the job ends. They become like zombies and hang around forever. Eventually, we get 20 or more of them which impact our QA tests. To avoid having this happen to the master jenkins server we often run most of our jobs on windows slaves and this problem still happens.  The slaves are running windows 10 and often in the slave console mode so the slave runs in a cmd window and not as service. That means if we just kill all the cmd's we also risk killing the slave node.  I think this is a bug. If it worked correctly after a time the cmd's would go away once the job is complete.  I see no way to make this happen now.  Right now  every run of the job creates a cmd that sticks around forever. Please assist. Thank you.

 

 

 

 

 

 

 

  • environment: jenkins windows 2.x versions

1 attachment

- [cmd.png](https://issues.jenkins.io/secure/attachment/48003/cmd.png)
> ![cmd.png](https://issues.jenkins.io/secure/attachment/48003/cmd.png)

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.