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

Jenkins does not invoke ProcessKillers for Windows recursively

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: core
    • Labels:
    • Similar Issues:

      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

            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            It is not possible to implement Cygwin Process Killer

            Show
            oleg_nenashev Oleg Nenashev added a comment - It is not possible to implement Cygwin Process Killer
            Hide
            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>

            Show
            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>
            Hide
            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

            Show
            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
            Hide
            danielbeck Daniel Beck added a comment -

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

            Show
            danielbeck Daniel Beck added a comment - JENKINS-9104 seems to indicate that processes are getting killed. What is this issue about, specifically?
            Hide
            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.

            Show
            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.
            Hide
            danielbeck Daniel Beck added a comment -

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

            Show
            danielbeck Daniel Beck added a comment - Doesn't JENKINS-9104 mean that child processes of launched processes do get killed on Windows?
            Hide
            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.

            Show
            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.
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            AFAICT this is still an open issue

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

              People

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

                Dates

                • Created:
                  Updated: