Maven Surefire
  1. Maven Surefire
  2. SUREFIRE-859

Exception in thread "TreadedStreamConsumer" java.lang.RuntimeException during GC

    Details

      Description

      When executing 151 integration tests with 829 test methods on a Solaris machine, there is an exception:
      ===
      Exception in thread "ThreadStreamConsumer" java.lang.RuntimeException: 176: [GC 100,177: [ParNew
      ...
      java.langh.RuntimeException: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ?
      ===
      (see attachment for full stack traces)

      The message of the RuntimeException suggests that the problem is connected to garbage collection. The stack trace points to ForkClient.java. It looks as if the method "consumeLine" in ForkClient.java is fed with GC information instead of the expected string.

      The exception occurs with concurrency configuration "parallel='none'" as well as with "parallel='classes'" in both versions of the surefire plugin, 2.11 and 2.12.

      However, this problem does not show up on a Windows/Cygwin environment.

      1. runtimeexception.txt
        14 kB
        Magnus Naeslund

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        945d 11h 7m 1 Tibor Digana 12/Nov/14 15:32
        Mark Thomas made changes -
        Workflow jira [ 12965172 ] Default workflow, editable Closed status [ 13002196 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 01:36:33 UTC 2015 [ 1428284193036 ]
        Mark Thomas made changes -
        Workflow jira [ 12728104 ] Default workflow, editable Closed status [ 12759170 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:23:32 UTC 2015 [ 1428240212200 ]
        Andreas Gudian made changes -
        Fix Version/s 2.19 [ 20728 ]
        Fix Version/s 2.18.1 [ 20814 ]
        Hide
        Tibor Digana added a comment -

        @Mag
        It was a simple fix. We are a small group of Maven developers. I would like to ask you to participate in development from time to time. A lot of Maven projects like surefire are available on GitHub as well.

        Show
        Tibor Digana added a comment - @Mag It was a simple fix. We are a small group of Maven developers. I would like to ask you to participate in development from time to time. A lot of Maven projects like surefire are available on GitHub as well.
        Hide
        Magnus Naeslund added a comment - - edited

        Thanks for fixing the problem. Unfortunately, the setup in which the exception was originally thrown is no longer in available to me.

        Show
        Magnus Naeslund added a comment - - edited Thanks for fixing the problem. Unfortunately, the setup in which the exception was originally thrown is no longer in available to me.
        Tibor Digana made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Hide
        Tibor Digana added a comment -

        commit 8e05b10c95d632db2aceecbb4f570e2b07002378

        Show
        Tibor Digana added a comment - commit 8e05b10c95d632db2aceecbb4f570e2b07002378
        Tibor Digana made changes -
        Fix Version/s 2.19 [ 20728 ]
        Hide
        Tibor Digana added a comment -

        I could not reproduce this issue with Maven 3.2.1 and x86 JDK 8.
        From my PoV this is JVM issue.
        I will fix it anyway, suppress the fault, and the SUREFIRE would not fail. You will see an error message in log instead.

        I have tested SUREFIRE with JVM options :

        export MAVEN_OPTS=-XX:+CMSParallelRemarkEnabled -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+PrintHeapAtGC -XX:+PrintTenuringDistribution -verbose:gc

        I set the same options in the plugin parameter "argLine".
        Other parameter forkMode=always.

        Show
        Tibor Digana added a comment - I could not reproduce this issue with Maven 3.2.1 and x86 JDK 8. From my PoV this is JVM issue. I will fix it anyway, suppress the fault, and the SUREFIRE would not fail. You will see an error message in log instead. I have tested SUREFIRE with JVM options : export MAVEN_OPTS=-XX:+CMSParallelRemarkEnabled -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+PrintHeapAtGC -XX:+PrintTenuringDistribution -verbose:gc I set the same options in the plugin parameter "argLine". Other parameter forkMode=always.
        Hide
        Tibor Digana added a comment -

        @Mag would you have time to check the fix with new snapshot version?
        The same JVM and machine should be used again.

        Show
        Tibor Digana added a comment - @Mag would you have time to check the fix with new snapshot version? The same JVM and machine should be used again.
        Hide
        Tibor Digana added a comment -

        yes @Andreas, this was my guess what's happening in that stream as well.
        I will check it out.

        Show
        Tibor Digana added a comment - yes @Andreas, this was my guess what's happening in that stream as well. I will check it out.
        Hide
        Andreas Gudian added a comment -

        This may look more like an issue of the JRE that was used here. Probably, the GC-Info printed by the VM is not routed through the System.out, but directly from the native JVM code to stdout.

        Would be worth checking if current JVMs still do that, and in that case adapt the ForkClient to ignore any lines that do not start with the expected prefixes.

        Show
        Andreas Gudian added a comment - This may look more like an issue of the JRE that was used here. Probably, the GC-Info printed by the VM is not routed through the System.out, but directly from the native JVM code to stdout. Would be worth checking if current JVMs still do that, and in that case adapt the ForkClient to ignore any lines that do not start with the expected prefixes.
        Tibor Digana made changes -
        Field Original Value New Value
        Assignee Tibor Digana [ tibor17 ]
        Hide
        Tibor Digana added a comment -

        Can you provide the configuration of surefire plugin?

        Show
        Tibor Digana added a comment - Can you provide the configuration of surefire plugin?
        Magnus Naeslund created issue -

          People

          • Assignee:
            Tibor Digana
            Reporter:
            Magnus Naeslund
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development