[
https://jira.codehaus.org/browse/SUREFIRE-946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=317064#comment-317064
]
Andreas Gudian commented on SUREFIRE-946:
-----------------------------------------
OK, check my latest push... It fixes all the broken ITs, it now even works in
case the forked process calls Runtime#halt, and I removed BOOTERCODE_CRASH.
Also added an IT for the initial problem described in this issue
(Surefire946KillMainProcessInReusableForkIT), and extended the CrashDetectionIT
to test reuseForks with Runtime#halt.
This still relys on Process#waitFor to work in case no timeout was given. So
we're not getting better than in 2.12.4, but I hope it's not worse either.
Oh, and... I had to modify maven-verifier (for
Surefire946KillMainProcessInReusableForkIT) and maven-shared-utils (for the IT
and the actual fix). I pushed that to
https://github.com/agudian/maven-shared/tree/SUREFIRE-946, but did not yet file
a pull-request. I'd like your feedback first... :)
> Maven hangs on SIGTERM when using Surefire forking
> (CommandLineUtils.ProcessHook)
> ---------------------------------------------------------------------------------
>
> Key: SUREFIRE-946
> URL: https://jira.codehaus.org/browse/SUREFIRE-946
> Project: Maven Surefire
> Issue Type: Bug
> Affects Versions: 2.13
> Reporter: Jesse Glick
> Fix For: 2.14
>
> Attachments: stack.txt, SUREFIRE-946.patch
>
>
> Java 7u7, Surefire with JUnit {{forkMode="perthread"}} + {{threadCount="1"}}
> + {{reuseForks="true"}}. After pressing Ctrl-C to stop the Maven test run,
> the process hangs and must be killed with SIGKILL. From the thread dump,
> {{CommandLineUtils.ProcessHook}} and {{StreamFeeder}} look responsible.
--
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