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

Forking fails on OS/X

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.20.1, 2.21.0
    • None
    • process forking
    • None
    • OS/X 10.13.3
      Java 1.8.0_162

    Description

      This is very similar to SUREFIRE-1422, but is still present intermittently on version 2.21.0 as well as 2.20.1.  It was not present on 2.19.1.

      The symptom is that all tests run fine (the reports are there), but as soon as they do, there is an error:

      The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
       ...
      Process Exit Code: 0
      

      This of course fails the build.

      This occurs on roughly half the builds (with 2.21.0, at least).

      Maven version 3.5.3. Java 1.8.0_162. OS/X 10.13.3.

      Selected output from mvn -X
      [DEBUG] Forking command line: /bin/sh -c cd /Users/lwest/git/caas/jsk-cc && /Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/bin/java -jar /Users/lwest/git/caas/jsk-cc/target/surefire/surefirebooter4496843559994461722.jar /Users/lwest/git/caas/jsk-cc/target/surefire 2018-03-16T16-08-09_300-jvmRun1 surefire3972773662020453876tmp surefire_06790995305937656848tmp
      

      ... then, after all the tests have run, successfully, it reports failure:

      Caused by: org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
      Command was /bin/sh -c cd /Users/lwest/git/caas/jsk-cc && /Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home/jre/bin/java -jar /Users/lwest/git/caas/jsk-cc/target/surefire/surefirebooter4496843559994461722.jar /Users/lwest/git/caas/jsk-cc/target/surefire 2018-03-16T16-08-09_300-jvmRun1 surefire3972773662020453876tmp surefire_06790995305937656848tmp
      Process Exit Code: 0
          at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork (ForkStarter.java:671)
          at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork (ForkStarter.java:533)
          at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run (ForkStarter.java:278)
          at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run (ForkStarter.java:244)
          at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider (AbstractSurefireMojo.java:1148)
          at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked (AbstractSurefireMojo.java:977)
          at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute (AbstractSurefireMojo.java:853)
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
          at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
          at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:498)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
      

      There are no "[date]-jvmRun[N].dump", "[date].dumpstream" or "[date]-jvmRun[N].dumpstream" files.

      Addendum

      One detail that is perhaps not relevant is that our projects always use file.encoding=UTF-8, but I see that ForkStarter has hard-coded ISO_8859_1 as the StreamCharset param to executeCommandLineAsCallable().

      Attachments

        1. surefire3972773662020453876tmp
          13 kB
          Larry West
        2. surefire_06790995305937656848tmp
          0.2 kB
          Larry West

        Issue Links

          Activity

            People

              tibordigana Tibor Digana
              larry_west Larry West
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: