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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.22.0
    • None
    • Maven Surefire Plugin
    • None

    Description

      Attempting to run integration tests using maven-failsafe-plugin with -Dmaven.failsafe.debug=false yields the following stacktrace:
       

      [ERROR] ExecutionException The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
      [ERROR] Command was cmd.exe /X /C ""C:\Program Files\Java\jdk1.8.0_121\jre\bin\java" false -jar C:\Users\ANGHEL~1.BOT\AppData\Local\Temp\surefire8539836821793811485\surefirebooter6734575521909210279.jar C:\Users\anghel.botos\AppData\Local\Temp\surefire8539836821793811485 2018-07-24T11-18-12_704-jvmRun1 surefire7184511894589995478tmp surefire_411836142070426630764tmp"
      [ERROR] Error occurred in starting fork, check output in log
      [ERROR] Process Exit Code: 1
      [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.awaitResultsDone(ForkStarter.java:494)
      [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.runSuitesForkPerTestSet(ForkStarter.java:441)
      [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:293)
      [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245)
      

       

      The issue is the "free-floating" false that appears in the command line used to start a new JVM. I've traced down the issue to org.apache.maven.plugin.surefire.AbstractSurefireMojo#getEffectiveDebugForkedProcess where the following code can be found:

              String debugForkedProcess = getDebugForkedProcess();
              if ( "true".equals( debugForkedProcess ) )
              {
                  return "-Xdebug -Xnoagent -Djava.compiler=NONE"
                      + " -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005";
              }
              return debugForkedProcess;
      

      ...which is quite..."unexpected" to see that one can pass in a value of true, but not a value of false.

      Please fix with a proper parsing of true/false values for the maven.failsafe.debug property.

      Attachments

        1. hs_err_pid3584.log
          179 kB
          Radoslav Ivanov

        Issue Links

          Activity

            People

              tibordigana Tibor Digana
              abotos Anghel Botos
              Votes:
              6 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: