You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Aaron Braunstein (Jira)" <ji...@apache.org> on 2022/05/20 01:58:00 UTC

[jira] [Commented] (SUREFIRE-1426) Fork crash doesn't fail build with -Dmaven.test.failure.ignore=true

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

Aaron Braunstein commented on SUREFIRE-1426:
--------------------------------------------

[~tibordigana] unfortunately the fix looks incomplete. It only has any effect for surefire, not for failsafe. For the surefire run, I see that in M5 I get a build success after the SurefireBooterForkException is thrown, and in M6 I correctly get a build failure. However for the failsafe run, in both M5 and M6 I get a build success.
{code:java}
[INFO] --- maven-failsafe-plugin:3.0.0-M6:verify (default) @ module ---
[ERROR] 


Please refer to /Users/aaron.braunstein/git/module/target/failsafe-reports for the individual test results.
Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
org.apache.maven.surefire.booter.SurefireBooterForkException: ExecutionException The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
Command was /bin/sh -c cd '/Users/aaron.braunstein/git/module' && '/Library/Java/JavaVirtualMachines/temurin-8.jdk/Contents/Home/jre/bin/java' '-jar' '/Users/aaron.braunstein/git/module/target/surefire/surefirebooter2053642676930234571.jar' '/Users/aaron.braunstein/git/module/target/surefire' '2022-05-19T18-54-33_572-jvmRun1' 'surefire8121211105648546298tmp' 'surefire_01046597165533406283tmp'
Error occurred in starting fork, check output in log
Process Exit Code: 1
Crashed tests:
com.package.ITExit
	at org.apache.maven.plugin.surefire.booterclient.ForkStarter.awaitResultsDone(ForkStarter.java:513)
	at org.apache.maven.plugin.surefire.booterclient.ForkStarter.runSuitesForkOnceMultiple(ForkStarter.java:397)
	at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:326)
	at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:269)
	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1332)
	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1165)
	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:929)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
	at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:301)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:211)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:165)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:157)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:121)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:127)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:294)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:960)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:293)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:196)
	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:282)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
Caused by: 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 '/Users/aaron.braunstein/git/module' && '/Library/Java/JavaVirtualMachines/temurin-8.jdk/Contents/Home/jre/bin/java' '-jar' '/Users/aaron.braunstein/git/module/target/surefire/surefirebooter2053642676930234571.jar' '/Users/aaron.braunstein/git/module/target/surefire' '2022-05-19T18-54-33_572-jvmRun1' 'surefire8121211105648546298tmp' 'surefire_01046597165533406283tmp'
Error occurred in starting fork, check output in log
Process Exit Code: 1
Crashed tests:
com.package.ITExit
	at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:714)
	at org.apache.maven.plugin.surefire.booterclient.ForkStarter.lambda$null$3(ForkStarter.java:388)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:750)


[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  45.820 s
[INFO] Finished at: 2022-05-19T18:54:43-07:00
[INFO] ------------------------------------------------------------------------ {code}

> 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: Maven Failsafe Plugin, Maven Surefire Plugin, process forking
>            Reporter: Dan Berindei
>            Assignee: Tibor Digana
>            Priority: Major
>             Fix For: 2.22.3, 3.0.0-M6
>
>         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
(v8.20.7#820007)