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

XShell does not kill running process if job is getting aborted

    Details

    • Type: Bug
    • Status: In Progress (View Workflow)
    • Priority: Critical
    • Resolution: Unresolved
    • Component/s: xshell-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.580.1 with XShell 0.9
    • Similar Issues:

      Description

      As we have seen lately XShell is not able to kill a running process once it is running on the slave, and the user aborts the job on the master machine.

      Current result is that the job is marked as aborted on the master, but it is still running on the client. This totally breaks our testruns because Jenkins thinks the node is free again, and schedules the next job for this node. But given that by our definition only a single job can run on a node, it will fail.

      The Jenkins log shows the following when aborting a job:

      mozilla-aurora_update #2 aborted
      java.lang.InterruptedException: sleep interrupted
      at java.lang.Thread.sleep(Native Method)
      at hudson.plugins.xshell.XShellBuilder.perform(XShellBuilder.java:158)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
      at hudson.model.Build$BuildExecution.build(Build.java:199)
      at hudson.model.Build$BuildExecution.doRun(Build.java:160)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:585)
      at hudson.model.Run.execute(Run.java:1684)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:231)

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Marco Ambu
            Path:
            src/main/java/hudson/plugins/xshell/XShellBuilder.java
            http://jenkins-ci.org/commit/xshell-plugin/9da2ce427c43f4db9fa062cf4a1e8e6943a0810b
            Log:
            Merge pull request #13 from JeremyMarshall/master

            JENKINS-25600 fix user abort

            Compare: https://github.com/jenkinsci/xshell-plugin/compare/d29b3cb1f4db...9da2ce427c43

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Marco Ambu Path: src/main/java/hudson/plugins/xshell/XShellBuilder.java http://jenkins-ci.org/commit/xshell-plugin/9da2ce427c43f4db9fa062cf4a1e8e6943a0810b Log: Merge pull request #13 from JeremyMarshall/master JENKINS-25600 fix user abort Compare: https://github.com/jenkinsci/xshell-plugin/compare/d29b3cb1f4db...9da2ce427c43
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: JeremyMarshall
            Path:
            src/main/java/hudson/plugins/xshell/XShellBuilder.java
            http://jenkins-ci.org/commit/xshell-plugin/2ffbffa3dc993d188a39df7db6cbb93cdd43aaa9
            Log:
            JENKINS-25600 fix user abort

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: JeremyMarshall Path: src/main/java/hudson/plugins/xshell/XShellBuilder.java http://jenkins-ci.org/commit/xshell-plugin/2ffbffa3dc993d188a39df7db6cbb93cdd43aaa9 Log: JENKINS-25600 fix user abort
            Hide
            jeremym Jeremy Marshall added a comment -

            Rethrowing abort to set job to aborted.

            Show
            jeremym Jeremy Marshall added a comment - Rethrowing abort to set job to aborted.
            Hide
            jeremym Jeremy Marshall added a comment -

            fixed in PR https://github.com/jenkinsci/xshell-plugin/pull/13

            I added a try block to catch the abort and kill the process

            Show
            jeremym Jeremy Marshall added a comment - fixed in PR https://github.com/jenkinsci/xshell-plugin/pull/13 I added a try block to catch the abort and kill the process
            Hide
            whimboo Henrik Skupin added a comment -

            Ok, I was able to get XShell built on my own and I checked a build before and after the above landed PR. As I'm able to see the broken behavior as reported here is really caused by your patch from PR #8.

            Show
            whimboo Henrik Skupin added a comment - Ok, I was able to get XShell built on my own and I checked a build before and after the above landed PR. As I'm able to see the broken behavior as reported here is really caused by your patch from PR #8.

              People

              • Assignee:
                jeremym Jeremy Marshall
                Reporter:
                whimboo Henrik Skupin
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: