[ https://issues.apache.org/jira/browse/SUREFIRE-1422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16398638#comment-16398638 ]
Thomas Raehalme commented on SUREFIRE-1422: ------------------------------------------- If package {{procps}} has been installed, the plugin works (also 2.20.1). The latest Docker image {{maven:3.5.3-jdk-8-alpine}} now adds the package so at least I am happy with this. If the package is not present, the plugin fails immediately when starting the tests with the following output: {code:java} [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.21.0-SNAPSHOT:test (default-test) on project maven-surefire-testcase: There are test failures. [ERROR] [ERROR] Please refer to /project/target/surefire-reports for the individual test results. [ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream. [ERROR] The forked VM terminated without properly saying goodbye. VM crash or System.exit called? [ERROR] Command was /bin/sh -c cd /project && /usr/lib/jvm/java-1.8-openjdk/jre/bin/java -jar /project/target/surefire/surefirebooter1586782271469883468.jar /project/target/surefire 2018-03-14T14-00-50_778-jvmRun1 surefire6774220999731177747tmp surefire_06426515262477706470tmp [ERROR] Error occurred in starting fork, check output in log [ERROR] Process Exit Code: 1 [ERROR] Crashed tests: [ERROR] LongTest [ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called? [ERROR] Command was /bin/sh -c cd /project && /usr/lib/jvm/java-1.8-openjdk/jre/bin/java -jar /project/target/surefire/surefirebooter1586782271469883468.jar /project/target/surefire 2018-03-14T14-00-50_778-jvmRun1 surefire6774220999731177747tmp surefire_06426515262477706470tmp [ERROR] Error occurred in starting fork, check output in log [ERROR] Process Exit Code: 1 [ERROR] Crashed tests: [ERROR] LongTest [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:671) [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533) [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:278) [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:244) [ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1149) [ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:978) [ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:854) [ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137) [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154) [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146) [ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117) [ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81) [ERROR] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56) [ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) [ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305) [ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192) [ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105) [ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:956) [ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:290) [ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:194) [ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [ERROR] at java.lang.reflect.Method.invoke(Method.java:498) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) [ERROR] [ERROR] -> [Help 1] [E{code} The contents of the corresponding dump file is: {code:java} # cat target/surefire-reports/2018-03-14T14-00-50_778-jvmRun1.dump # Created on 2018-03-14T14:00:53.284 Killing self fork JVM. Maven process died. {code} > Forking fails on Linux if /bin/ps isn't available > ------------------------------------------------- > > Key: SUREFIRE-1422 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1422 > Project: Maven Surefire > Issue Type: Bug > Components: process forking > Affects Versions: 2.20.1 > Environment: Linux (Debian 9 with OpenJDK 8) > Reporter: Emmanuel Bourg > Assignee: Tibor Digana > Priority: Major > Fix For: 2.21.0 > > > Hi, > With the changes introduced by SUREFIRE-1302 I'm now experiencing a failure > on Linux when the fork mode is enabled: > {code} > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test (default-test) on > project foo: There are test failures. > [ERROR] > [ERROR] Please refer to /foo/target/surefire-reports for the individual test > results. > [ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, > [date].dumpstream and [date]-jvmRun[N].dumpstream. > [ERROR] The forked VM terminated without properly saying goodbye. VM crash or > System.exit called? > {code} > I traced the issue back to the PpidChecker class, the code assumes that > {{/bin/ps}} or {{/usr/bin/ps}} exist but this isn't guaranteed (especially on > trimmed down containers commonly used for continuous integration). > It would be nice to have a fallback mechanism when ps isn't available, or at > least check its existence and display an explicit message stating that it > must be installed. -- This message was sent by Atlassian JIRA (v7.6.3#76005)