[JIRA] [core] (JENKINS-28968) Aborting builds does not kill surefire sub-process

3 views
Skip to first unread message

rddesmond@gmail.com (JIRA)

unread,
Jun 18, 2015, 10:37:01 AM6/18/15
to jenkinsc...@googlegroups.com
Ryan Desmond created an issue
 
Jenkins / Bug JENKINS-28968
Aborting builds does not kill surefire sub-process
Issue Type: Bug Bug
Assignee: Unassigned
Components: core, maven-plugin
Created: 18/Jun/15 2:36 PM
Environment: Jenkins 1.617, master and slaves running on Centos 7.

xUnit plugin 1.96
Workflow: Step API 1.8
Windows Slaves Plugin 1.1
Version Number Plug-In 1.5
Token Macro Plugin 1.10
Throttle Concurrent Builds Plug-in 1.8.4
SSH Slaves plugin 1.9
SSH Credentials Plugin 1.11
SSH Agent Plugin 1.7
SonarQube Plugin 2.2.1
Slack Notification Plugin 1.8
Script Security Plugin 1.14
SCM API Plugin 0.2
Run Condition Plugin 1.0
ruby-runtime 0.12
Rebuilder 1.24
rbenv plugin 0.0.16
promoted builds plugin 2.21
Poll SCM plugin 1.2
Plain Credentials Plugin 1.1
Parameterized Trigger plugin 2.26
PAM Authentication plugin 1.2
OWASP Markup Formatter Plugin 1.3
NodeJS Plugin 0.2.1
Node and Label parameter plugin 1.5.1
Multiple SCMs plugin 0.4
Maven Repository Server Plugin 1.2
Maven Integration plugin 2.10
Matrix Project Plugin 1.5
Matrix Authorization Strategy Plugin 1.2
MapDB API Plugin 1.0.6.0
Mailer Plugin 1.15
Log Parser Plugin 1.0.8
Libvirt Slaves plugin 1.8.5
LDAP Plugin 1.11
JUnit Plugin 1.6
jQuery UI plugin 1.0.2
jQuery plugin 1.11.2-0
Join plugin 1.15
Javadoc Plugin 1.3
Hudson Post build task 1.8
Hudson Groovy builder 1.25
Groovy Postbuild 2.2
Global Post Script Plugin 1.0.8
Gitlab Hook Plugin 1.4.0
GIT plugin 2.3.5
GIT client plugin 1.17.1
Flaky Test Handler plugin 1.0.1
External Monitor Job Type Plugin 1.4
Extended Choice Parameter Plug-In 0.44
Environment Script Plugin 1.1.2
disk-usage plugin 0.25
Dependency Graph Viewer Plugin 0.11
Custom Tools Plugin 0.4.4
Credentials Plugin 1.22
Credentials Binding Plugin 1.4
Copy Artifact Plugin 1.35.1
Config File Provider Plugin 2.8.1
conditional-buildstep 1.3.3
CloudBees Build Flow plugin 0.18
buildgraph-view 1.1.1
build timeout plugin 1.14.1
AnsiColor 0.4.1
Priority: Major Major
Reporter: Ryan Desmond

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

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

rddesmond@gmail.com (JIRA)

unread,
Jun 18, 2015, 10:43:01 AM6/18/15
to jenkinsc...@googlegroups.com

rddesmond@gmail.com (JIRA)

unread,
Jun 18, 2015, 10:43:01 AM6/18/15
to jenkinsc...@googlegroups.com
Ryan Desmond updated an issue
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. g.  this is killed with the job).

rddesmond@gmail.com (JIRA)

unread,
Jun 18, 2015, 10:43:01 AM6/18/15
to jenkinsc...@googlegroups.com
Ryan Desmond assigned an issue to Unassigned
Change By: Ryan Desmond
Assignee: Ryan Desmond

dbeck@cloudbees.com (JIRA)

unread,
Jun 18, 2015, 10:55:01 AM6/18/15
to jenkinsc...@googlegroups.com
Daniel Beck commented on Bug JENKINS-28968
 
Re: Aborting builds does not kill surefire sub-process

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

rddesmond@gmail.com (JIRA)

unread,
Jun 18, 2015, 3:36:01 PM6/18/15
to jenkinsc...@googlegroups.com

radek.antoniuk@quiddia.com (JIRA)

unread,
Jun 19, 2015, 1:41:03 AM6/19/15
to jenkinsc...@googlegroups.com

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.

rddesmond@gmail.com (JIRA)

unread,
Jun 19, 2015, 10:14:01 AM6/19/15
to jenkinsc...@googlegroups.com
Ryan Desmond updated an issue
Change By: Ryan Desmond
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).

rddesmond@gmail.com (JIRA)

unread,
Jun 19, 2015, 10:16:01 AM6/19/15
to jenkinsc...@googlegroups.com
Ryan Desmond updated an issue

Script to create a workspace with a hung test.

Change By: Ryan Desmond
Attachment: JENKINS-28968.txt

rddesmond@gmail.com (JIRA)

unread,
Jun 19, 2015, 10:21:24 AM6/19/15
to jenkinsc...@googlegroups.com
Ryan Desmond edited a comment on Bug JENKINS-28968
 
Re: Aborting builds does not kill surefire sub-process
Script I worked out a baseline procedure  to  create  recreate the problem.

Steps:
 1. Create
 a  workspace with  new Maven Project
 2. Add
 a  hung  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}}

rddesmond@gmail.com (JIRA)

unread,
Jun 19, 2015, 10:25:02 AM6/19/15
to jenkinsc...@googlegroups.com
Ryan Desmond edited a comment on Bug JENKINS-28968
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

{ { quote}
$ 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

{quote
} }

rddesmond@gmail.com (JIRA)

unread,
Jun 19, 2015, 10:41:01 AM6/19/15
to jenkinsc...@googlegroups.com

It did kill the immediate subprocess.

Just before aborting:

$ ps aux | grep sure

[user] 4220 0.0 0.0 113120 1188 ? S 10:12 0:00 /bin/sh -c cd /home/ussuser/jenkins/workspace/sleeptest2 && /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51-2.4.5.5.el7.x86_64/jre/bin/java -jar /home/[user]/jenkins/workspace/sleeptest2/target/surefire/surefirebooter449566822541979931.jar /home/[user]/jenkins/workspace/sleeptest2/target/surefire/surefire7684357083774633779tmp /home/[user]/jenkins/workspace/sleeptest2/target/surefire/surefire_01856690741005869733tmp
[user] 4222 13.0 0.1 6102248 31668 ? Sl 10:12 0:00 java -jar /home/[user]/jenkins/workspace/sleeptest2/target/surefire/surefirebooter449566822541979931.jar /home/[user]/jenkins/workspace/sleeptest2/target/surefire/surefire7684357083774633779tmp /home/[user]/jenkins/workspace/sleeptest2/target/surefire/surefire_01856690741005869733tmp

After aborting:

$ ps aux | grep sure

[user] 4222 5.2 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

rddesmond@gmail.com (JIRA)

unread,
Jun 19, 2015, 10:42:01 AM6/19/15
to jenkinsc...@googlegroups.com
Ryan Desmond edited a comment on Bug JENKINS-28968
It did kill the immediate subprocess.

Just before aborting:
{quote}

$ ps aux | grep sure
[user]   4220  0.0  0.0 113120  1188 ?        S    10:12   0:00 /bin/sh -c cd /home/ussuser/jenkins/workspace/ sleeptest2 sleeptest  && /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51-2.4.5.5.el7.x86_64/jre/bin/java -jar /home/[user]/jenkins/workspace/ sleeptest2 sleeptest /target/surefire/surefirebooter449566822541979931.jar /home/[user]/jenkins/workspace/ sleeptest2 sleeptest /target/surefire/surefire7684357083774633779tmp /home/[user]/jenkins/workspace/ sleeptest2 sleeptest /target/surefire/surefire_01856690741005869733tmp
[user]   4222 13.0  0.1 6102248 31668 ?       Sl   10:12   0:00 java -jar /home/[user]/jenkins/workspace/
sleeptest2 sleeptest /target/surefire/surefirebooter449566822541979931.jar /home/[user]/jenkins/workspace/ sleeptest2 sleeptest /target/surefire/surefire7684357083774633779tmp /home/[user]/jenkins/workspace/ sleeptest2 sleeptest /target/surefire/surefire_01856690741005869733tmp
{quote}

After aborting:
{quote}

$ ps aux | grep sure
[user]   4222  5.2  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
{quote}

rddesmond@gmail.com (JIRA)

unread,
Jun 19, 2015, 10:52:01 AM6/19/15
to jenkinsc...@googlegroups.com
Ryan Desmond edited a comment on Bug JENKINS-28968
It I  did  kill  notice that it killed  the immediate subprocess.


Just before aborting:
{quote}
$ ps aux | grep sure
[user]   4220  0.0  0.0 113120  1188 ?        S    10:12   0:00 /bin/sh -c cd /home/ussuser/jenkins/workspace/sleeptest && /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51-2.4.5.5.el7.x86_64/jre/bin/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
[user]   4222 13.0  0.1 6102248 31668 ?       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

{quote}

After aborting:
{quote}
$ ps aux | grep sure
[user]   4222  5.2  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
{quote}

rddesmond@gmail.com (JIRA)

unread,
Jun 19, 2015, 11:21:01 AM6/19/15
to jenkinsc...@googlegroups.com
Ryan Desmond closed an issue as Duplicate
 

I think this is a duplicate of JENKINS-26048. Closing and moving the conversation there.

Change By: Ryan Desmond
Status: Open Closed
Resolution: Duplicate

rddesmond@gmail.com (JIRA)

unread,
Jun 26, 2015, 5:27:06 PM6/26/15
to jenkinsc...@googlegroups.com
Ryan Desmond commented on Bug JENKINS-28968
 
Re: Aborting builds does not kill surefire sub-process

I think this is a duplicate, closing and moving the conversation there.

cobexer@gmail.com (JIRA)

unread,
Jun 27, 2016, 10:21:02 AM6/27/16
to jenkinsc...@googlegroups.com

Jesse Glick Are pipelines also using this code to cleanup runaway child processes? I just had a screen session escape with a VM from a pipeline job.

This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

nirmitsrivastava@gmail.com (JIRA)

unread,
May 29, 2019, 4:23:05 AM5/29/19
to jenkinsc...@googlegroups.com

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

Jenkins version being used : Jenkins ver. 2.136

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

nirmitsrivastava@gmail.com (JIRA)

unread,
May 29, 2019, 4:23:05 AM5/29/19
to jenkinsc...@googlegroups.com
Nirmit Srivastava edited a comment on Bug JENKINS-28968
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|https://jenkins.io/]
Reply all
Reply to author
Forward
0 new messages