You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/04/02 20:54:00 UTC

[jira] [Commented] (SUREFIRE-1479) SurefireBooterForkException: The forked VM terminated without properly saying goodbye since 2.20.1

    [ https://issues.apache.org/jira/browse/SUREFIRE-1479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16423120#comment-16423120 ] 

ASF GitHub Bot commented on SUREFIRE-1479:
------------------------------------------

jbliznak closed pull request #179: [SUREFIRE-1479] Force UNIX Standard mode for ps command on HP-UX OS
URL: https://github.com/apache/maven-surefire/pull/179
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java
index 462eacc9b..32e3ad7c5 100644
--- a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java
+++ b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java
@@ -36,6 +36,7 @@
 import static java.util.regex.Pattern.compile;
 import static org.apache.commons.io.IOUtils.closeQuietly;
 import static org.apache.commons.lang3.StringUtils.isNotBlank;
+import static org.apache.commons.lang3.SystemUtils.IS_OS_HP_UX;
 import static org.apache.commons.lang3.SystemUtils.IS_OS_UNIX;
 import static org.apache.commons.lang3.SystemUtils.IS_OS_WINDOWS;
 import static org.apache.maven.surefire.booter.ProcessInfo.ERR_PROCESS_INFO;
@@ -295,6 +296,10 @@ ProcessInfo execute( String... command )
             ProcessInfo processInfo = INVALID_PROCESS_INFO;
             try
             {
+                if ( IS_OS_HP_UX ) // force to run shell commands in UNIX Standard mode on HP-UX
+                {
+                    processBuilder.environment().put( "UNIX95", "1" );
+                }
                 process = processBuilder.start();
                 destroyableCommands.add( process );
                 Scanner scanner = new Scanner( process.getInputStream(), charset );


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> SurefireBooterForkException: The forked VM terminated without properly saying goodbye since 2.20.1
> --------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-1479
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1479
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Surefire Plugin
>    Affects Versions: 2.20.1
>            Reporter: Ondrej Lukas
>            Assignee: Tibor Digana
>            Priority: Major
>             Fix For: 3.0.0-M1
>
>
> After upgrade to maven surefire plugin to version 2.20.1 (from version 2.20) our testsuite start to fail on HP-UX with:
>  
>  
> {code:java}
> Process Exit Code: 1         at org.apache.maven.plugin.surefire.booterclient.ForkStarter.awaitResultsDone(ForkStarter.java:496)         at org.apache.maven.plugin.surefire.booterclient.ForkStarter.runSuitesForkPerTestSet(ForkStarter.java:443)         at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:295)         at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:246)         at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1124)         at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:954)         at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:832)         at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)         at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)         at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)         at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)         at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:955)         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:290)         at org.apache.maven.cli.MavenCli.main(MavenCli.java:194)         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)         at java.lang.reflect.Method.invoke(Method.java:498)         at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)         at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)         at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)         at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) Caused by: org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?{code}
>  
>  
> This exception is thrown and no test cases are run.
>  
> I believe that this issue in not dependent on HP-UX since I found the same issue for windows [1], but it seems it has not been reported yet.
>  
> Since the only change between correct test execution and thrown exception is just change of surefire version I believe this is regression.
>  
> [1] [https://stackoverflow.com/questions/48631856/maven-surefire-forked-vm-terminated-issue-in-windows]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)