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

Dan Berindei commented on SUREFIRE-1426:
----------------------------------------

[~tibor17] this bug is not about *why* the fork fails, but about how that 
failure is handled. 

To give you another example, one of our build machines ran out of RAM and the 
Linux OOM killer killed the fork process. Surefire ignored that failure (with 
{{-Dmaven.test.failure.ignore=true}}), and the only sign of a problem in 
Jenkins was a few thousand missing tests. Of course we should make sure the 
machine doesn't run out of RAM, but we can't do that if we don't know there was 
a problem.

{noformat}
Oct  4 12:53:23 infinispan-ci-slave-2 kernel: Out of memory: Kill process 27307 
(java) score 758 or sacrifice child
{noformat}

{noformat}
org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM 
terminated without properly saying goodbye. VM crash or System.exit called?
Command was /bin/sh -c cd 
/home/infinispan/workspace/Infinispan_PR-5492-DVBKEZA6P52ZLMXFPQEPNR2W2HTQK3RCXEOZVUR7NNW4WLFIF3KQ/query
 && /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.144-0.b01.el7_4.x86_64/jre/bin/java 
-javaagent:/home/infinispan/workspace/Infinispan_PR-5492-DVBKEZA6P52ZLMXFPQEPNR2W2HTQK3RCXEOZVUR7NNW4WLFIF3KQ/query/target/agents/byteman.jar=port:9091,boot:/home/infinispan/workspace/Infinispan_PR-5492-DVBKEZA6P52ZLMXFPQEPNR2W2HTQK3RCXEOZVUR7NNW4WLFIF3KQ/query/target/agents/byteman.jar
 -Xmx2G -jar 
/home/infinispan/workspace/Infinispan_PR-5492-DVBKEZA6P52ZLMXFPQEPNR2W2HTQK3RCXEOZVUR7NNW4WLFIF3KQ/query/target/surefire/surefirebooter2044542354484229757.jar
 
/home/infinispan/workspace/Infinispan_PR-5492-DVBKEZA6P52ZLMXFPQEPNR2W2HTQK3RCXEOZVUR7NNW4WLFIF3KQ/query/target/surefire
 2017-10-04T12-38-56_198-jvmRun1 surefire1069399596138004989tmp 
surefire_95078456212865687512tmp
Error occurred in starting fork, check output in log
Process Exit Code: 137
Crashed tests:
org.infinispan.query.affinity.AffinityTest
org.infinispan.query.affinity.ShardDistributionTest
org.infinispan.query.blackbox.ClusteredCacheWithAffinityIndexManagerTest
org.infinispan.query.blackbox.ClusteredCacheWithAffinityIndexManagerTxTest
org.infinispan.query.distributed.AffinityIndexManagerMassIndexTest
        at 
org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:679)
        at 
org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533)
        at 
org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:279)
        at 
org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:243)
        at 
org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1077)
        at 
org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:907)
        at 
org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:785)
        at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        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:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
        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)
...
[INFO] BUILD SUCCESS
{noformat}


> Fork crash doesn't fail build with -Dmaven.test.failure.ignore=true
> -------------------------------------------------------------------
>
>                 Key: SUREFIRE-1426
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1426
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: process forking
>            Reporter: Dan Berindei
>            Assignee: Tibor Digana
>         Attachments: surefire-1426-test.tar.gz
>
>
> We have a reactor with many modules, and also a few random test failures. We 
> want to run the tests of all the modules even if a test failed in the core 
> module, so we use {{mvn -Dmaven.test.failure.ignore=true}}. {{mvn 
> --fail-at-end}} only builds the modules that do not depend on the module with 
> a failed test.
> The problem is that fork crashes like this one are written to the surefire 
> reports, so Jenkins ignores them:
> {noformat}
> org.apache.maven.surefire.booter.SurefireBooterForkException: There was an 
> error in the forked process
> Unable to load category: stress
>       at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:665)
>       at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533)
>       at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:279)
>       at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:243)
>       at 
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1077)
>       at 
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:907)
>       at 
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:785)
>       at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
>       at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
>       at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
>       at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
>       at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
>       at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
>       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:307)
>       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
>       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
>       at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
>       at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
>       at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
>       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){noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to