I use Docker and https://github.com/fabric8io/docker-maven-plugin for my integration tests.
On my Windows 10 (after updating to Windows 10 1709) mac
I use the maven-surefire-plugin:2.22.1, but the forked VM still crashes. In my case the configuration forkedProcessExitTimeoutInSeconds for the maven-surefire-plugin helps. The default value are since maven-surefire-plugin:2.20.1 30 seconds. My project gots very time consuming test and so the forked JVM chrashes. Configure the plugin in the pom with the following property solves the problem.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkedProcessExitTimeoutInSeconds>120</forkedProcessExitTimeoutInSeconds>
</configuration>
</plugin>
I'm also have error like that, related with forkstarter on the surefire plugin
maybe you can try add this on your pom.xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>--add-modules java.base ${argLine} -Xmx1024m -XX:MaxPermSize=256m</argLine>
<forkCount>3</forkCount>
<reuseForks>true</reuseForks>
</configuration>
</plugin>
Hope, this can help you
Try out with Manven OPT parameter
export MAVEN_OPTS="-Xms1024m -Xmx1G -XX:PermSize=1024m -noverify"
I have the same problem and found three solutions which working for me:
Problem is with maven plugin maven-surefire-plugin only in version 2.20.1 and 2.21.0. I checked and you use version 2.20.1.
Upgrade plugin version to 2.22.0. Add in pom.xml:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
</plugin>
Downgrade plugin version to 2.20. Add in pom.xml:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
</plugin>
Use plugin configuration testFailureIgnore. Add in pom.xml:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
VM can crash because of many reasons. I am highlighting here one more cause it can crash.
I was using maven-surefire-plugin version 2.22.0 with jvm config -Xmx2048m but still it was failing for me.
Cause of failure: Accidentally I changed windows command prompt 'window buffer size' width to 2000 instead of changing the height. It causes the vm crashes in my case. When i ran the build using git bash it worked fine. So I able to figure out the issue and reverted the command prompt 'window buffer size' width to default value and it worked fine for me.
Troubleshooting step:
I have version 2.22.2 and still get that error. I get pass this by setting the timeout for surefire. So the latest added tests added execution time to exceed the default 30 secs.
mvn test -Dsurefire.exitTimeout=40
default value for timeout is 30
https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#forkedProcessExitTimeoutInSeconds
<maven.surefire.plugin.version>2.22.2</maven.surefire.plugin.version>
Edit: Actually the logging happening during the tests added up so much time to get timeout. So I changed logging levels.