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

Jenkins does not invoke ProcessKillers for Windows recursively

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • core

    Description

      Currently, On Windows Jenkins calls ProcessKillers for the root process only. On Linux machines the extension point is being called for the entire process tree. The implementation should be synchronized for all platforms.

      Solution:

      • Built-in killRecursive() of WinProc should be replaced by a recursive implementation from UnixProcess (depends on JENKINS-20289)

      Attachments

        Issue Links

          Activity

            oleg_nenashev Oleg Nenashev added a comment -

            It is not possible to implement Cygwin Process Killer

            oleg_nenashev Oleg Nenashev added a comment - It is not possible to implement Cygwin Process Killer

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            core/src/main/java/hudson/util/ProcessTree.java
            http://jenkins-ci.org/commit/jenkins/20859b4aad63689b5338fa32f50cb731118bf16f
            Log:
            Windows::killRecursively() invokes process killers after completion.
            Resolves https://issues.jenkins-ci.org/browse/JENKINS-19156

            Signed-off-by: Oleg Nenashev <nenashev@synopsys.com>

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: core/src/main/java/hudson/util/ProcessTree.java http://jenkins-ci.org/commit/jenkins/20859b4aad63689b5338fa32f50cb731118bf16f Log: Windows::killRecursively() invokes process killers after completion. Resolves https://issues.jenkins-ci.org/browse/JENKINS-19156 Signed-off-by: Oleg Nenashev <nenashev@synopsys.com>
            oleg_nenashev Oleg Nenashev added a comment -

            Previous fix invokes ProcessKiller only for top-level process.
            Built-in killRecursive() of WinProc should be replaced by manual implementation from UnixProcess

            oleg_nenashev Oleg Nenashev added a comment - Previous fix invokes ProcessKiller only for top-level process. Built-in killRecursive() of WinProc should be replaced by manual implementation from UnixProcess
            danielbeck Daniel Beck added a comment -

            JENKINS-9104 seems to indicate that processes are getting killed. What is this issue about, specifically?

            danielbeck Daniel Beck added a comment - JENKINS-9104 seems to indicate that processes are getting killed. What is this issue about, specifically?
            oleg_nenashev Oleg Nenashev added a comment -

            Better late than never...
            I've updated the issue title and description.

            Hopefully, I'll be able to spend some time on the winp library to implement a native getChildPids() API method.

            oleg_nenashev Oleg Nenashev added a comment - Better late than never... I've updated the issue title and description. Hopefully, I'll be able to spend some time on the winp library to implement a native getChildPids() API method.
            danielbeck Daniel Beck added a comment -

            Doesn't JENKINS-9104 mean that child processes of launched processes do get killed on Windows?

            danielbeck Daniel Beck added a comment - Doesn't JENKINS-9104 mean that child processes of launched processes do get killed on Windows?
            oleg_nenashev Oleg Nenashev added a comment - - edited

            Yes, JENKINS-9104 resolves the termination issue in general cases, but this issue is not related to the process termination. It means the correct handling of process termination events.

            ProcessKiller is actually an event handler for the process termination.
            It's being used to call some additional procedures (e.g. correct Cygwin processes termination in JENKINS-13615 ). Currently there's no option to fire event handlers for the each process in the tree.

            oleg_nenashev Oleg Nenashev added a comment - - edited Yes, JENKINS-9104 resolves the termination issue in general cases, but this issue is not related to the process termination. It means the correct handling of process termination events. ProcessKiller is actually an event handler for the process termination. It's being used to call some additional procedures (e.g. correct Cygwin processes termination in JENKINS-13615 ). Currently there's no option to fire event handlers for the each process in the tree.
            oleg_nenashev Oleg Nenashev added a comment -

            AFAICT this is still an open issue

            oleg_nenashev Oleg Nenashev added a comment - AFAICT this is still an open issue

            People

              Unassigned Unassigned
              oleg_nenashev Oleg Nenashev
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: