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

Aborting builds does not kill surefire sub-process

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reopened (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: core, maven-plugin
    • Labels:
      None
    • Environment:
    • Similar Issues:

      Description

      I have a test that (unfortunately) occasionally hangs waiting on an external dependency. I recently noticed that if the test is aborted, the surefire instance remains running on the slave machine!

      This does not happen when running "sleep 50000" in a command window (i.e. this is killed with the job).

        Attachments

          Issue Links

            Activity

            Hide
            borisivan boris ivan added a comment -

            It's 64 bit Windows (have seen this on Windows 7, Windows 10), and 64 bit Java being executed in a 64 bit powershell window, to load slave.jar from the command line.

            As far as the maven job goes, I think that starts with a 64 bit version of java too, but will try and make sure. But as far as loading the jenkins slave agent goes, it's definitely being loaded via 64 bit java.

            Show
            borisivan boris ivan added a comment - It's 64 bit Windows (have seen this on Windows 7, Windows 10), and 64 bit Java being executed in a 64 bit powershell window, to load slave.jar from the command line. As far as the maven job goes, I think that starts with a 64 bit version of java too, but will try and make sure. But as far as loading the jenkins slave agent goes, it's definitely being loaded via 64 bit java.
            Hide
            martin_gerdes Martin Gerdes added a comment -

            We have this problem too.

            For some yet unresolved reason we have surefire and mavenInstallation processes which neven finish (developers are still trying to determine the cause).

            But because of that, this bug is pretty terrible for us: When developers stop a job in Jenkins, the sufrefire and mavenInstallation processes remain, consuming memory and CPU until the server becomes unresponsive or oom events occur.

            Environment:

            Jenkins ver. 2.73.1 running in a docker instance (jenkins/jenkins:lts, which uses Debian Version 9.1)
            Used Java:
              surefire: Java SE Development Kit 7u80 (installed from within Jenkins)
              mavenInstallation: openjdk-8-jdk:amd64           8u141-b15-1~deb9u1 (system wide java installation in the docker container)

            Show
            martin_gerdes Martin Gerdes added a comment - We have this problem too. For some yet unresolved reason we have surefire and mavenInstallation processes which neven finish (developers are still trying to determine the cause). But because of that, this bug is pretty terrible for us: When developers stop a job in Jenkins, the sufrefire and mavenInstallation processes remain, consuming memory and CPU until the server becomes unresponsive or oom events occur. Environment: Jenkins ver. 2.73.1 running in a docker instance (jenkins/jenkins:lts, which uses Debian Version 9.1) Used Java:   surefire: Java SE Development Kit 7u80 (installed from within Jenkins)   mavenInstallation: openjdk-8-jdk:amd64           8u141-b15-1~deb9u1 (system wide java installation in the docker container)
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            OK, so it happens in Linux as well. Interesting...

            Show
            oleg_nenashev Oleg Nenashev added a comment - OK, so it happens in Linux as well. Interesting...
            Hide
            martin_gerdes Martin Gerdes added a comment -

            It also definitely is not a case of mixing 32 and 64bit java versions:

            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -version
            openjdk version "1.8.0_141"
            OpenJDK Runtime Environment (build 1.8.0_141-8u141-b15-1~deb9u1-b15)
            OpenJDK 64-Bit Server VM (build 25.141-b15, mixed mode)

            /var/jenkins_home/tools/hudson.model.JDK/JDK-7/bin/java -version
            java version "1.7.0_80"
            Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
            Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)

            Could it be because we are mixing java 7 and java 8 here?

            Any other ideas of what to change to avoid being affected by this bug?

            Show
            martin_gerdes Martin Gerdes added a comment - It also definitely is not a case of mixing 32 and 64bit java versions: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -version openjdk version "1.8.0_141" OpenJDK Runtime Environment (build 1.8.0_141-8u141-b15-1~deb9u1-b15) OpenJDK 64-Bit Server VM (build 25.141-b15, mixed mode) /var/jenkins_home/tools/hudson.model.JDK/JDK-7/bin/java -version java version "1.7.0_80" Java(TM) SE Runtime Environment (build 1.7.0_80-b15) Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode) Could it be because we are mixing java 7 and java 8 here? Any other ideas of what to change to avoid being affected by this bug?
            Hide
            nirmits Nirmit Srivastava added a comment - - edited

            Is there any solution to above problem. We are facing similar issue where surefire booter process keeps on running on a linux slave machine.

            Jenkins version being used : Jenkins ver. 2.136

            Show
            nirmits Nirmit Srivastava added a comment - - edited Is there any solution to above problem. We are facing similar issue where surefire booter process keeps on running on a linux slave machine. Jenkins version being used :  Jenkins ver. 2.136

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              rddesmond Ryan Desmond
              Votes:
              5 Vote for this issue
              Watchers:
              15 Start watching this issue

                Dates

                Created:
                Updated: