title: Maven build and maven-failsafe-plugin - The forked VM terminated without properly saying goodbye
body: <p>I use Docker and <a href="https://github.com/fabric8io/docker-maven-plugin" rel="noreferrer">https://github.com/fabric8io/docker-maven-plugin</a> for my integration tests.</p>
  
  <p>On my Windows 10 (<strong>after updating to Windows 10 1709</strong>) machine I faced the following error with my <code>Maven 3.5.0</code> build:</p>
  
  <pre><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.20.1:verify (default) on project api: There are test failures.
  [ERROR]
  [ERROR] Please refer to D:\Projects\example\api\target\failsafe-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] org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
  [ERROR] Command was cmd.exe /X /C "c:\Java\jdk1.8.0_152\jre\bin\java -jar C:\Users\ALEXAN~1\AppData\Local\Temp\surefire1232565117555778729\surefirebooter3745527118196863348.jar C:\Users\Alexander\AppData\Local\Temp\surefire1232565117555778729 2017-10-19T16-45-23_780-jvmRun1 surefire4633356271541422594tmp surefire_169922891955689988tmp"
  [ERROR] Error occurred in starting fork, check output in log
  [ERROR] Process Exit Code: 1
  [ERROR] Crashed tests:
  [ERROR] com.example.domain.api.flag.FlagControllerIT
  [ERROR]         at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:686)
  [ERROR]         at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:535)
  [ERROR]         at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:280)
  [ERROR]         at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245)
  [ERROR]         at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1124)
  [ERROR]         at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:954)
  [ERROR]         at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:832)
  [ERROR]         at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
  [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:51)
  [ERROR]         at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
  [ERROR]         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
  [ERROR]         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
  [ERROR]         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
  [ERROR]         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
  [ERROR]         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
  [ERROR]         at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
  [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)
  </code></pre>
  
  <p>Right now I have no idea what can be wrong, I don't see any failures with my tests.</p>
  
  <p>What can be a reason of this issue and how to solve it?</p>
  
  <p><strong>UPDATED</strong></p>
  
  <p>My project have the following configuration:</p>
  
  <p>parent <code>pom.xml</code>:</p>
  
  <pre><code>&lt;build&gt;
   &lt;plugins&gt;
    &lt;plugin&gt;
     &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
      &lt;configuration&gt;
       &lt;argLine&gt;-Dfile.encoding=UTF-8 -Xms1024m -Xmx1024m -XX:PermSize=1024m -noverify&lt;/argLine&gt;
      &lt;/configuration&gt;
     &lt;/plugin&gt;
    &lt;/plugins&gt;
   &lt;/build&gt;
  </code></pre>
  
  <p>sub-module <code>pom.xml</code>:</p>
  
  <pre><code>&lt;profiles&gt;
   &lt;profile&gt;
    &lt;id&gt;local&lt;/id&gt;
    &lt;build&gt;
     &lt;plugins&gt;
      &lt;plugin&gt;
       &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
       &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
       &lt;configuration&gt;                            
        &lt;skipTests&gt;true&lt;/skipTests&gt;
       &lt;/configuration&gt;
      &lt;/plugin&gt;
     &lt;/plugins&gt;
    &lt;/build&gt;
   &lt;/profile&gt;
  &lt;/profiles&gt;
  </code></pre>
  
  <p>As you can see - I added </p>
  
  <pre><code>&lt;argLine&gt;-Dfile.encoding=UTF-8 -Xms1024m -Xmx1G -XX:PermSize=1024m -noverify&lt;/argLine&gt;
  </code></pre>
  
  <p>to the configuration of <code>maven-surefire-plugin</code> to my parent <code>pom.xml</code> but it didn't help.</p>
  
  <p>This is output for Maven build with <code>-e</code> and <code>-X</code></p>
  
  <pre><code>[INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 01:58 min
  [INFO] Finished at: 2017-10-19T22:27:40+03:00
  [INFO] Final Memory: 62M/1117M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.20.1:verify (default) on project domain: There are test failures.
  [ERROR]
  [ERROR] Please refer to D:\Projects\example\domain\target\failsafe-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] org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
  [ERROR] Command was cmd.exe /X /C "c:\Java\jdk1.8.0_152\jre\bin\java -jar C:\Users\ALEXAN~1\AppData\Local\Temp\surefire7778309393610397922\surefirebooter4888497370312362560.jar C:\Users\Alexander\AppData\Local\Temp\surefire7778309393610397922 2017-10-19T22-26-15_682-jvmRun1 surefire8701817832311419883tmp surefire_01518784195718073645tmp"
  [ERROR] Error occurred in starting fork, check output in log
  [ERROR] Process Exit Code: 1
  [ERROR] Crashed tests:
  [ERROR] com.example.domain.DecisionCharacteristicIT
  [ERROR]         at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:686)
  [ERROR]         at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:535)
  [ERROR]         at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:280)
  [ERROR]         at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245)
  [ERROR]         at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1124)
  [ERROR]         at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:954)
  [ERROR]         at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:832)
  [ERROR]         at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
  [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:51)
  [ERROR]         at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
  [ERROR]         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
  [ERROR]         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
  [ERROR]         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
  [ERROR]         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
  [ERROR]         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
  [ERROR]         at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
  [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] -&gt; [Help 1]
  org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.20.1:verify (default) on project domain: There are test failures.
  
  Please refer to D:\Projects\example\domain\target\failsafe-reports for the individual test results.
  Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
  org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
  Command was cmd.exe /X /C "c:\Java\jdk1.8.0_152\jre\bin\java -jar C:\Users\ALEXAN~1\AppData\Local\Temp\surefire7778309393610397922\surefirebooter4888497370312362560.jar C:\Users\Alexander\AppData\Local\Temp\surefire7778309393610397922 2017-10-19T22-26-15_682-jvmRun1 surefire8701817832311419883tmp surefire_01518784195718073645tmp"
  Error occurred in starting fork, check output in log
  Process Exit Code: 1
  Crashed tests:
  com.example.domain.DecisionCharacteristicIT
          at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:686)
          at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:535)
          at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:280)
          at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245)
          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:993)
          at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
          at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
          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)
  
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
          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:993)
          at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
          at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
          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.plugin.MojoExecutionException: There are test failures.
  
  Please refer to D:\Projects\example\domain\target\failsafe-reports for the individual test results.
  Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
  org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
  Command was cmd.exe /X /C "c:\Java\jdk1.8.0_152\jre\bin\java -jar C:\Users\ALEXAN~1\AppData\Local\Temp\surefire7778309393610397922\surefirebooter4888497370312362560.jar C:\Users\Alexander\AppData\Local\Temp\surefire7778309393610397922 2017-10-19T22-26-15_682-jvmRun1 surefire8701817832311419883tmp surefire_01518784195718073645tmp"
  Error occurred in starting fork, check output in log
  Process Exit Code: 1
  Crashed tests:
  com.example.domain.DecisionCharacteristicIT
          at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:686)
          at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:535)
          at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:280)
          at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245)
          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:993)
          at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
          at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
          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)
  
          at org.apache.maven.plugin.surefire.SurefireHelper.throwException(SurefireHelper.java:235)
          at org.apache.maven.plugin.surefire.SurefireHelper.reportExecution(SurefireHelper.java:112)
          at org.apache.maven.plugin.failsafe.VerifyMojo.execute(VerifyMojo.java:188)
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
          ... 20 more
  [ERROR]
  [ERROR]
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
  [ERROR]
  [ERROR] After correcting the problems, you can resume the build with the command
  [ERROR]   mvn &lt;goals&gt; -rf :domain
  </code></pre>
  
  <p><strong>This is the full detailed output log:</strong> <a href="https://files.fm/u/nfegb38f" rel="noreferrer">https://files.fm/u/nfegb38f</a></p>
  
  <p><strong>Windows 10 1709 update</strong></p>
  
  <p>Right now I have thoughts that this issue can be potentially related to the Windows 10 1709 update... I use docker and <a href="https://github.com/fabric8io/docker-maven-plugin" rel="noreferrer">https://github.com/fabric8io/docker-maven-plugin</a> for my integrstion tests and found the following topic - <a href="https://github.com/docker/for-win/issues/1221" rel="noreferrer">https://github.com/docker/for-win/issues/1221</a>  Something is definitely wrong with this update and virtualization...</p>