We have a CI job running Maven including tests. Sometimes the failsfae process will exit, e.g.:
[INFO] Results: [INFO] [WARNING] Tests run: 8152, Failures: 0, Errors: 0, Skipped: 31 ... [ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.22.1:verify (integration-test) on project app_server_core: There are test failures. [ERROR] [ERROR] Please refer to /builds/App/Development/App/app_server_core/target/surefire-reports for the individual test results. [ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].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 /bin/sh -c cd /builds/App/Development/App/app_server_core && /usr/lib/jvm/java-1.8-openjdk/jre/bin/java -Xmx3g -jar /builds/App/Development/App/app_server_core/target/surefire/surefirebooter7662621916357034130.jar /builds/App/Development/App/app_server_core/target/surefire 2019-01-09T21-23-07_397-jvmRun1 surefire1770987927673067492tmp surefire_37459604808221437221tmp [ERROR] Error occurred in starting fork, check output in log [ERROR] Process Exit Code: 1 [ERROR] Crashed tests: ... Which test was running during the crash is different every time, though we run in alphabetical order for this job. Failsafe makes a .dump file with e.g.: # Created at 2019-02-12T14:31:16.410 System.exit() or native command error interrupted process checker. java.lang.IllegalStateException: Cannot use PPID 158 process information. Going to use NOOP events. at org.apache.maven.surefire.booter.PpidChecker.checkProcessInfo(PpidChecker.java:155) at org.apache.maven.surefire.booter.PpidChecker.isProcessAlive(PpidChecker.java:124) at org.apache.maven.surefire.booter.ForkedBooter$2.run(ForkedBooter.java:214) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) 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:748) # Created at 2019-02-12T14:47:59.174 Killing self fork JVM. PING timeout elapsed. I think that is the Failsafe process telling us why it called System.exit() prematurely, but what does that mean? What are some reasons this would happen? We capture the stack trace whenever System.exit() is called; I can share that stack in a reply (don't want to get black hole'd for too long an email). We can compare the lines of code in that stack with Surefire code at the right version to see what Surefire is doing. Should I ask this in the developers mailing list? -- Jason Young