Warm tip: This article is reproduced from serverfault.com, please click

The forked VM terminated without properly saying goodbye. VM crash or System.exit called

发布于 2020-12-07 13:16:37

I write tests. I am using Cucumber 6.8.1, TestNG 7.0.0. For parallelization, I connected the maven-surefire-plugin 2.22.2 , but I have not paralleling tests right now, at the moment I'm running all tests only one by one.

Most tests work good (about 45 tests). But there are several problematic tests, namely: when running such test, I get the error "The forked VM terminated without properly saying goodbye. VM crash or System.exit called?" Here is the full text:

enter image description here

I have searched in google this error. And I have read, that it is connected with the maven-surefire-plugin. In the Internet people offer different ways to solve this problem. For example, change the version of the maven plugin. At the moment I have version 2.22.2. I tried different versions: 3.0.0-M5, 3.0.0-M4, 3.0.0-M3, 3.0.0-M2, 3.0.0-M1, 2.22.1, 2.22.0, 2.21.0, 2.20. The result is the same: I get the error.

Also I have tried to write the argument -Xmx1024m -XX: MaxPermSize = 256m inside the maven-surefire-plugin config. It also didn't help.

And also I don't think, that this is due to the deficit of some resources. During the run of these problematic tests, monitoring does not show a particularly large consumption of resources:

enter image description here

Can you give to me some other ideas, please?

Questioner
alex_t
Viewed
0
tibor17 2020-12-08 23:04:23

According to your log, Crashed tests, there is one test class which was not completed properly. Try to find out what library or code is calling the System.exit() or Runtime.getRuntime.halt(). People have these problems with system exit due to the implementations of OSS libraries exit the process. Please see the hint in stackowerflow and try to find the evil with the help of SystemManager in Java.