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

Aborting builds does not kill surefire sub-process

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • core, maven-plugin
    • None

      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).

          [JENKINS-28968] Aborting builds does not kill surefire sub-process

          Ryan Desmond created issue -
          Ryan Desmond made changes -
          Assignee New: Ryan Desmond [ rddesmond ]
          Ryan Desmond made changes -
          Description Original: 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 (e.g. this is killed with the job).
          New: 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).
          Ryan Desmond made changes -
          Assignee Original: Ryan Desmond [ rddesmond ]

          Daniel Beck added a comment -

          Is this a freestyle project with Maven build step, or a Maven project?

          Daniel Beck added a comment - Is this a freestyle project with Maven build step, or a Maven project?

          Ryan Desmond added a comment -

          I noticed it with a maven project.

          Ryan Desmond added a comment - I noticed it with a maven project.

          I remember I had a really similar issue in Bamboo maven builds, so not sure whether that is not connected with a maven+surefire itself.

          Radek Antoniuk added a comment - I remember I had a really similar issue in Bamboo maven builds, so not sure whether that is not connected with a maven+surefire itself.
          Ryan Desmond made changes -
          Description Original: 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).
          New: 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).

          Ryan Desmond added a comment - - edited

          I worked out a baseline procedure to recreate the problem.

          Steps:
          1. Create a new Maven Project
          2. Add a shell pre-step to setup the workspace. It should have the contents of JENKINS-28968.txt
          3. Add the goal "test" to the build step
          4. Run and after the console prints "Now sleeping" Abort.

          Expected Results:
          1. Surefire is no longer running on the slave machine

          Actual Results:
          1. Surefire remains running

          $ ps aux | grep sure
          [user] 4222 4.7 0.1 6102248 31612 ? Sl 10:12 0:00 java -jar /home/[user]/jenkins/workspace/sleeptest/target/surefire/surefirebooter449566822541979931.jar /home/[user]/jenkins/workspace/sleeptest/target/surefire/surefire7684357083774633779tmp /home/[user]/jenkins/workspace/sleeptest/target/surefire/surefire_01856690741005869733tmp

          Ryan Desmond added a comment - - edited I worked out a baseline procedure to recreate the problem. Steps: 1. Create a new Maven Project 2. Add a shell pre-step to setup the workspace. It should have the contents of JENKINS-28968.txt 3. Add the goal "test" to the build step 4. Run and after the console prints "Now sleeping" Abort. Expected Results: 1. Surefire is no longer running on the slave machine Actual Results: 1. Surefire remains running $ ps aux | grep sure [user] 4222 4.7 0.1 6102248 31612 ? Sl 10:12 0:00 java -jar /home/ [user] /jenkins/workspace/sleeptest/target/surefire/surefirebooter449566822541979931.jar /home/ [user] /jenkins/workspace/sleeptest/target/surefire/surefire7684357083774633779tmp /home/ [user] /jenkins/workspace/sleeptest/target/surefire/surefire_01856690741005869733tmp
          Ryan Desmond made changes -
          Attachment New: JENKINS-28968.txt [ 29985 ]

            Unassigned Unassigned
            rddesmond Ryan Desmond
            Votes:
            6 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated: