You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "David Biesack (JIRA)" <ji...@codehaus.org> on 2011/10/12 15:37:09 UTC
[jira] Created: (SUREFIRE-773) surefire forked processes not always
killed after timeout
surefire forked processes not always killed after timeout
---------------------------------------------------------
Key: SUREFIRE-773
URL: https://jira.codehaus.org/browse/SUREFIRE-773
Project: Maven Surefire
Issue Type: Bug
Components: process forking
Affects Versions: 2.8
Environment: 64 bit RHEL 5.5 , 64-bit Java 1.6.0_23
Reporter: David Biesack
Our forked JUnit/surefire processes are not always stopping correctly when timing out within a Maven build
(running inside our Jenkins CI server, ver 1.425).
The maven build finishes and Jenkins shows a failed/unstable build.
These running processes cause problems later, because the tests may be holding a resource like a port, and subsequent rebuilds fail because the
tests fail.
For example, even though no Maven builds are currently running, ps shows about a dozen Java processes running,
with commands such as:
{noformat}
/usr/local/java-1.6_23/jre/bin/java -Xms1g -Xmx5g -Djava.library.path=/u/jenkinsci/.hudson/jobs/rtolap.jtt.tests/workspace/target/lib \
-jar /u/jenkinsci/.hudson/jobs/rtolap.jtt.tests/workspace/target/surefire/surefirebooter1374560535780866887.jar \
/u/jenkinsci/.hudson/jobs/rtolap.jtt.tests/workspace/target/surefire/surefire65313...
/usr/local/java-1.6_23/jre/bin/java -Xmx2g -Xms1g -Djava.library.path=/u/jenkinsci/.hudson/jobs/rtolap/workspace/target/lib \
-jar /u/jenkinsci/.hudson/jobs/rtolap/workspace/target/surefire/surefirebooter6814971258434039335.jar \
/u/jenkinsci/.hudson/jobs/rtolap/workspace/target/surefire/surefire5806103969370259371tmp /u/jenkinsci/...
...
{noformat}
We have our Maven surefire preferences set to fork the tests (via a parent pom)
{code:xml|title=pom.xml excerpt}
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.8</version>
<configuration>
<forkMode>once</forkMode>
<forkedProcessTimeoutInSeconds>720</forkedProcessTimeoutInSeconds>
</configuration>
</plugin>
{code}
I suspect the timeout is the problem - i.e. perhaps the test is timing out and the attempt to kill the forked process
fails, leaving it running.
Has anyone seen something similar and/or know how to fix this so that surefire *really* kills the process?
When this happens, doing
kill <processid>
(logged in as the process owner) usually does not work, but
kill -9 <processid>
does.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (SUREFIRE-773) surefire forked processes not always killed
after timeout
Posted by "nkeywal (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/SUREFIRE-773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=286961#comment-286961 ]
nkeywal commented on SUREFIRE-773:
----------------------------------
It's easy to reproduce with a sleep like this:
{noformat}
public class Test7 {
@Test
public void test71() throws Exception {
Thread.sleep(100 * 1000); // longer than forkedProcessTimeoutInSeconds
}
}
{noformat}
This test will survive to the timeout (and here will finish alone after 100 seconds). On unix, its ppid will be 1.
The library calls the java Process#destroy on timeout, but destroy does not kill the subprocesses.
It seems to be a known java issue: http://bugs.sun.com/view_bug.do?bug_id=4770092
But the solution won't come from this, from the evaluation in 2005:
{noformat}
The fundamental problem here is that, unlike Unix, Windows does that maintain parent-child relationships between processes. A process can kill its own immediate children, but unless you make other arrangements to obtain the information, can't kill any 'grand-children' because it has no way of finding them.
Fully emulating the Unix behaviour is probably
impossible. Note that Unix emulation environments on Windows, like Cygwin,
suffer from the same problem. Any fix would be difficult.
Even if we could figure out how to fix this, we might choose not to do so
for the usual reason -- compatibility.
{noformat}
> surefire forked processes not always killed after timeout
> ---------------------------------------------------------
>
> Key: SUREFIRE-773
> URL: https://jira.codehaus.org/browse/SUREFIRE-773
> Project: Maven Surefire
> Issue Type: Bug
> Components: process forking
> Affects Versions: 2.8
> Environment: 64 bit RHEL 5.5 , 64-bit Java 1.6.0_23
> Reporter: David Biesack
>
> Our forked JUnit/surefire processes are not always stopping correctly when timing out within a Maven build
> (running inside our Jenkins CI server, ver 1.425).
> The maven build finishes and Jenkins shows a failed/unstable build.
> These running processes cause problems later, because the tests may be holding a resource like a port, and subsequent rebuilds fail because the
> tests fail.
> For example, even though no Maven builds are currently running, ps shows about a dozen Java processes running,
> with commands such as:
> {noformat}
> /usr/local/java-1.6_23/jre/bin/java -Xms1g -Xmx5g -Djava.library.path=/u/jenkinsci/.hudson/jobs/rtolap.jtt.tests/workspace/target/lib \
> -jar /u/jenkinsci/.hudson/jobs/rtolap.jtt.tests/workspace/target/surefire/surefirebooter1374560535780866887.jar \
> /u/jenkinsci/.hudson/jobs/rtolap.jtt.tests/workspace/target/surefire/surefire65313...
> /usr/local/java-1.6_23/jre/bin/java -Xmx2g -Xms1g -Djava.library.path=/u/jenkinsci/.hudson/jobs/rtolap/workspace/target/lib \
> -jar /u/jenkinsci/.hudson/jobs/rtolap/workspace/target/surefire/surefirebooter6814971258434039335.jar \
> /u/jenkinsci/.hudson/jobs/rtolap/workspace/target/surefire/surefire5806103969370259371tmp /u/jenkinsci/...
> ...
> {noformat}
> We have our Maven surefire preferences set to fork the tests (via a parent pom)
> {code:xml|title=pom.xml excerpt}
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-surefire-plugin</artifactId>
> <version>2.8</version>
> <configuration>
> <forkMode>once</forkMode>
> <forkedProcessTimeoutInSeconds>720</forkedProcessTimeoutInSeconds>
> </configuration>
> </plugin>
> {code}
> I suspect the timeout is the problem - i.e. perhaps the test is timing out and the attempt to kill the forked process
> fails, leaving it running.
> Has anyone seen something similar and/or know how to fix this so that surefire *really* kills the process?
> When this happens, doing
> kill <processid>
> (logged in as the process owner) usually does not work, but
> kill -9 <processid>
> does.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (SUREFIRE-773) surefire forked processes not always killed
after timeout
Posted by "Shahaf Abileah (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/SUREFIRE-773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=308253#comment-308253 ]
Shahaf Abileah commented on SUREFIRE-773:
-----------------------------------------
I also see this. I'm using surefire 2.10. I'm on Mac.
In my case, the maven build doesn't complete -- it's hung. I'm not sure if that's related to the orphaned booter processes, or if that's a separate issue. For what it's worth, the build does complete consistently if I use <parallel>none</parallel> so I suspect it's related to the parallelization.
> surefire forked processes not always killed after timeout
> ---------------------------------------------------------
>
> Key: SUREFIRE-773
> URL: https://jira.codehaus.org/browse/SUREFIRE-773
> Project: Maven Surefire
> Issue Type: Bug
> Components: process forking
> Affects Versions: 2.8
> Environment: 64 bit RHEL 5.5 , 64-bit Java 1.6.0_23
> Reporter: David Biesack
>
> Our forked JUnit/surefire processes are not always stopping correctly when timing out within a Maven build
> (running inside our Jenkins CI server, ver 1.425).
> The maven build finishes and Jenkins shows a failed/unstable build.
> These running processes cause problems later, because the tests may be holding a resource like a port, and subsequent rebuilds fail because the
> tests fail.
> For example, even though no Maven builds are currently running, ps shows about a dozen Java processes running,
> with commands such as:
> {noformat}
> /usr/local/java-1.6_23/jre/bin/java -Xms1g -Xmx5g -Djava.library.path=/u/jenkinsci/.hudson/jobs/rtolap.jtt.tests/workspace/target/lib \
> -jar /u/jenkinsci/.hudson/jobs/rtolap.jtt.tests/workspace/target/surefire/surefirebooter1374560535780866887.jar \
> /u/jenkinsci/.hudson/jobs/rtolap.jtt.tests/workspace/target/surefire/surefire65313...
> /usr/local/java-1.6_23/jre/bin/java -Xmx2g -Xms1g -Djava.library.path=/u/jenkinsci/.hudson/jobs/rtolap/workspace/target/lib \
> -jar /u/jenkinsci/.hudson/jobs/rtolap/workspace/target/surefire/surefirebooter6814971258434039335.jar \
> /u/jenkinsci/.hudson/jobs/rtolap/workspace/target/surefire/surefire5806103969370259371tmp /u/jenkinsci/...
> ...
> {noformat}
> We have our Maven surefire preferences set to fork the tests (via a parent pom)
> {code:xml|title=pom.xml excerpt}
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-surefire-plugin</artifactId>
> <version>2.8</version>
> <configuration>
> <forkMode>once</forkMode>
> <forkedProcessTimeoutInSeconds>720</forkedProcessTimeoutInSeconds>
> </configuration>
> </plugin>
> {code}
> I suspect the timeout is the problem - i.e. perhaps the test is timing out and the attempt to kill the forked process
> fails, leaving it running.
> Has anyone seen something similar and/or know how to fix this so that surefire *really* kills the process?
> When this happens, doing
> kill <processid>
> (logged in as the process owner) usually does not work, but
> kill -9 <processid>
> does.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (SUREFIRE-773) surefire forked processes not
always killed after timeout
Posted by "David Biesack (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/SUREFIRE-773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=281144#comment-281144 ]
David Biesack commented on SUREFIRE-773:
----------------------------------------
I also see this problem with 2.10, i.e. pom.xml contains:
{code:xml}
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.10</version>
...
{code}
> surefire forked processes not always killed after timeout
> ---------------------------------------------------------
>
> Key: SUREFIRE-773
> URL: https://jira.codehaus.org/browse/SUREFIRE-773
> Project: Maven Surefire
> Issue Type: Bug
> Components: process forking
> Affects Versions: 2.8
> Environment: 64 bit RHEL 5.5 , 64-bit Java 1.6.0_23
> Reporter: David Biesack
>
> Our forked JUnit/surefire processes are not always stopping correctly when timing out within a Maven build
> (running inside our Jenkins CI server, ver 1.425).
> The maven build finishes and Jenkins shows a failed/unstable build.
> These running processes cause problems later, because the tests may be holding a resource like a port, and subsequent rebuilds fail because the
> tests fail.
> For example, even though no Maven builds are currently running, ps shows about a dozen Java processes running,
> with commands such as:
> {noformat}
> /usr/local/java-1.6_23/jre/bin/java -Xms1g -Xmx5g -Djava.library.path=/u/jenkinsci/.hudson/jobs/rtolap.jtt.tests/workspace/target/lib \
> -jar /u/jenkinsci/.hudson/jobs/rtolap.jtt.tests/workspace/target/surefire/surefirebooter1374560535780866887.jar \
> /u/jenkinsci/.hudson/jobs/rtolap.jtt.tests/workspace/target/surefire/surefire65313...
> /usr/local/java-1.6_23/jre/bin/java -Xmx2g -Xms1g -Djava.library.path=/u/jenkinsci/.hudson/jobs/rtolap/workspace/target/lib \
> -jar /u/jenkinsci/.hudson/jobs/rtolap/workspace/target/surefire/surefirebooter6814971258434039335.jar \
> /u/jenkinsci/.hudson/jobs/rtolap/workspace/target/surefire/surefire5806103969370259371tmp /u/jenkinsci/...
> ...
> {noformat}
> We have our Maven surefire preferences set to fork the tests (via a parent pom)
> {code:xml|title=pom.xml excerpt}
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-surefire-plugin</artifactId>
> <version>2.8</version>
> <configuration>
> <forkMode>once</forkMode>
> <forkedProcessTimeoutInSeconds>720</forkedProcessTimeoutInSeconds>
> </configuration>
> </plugin>
> {code}
> I suspect the timeout is the problem - i.e. perhaps the test is timing out and the attempt to kill the forked process
> fails, leaving it running.
> Has anyone seen something similar and/or know how to fix this so that surefire *really* kills the process?
> When this happens, doing
> kill <processid>
> (logged in as the process owner) usually does not work, but
> kill -9 <processid>
> does.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (SUREFIRE-773) surefire forked processes not always killed
after timeout
Posted by "David Biesack (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/SUREFIRE-773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=287207#comment-287207 ]
David Biesack commented on SUREFIRE-773:
----------------------------------------
Thanks for digging a bit, nkeywal - but note that this bug report is for Linux, not MS Windows.
> surefire forked processes not always killed after timeout
> ---------------------------------------------------------
>
> Key: SUREFIRE-773
> URL: https://jira.codehaus.org/browse/SUREFIRE-773
> Project: Maven Surefire
> Issue Type: Bug
> Components: process forking
> Affects Versions: 2.8
> Environment: 64 bit RHEL 5.5 , 64-bit Java 1.6.0_23
> Reporter: David Biesack
>
> Our forked JUnit/surefire processes are not always stopping correctly when timing out within a Maven build
> (running inside our Jenkins CI server, ver 1.425).
> The maven build finishes and Jenkins shows a failed/unstable build.
> These running processes cause problems later, because the tests may be holding a resource like a port, and subsequent rebuilds fail because the
> tests fail.
> For example, even though no Maven builds are currently running, ps shows about a dozen Java processes running,
> with commands such as:
> {noformat}
> /usr/local/java-1.6_23/jre/bin/java -Xms1g -Xmx5g -Djava.library.path=/u/jenkinsci/.hudson/jobs/rtolap.jtt.tests/workspace/target/lib \
> -jar /u/jenkinsci/.hudson/jobs/rtolap.jtt.tests/workspace/target/surefire/surefirebooter1374560535780866887.jar \
> /u/jenkinsci/.hudson/jobs/rtolap.jtt.tests/workspace/target/surefire/surefire65313...
> /usr/local/java-1.6_23/jre/bin/java -Xmx2g -Xms1g -Djava.library.path=/u/jenkinsci/.hudson/jobs/rtolap/workspace/target/lib \
> -jar /u/jenkinsci/.hudson/jobs/rtolap/workspace/target/surefire/surefirebooter6814971258434039335.jar \
> /u/jenkinsci/.hudson/jobs/rtolap/workspace/target/surefire/surefire5806103969370259371tmp /u/jenkinsci/...
> ...
> {noformat}
> We have our Maven surefire preferences set to fork the tests (via a parent pom)
> {code:xml|title=pom.xml excerpt}
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-surefire-plugin</artifactId>
> <version>2.8</version>
> <configuration>
> <forkMode>once</forkMode>
> <forkedProcessTimeoutInSeconds>720</forkedProcessTimeoutInSeconds>
> </configuration>
> </plugin>
> {code}
> I suspect the timeout is the problem - i.e. perhaps the test is timing out and the attempt to kill the forked process
> fails, leaving it running.
> Has anyone seen something similar and/or know how to fix this so that surefire *really* kills the process?
> When this happens, doing
> kill <processid>
> (logged in as the process owner) usually does not work, but
> kill -9 <processid>
> does.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (SUREFIRE-773) surefire forked processes not
always killed after timeout
Posted by "Baptiste Gaillard (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/SUREFIRE-773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=283867#comment-283867 ]
Baptiste Gaillard commented on SUREFIRE-773:
--------------------------------------------
We also encounter this problem using Jenkins 1.438 and Surefire 2.10 on an Amazon EC2 Linux instance.
> surefire forked processes not always killed after timeout
> ---------------------------------------------------------
>
> Key: SUREFIRE-773
> URL: https://jira.codehaus.org/browse/SUREFIRE-773
> Project: Maven Surefire
> Issue Type: Bug
> Components: process forking
> Affects Versions: 2.8
> Environment: 64 bit RHEL 5.5 , 64-bit Java 1.6.0_23
> Reporter: David Biesack
>
> Our forked JUnit/surefire processes are not always stopping correctly when timing out within a Maven build
> (running inside our Jenkins CI server, ver 1.425).
> The maven build finishes and Jenkins shows a failed/unstable build.
> These running processes cause problems later, because the tests may be holding a resource like a port, and subsequent rebuilds fail because the
> tests fail.
> For example, even though no Maven builds are currently running, ps shows about a dozen Java processes running,
> with commands such as:
> {noformat}
> /usr/local/java-1.6_23/jre/bin/java -Xms1g -Xmx5g -Djava.library.path=/u/jenkinsci/.hudson/jobs/rtolap.jtt.tests/workspace/target/lib \
> -jar /u/jenkinsci/.hudson/jobs/rtolap.jtt.tests/workspace/target/surefire/surefirebooter1374560535780866887.jar \
> /u/jenkinsci/.hudson/jobs/rtolap.jtt.tests/workspace/target/surefire/surefire65313...
> /usr/local/java-1.6_23/jre/bin/java -Xmx2g -Xms1g -Djava.library.path=/u/jenkinsci/.hudson/jobs/rtolap/workspace/target/lib \
> -jar /u/jenkinsci/.hudson/jobs/rtolap/workspace/target/surefire/surefirebooter6814971258434039335.jar \
> /u/jenkinsci/.hudson/jobs/rtolap/workspace/target/surefire/surefire5806103969370259371tmp /u/jenkinsci/...
> ...
> {noformat}
> We have our Maven surefire preferences set to fork the tests (via a parent pom)
> {code:xml|title=pom.xml excerpt}
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-surefire-plugin</artifactId>
> <version>2.8</version>
> <configuration>
> <forkMode>once</forkMode>
> <forkedProcessTimeoutInSeconds>720</forkedProcessTimeoutInSeconds>
> </configuration>
> </plugin>
> {code}
> I suspect the timeout is the problem - i.e. perhaps the test is timing out and the attempt to kill the forked process
> fails, leaving it running.
> Has anyone seen something similar and/or know how to fix this so that surefire *really* kills the process?
> When this happens, doing
> kill <processid>
> (logged in as the process owner) usually does not work, but
> kill -9 <processid>
> does.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (SUREFIRE-773) surefire forked processes not always killed
after timeout
Posted by "Alex Heneveld (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/SUREFIRE-773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=295630#comment-295630 ]
Alex Heneveld commented on SUREFIRE-773:
----------------------------------------
+1
Can we just call a kill -9 on *nix after (or even before) Process.destroy() ?
> surefire forked processes not always killed after timeout
> ---------------------------------------------------------
>
> Key: SUREFIRE-773
> URL: https://jira.codehaus.org/browse/SUREFIRE-773
> Project: Maven Surefire
> Issue Type: Bug
> Components: process forking
> Affects Versions: 2.8
> Environment: 64 bit RHEL 5.5 , 64-bit Java 1.6.0_23
> Reporter: David Biesack
>
> Our forked JUnit/surefire processes are not always stopping correctly when timing out within a Maven build
> (running inside our Jenkins CI server, ver 1.425).
> The maven build finishes and Jenkins shows a failed/unstable build.
> These running processes cause problems later, because the tests may be holding a resource like a port, and subsequent rebuilds fail because the
> tests fail.
> For example, even though no Maven builds are currently running, ps shows about a dozen Java processes running,
> with commands such as:
> {noformat}
> /usr/local/java-1.6_23/jre/bin/java -Xms1g -Xmx5g -Djava.library.path=/u/jenkinsci/.hudson/jobs/rtolap.jtt.tests/workspace/target/lib \
> -jar /u/jenkinsci/.hudson/jobs/rtolap.jtt.tests/workspace/target/surefire/surefirebooter1374560535780866887.jar \
> /u/jenkinsci/.hudson/jobs/rtolap.jtt.tests/workspace/target/surefire/surefire65313...
> /usr/local/java-1.6_23/jre/bin/java -Xmx2g -Xms1g -Djava.library.path=/u/jenkinsci/.hudson/jobs/rtolap/workspace/target/lib \
> -jar /u/jenkinsci/.hudson/jobs/rtolap/workspace/target/surefire/surefirebooter6814971258434039335.jar \
> /u/jenkinsci/.hudson/jobs/rtolap/workspace/target/surefire/surefire5806103969370259371tmp /u/jenkinsci/...
> ...
> {noformat}
> We have our Maven surefire preferences set to fork the tests (via a parent pom)
> {code:xml|title=pom.xml excerpt}
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-surefire-plugin</artifactId>
> <version>2.8</version>
> <configuration>
> <forkMode>once</forkMode>
> <forkedProcessTimeoutInSeconds>720</forkedProcessTimeoutInSeconds>
> </configuration>
> </plugin>
> {code}
> I suspect the timeout is the problem - i.e. perhaps the test is timing out and the attempt to kill the forked process
> fails, leaving it running.
> Has anyone seen something similar and/or know how to fix this so that surefire *really* kills the process?
> When this happens, doing
> kill <processid>
> (logged in as the process owner) usually does not work, but
> kill -9 <processid>
> does.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (SUREFIRE-773) surefire forked processes not always killed
after timeout
Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/SUREFIRE-773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=287102#comment-287102 ]
Kristian Rosenvold commented on SUREFIRE-773:
---------------------------------------------
Using JNA, the Selenium project now has a java based mechanism that kills a process tree on Windows. The class is called "WindowsProcessGroup" in the selenium source tree. I'm still not entirely sure if we should dive down this rabbit hole, we should at least upgrade to commons-exec first.
> surefire forked processes not always killed after timeout
> ---------------------------------------------------------
>
> Key: SUREFIRE-773
> URL: https://jira.codehaus.org/browse/SUREFIRE-773
> Project: Maven Surefire
> Issue Type: Bug
> Components: process forking
> Affects Versions: 2.8
> Environment: 64 bit RHEL 5.5 , 64-bit Java 1.6.0_23
> Reporter: David Biesack
>
> Our forked JUnit/surefire processes are not always stopping correctly when timing out within a Maven build
> (running inside our Jenkins CI server, ver 1.425).
> The maven build finishes and Jenkins shows a failed/unstable build.
> These running processes cause problems later, because the tests may be holding a resource like a port, and subsequent rebuilds fail because the
> tests fail.
> For example, even though no Maven builds are currently running, ps shows about a dozen Java processes running,
> with commands such as:
> {noformat}
> /usr/local/java-1.6_23/jre/bin/java -Xms1g -Xmx5g -Djava.library.path=/u/jenkinsci/.hudson/jobs/rtolap.jtt.tests/workspace/target/lib \
> -jar /u/jenkinsci/.hudson/jobs/rtolap.jtt.tests/workspace/target/surefire/surefirebooter1374560535780866887.jar \
> /u/jenkinsci/.hudson/jobs/rtolap.jtt.tests/workspace/target/surefire/surefire65313...
> /usr/local/java-1.6_23/jre/bin/java -Xmx2g -Xms1g -Djava.library.path=/u/jenkinsci/.hudson/jobs/rtolap/workspace/target/lib \
> -jar /u/jenkinsci/.hudson/jobs/rtolap/workspace/target/surefire/surefirebooter6814971258434039335.jar \
> /u/jenkinsci/.hudson/jobs/rtolap/workspace/target/surefire/surefire5806103969370259371tmp /u/jenkinsci/...
> ...
> {noformat}
> We have our Maven surefire preferences set to fork the tests (via a parent pom)
> {code:xml|title=pom.xml excerpt}
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-surefire-plugin</artifactId>
> <version>2.8</version>
> <configuration>
> <forkMode>once</forkMode>
> <forkedProcessTimeoutInSeconds>720</forkedProcessTimeoutInSeconds>
> </configuration>
> </plugin>
> {code}
> I suspect the timeout is the problem - i.e. perhaps the test is timing out and the attempt to kill the forked process
> fails, leaving it running.
> Has anyone seen something similar and/or know how to fix this so that surefire *really* kills the process?
> When this happens, doing
> kill <processid>
> (logged in as the process owner) usually does not work, but
> kill -9 <processid>
> does.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira