[
https://issues.apache.org/jira/browse/SUREFIRE-1927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17376115#comment-17376115
]
Tibor Digana commented on SUREFIRE-1927:
----------------------------------------
The PING mechanism failed and it looks like you are using the config parameter
{{enableProcessChecker}}.
How long the Surefire plugin lasts.
If it lasts up to 30 seconds then it means that the PING killed the forked JVM
but why if {{enableProcessChecker}} is disabled.
https://maven.apache.org/surefire/maven-surefire-plugin/examples/shutdown.html
https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#enableProcessChecker
btw, we are synchronizing the console logs to be consistent, see SUREFIRE-1926.
> JVM exit with Process Exit Code:0 failing builds
> ------------------------------------------------
>
> Key: SUREFIRE-1927
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1927
> Project: Maven Surefire
> Issue Type: Bug
> Components: Maven Surefire Plugin
> Affects Versions: 3.0.0-M5
> Environment: Our typical CI build uses:
> Amazon corretto Java8 1:8.282.08-1
> Maven 3.6.3
> and runs on Ubuntu:18:04 docker image
> We have also observed this using
> openjdk version "1.8.0_201"
> with Alpine linux 3.9.3
> Reporter: satellite15
> Priority: Major
> Attachments: 2021-07-06T15-27-23_728-jvmRun1.dump
>
>
> Builds in docker and in our CI tool (which is a dind solution) are failing
> randomly with errors such as
> {code:java}
> mvn install
> -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
> -B -U -Dmaven.wagon.http.retryhandler.count=6
> -Dmaven.repo.local=m2_repository -T1C{code}
> {code:java}
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (default-test)
> on project json-util: There are test failures.
> [ERROR]
> [ERROR] Please refer to /services/util/json/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] The forked VM terminated without properly saying goodbye. VM crash or
> System.exit called?
> [ERROR] Command was /bin/sh -c cd /services/util/json &&
> /usr/lib/jvm/java-1.8-openjdk/jre/bin/java
> -javaagent:/services/m2_repository/org/jacoco/org.jacoco.agent/0.8.7/org.jacoco.agent-0.8.7-runtime.jar=destfile=/services/util/json/target/coverage-reports/jacoco-ut.exec
> -jar
> /services/util/json/target/surefire/surefirebooter6588274738548295815.jar
> /services/util/json/target/surefire 2021-07-06T15-27-23_728-jvmRun1
> surefire2092561723068008165tmp surefire_62096530731829354626tmp
> [ERROR] Process Exit Code: 0
> [ERROR] Crashed tests:
> [ERROR] R] *********.util.json.formatter.JsonFormatterTest
> [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 /services/util/json &&
> /usr/lib/jvm/java-1.8-openjdk/jre/bin/java
> -javaagent:/services/m2_repository/org/jacoco/org.jacoco.agent/0.8.7/org.jacoco.agent-0.8.7-runtime.jar=destfile=/services/util/json/target/coverage-reports/jacoco-ut.exec
> -jar
> /services/util/json/target/surefire/surefirebooter6588274738548295815.jar
> /services/util/json/target/surefire 2021-07-06T15-27-23_728-jvmRun1
> surefire2092561723068008165tmp surefire_62096530731829354626tmp
> [INFO]
> [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ cloudtrail-cep ---
> [ERROR] Process Exit Code: 0
> [ERROR] Crashed tests:
> [ERROR] *********.util.json.formatter.JsonFormatterTest
> [ERROR] at
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:748)
> [ERROR] at
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:305)
> [ERROR] at
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:265)
> [ERROR] at
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1314)
> [ERROR] at
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1159)
> [ERROR] at
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:932)
> [ERROR] at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
> [ERROR] at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
> [ERROR] at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
> [ERROR] at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
> [ERROR] at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
> [ERROR] at
> org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:200)
> {code}
> Sometimes we get a list of Crashed tests, sometimes not.
> Our typical CI build uses:
> Amazon corretto Java8 1:8.282.08-1
> Maven 3.6.3
> and runs on Ubuntu:18:04 docker image
> We have also observed this using
> openjdk version "1.8.0_201"
> with Alpine linux 3.9.3
> In all cases we see a
> {code:java}
> [ERROR] Process Exit Code: 0{code}
> Which doesn't look like an error caused the JVM to exit.
> Our source code and our tests do not have any System.exit(0) calls.
> My first thoughts were that the tests finished but there is a timing issue
> with the ForkClient ByeListener getting notified that the JVM has exited.
> However that doesn't explain the cases when the error occurs and tests are
> still running which are then listed as crashed tests.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)