Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-1927

JVM exit with Process Exit Code:0 failing builds

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.0.0-M5
    • Fix Version/s: None
    • Component/s: Maven Surefire Plugin
    • Labels:
      None
    • Environment:

      Description

      Builds in docker and in our CI tool (which is a dind solution) are failing randomly with errors such as

      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
      [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)
      

      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 

      [ERROR] Process Exit Code: 0

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              satellite15 satellite15

              Dates

              • Created:
                Updated:

                Issue deployment