Maven Surefire
  1. Maven Surefire
  2. SUREFIRE-859

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

    Details

    • Complexity:
      Intermediate
    • Number of attachments :
      1

      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.

        Activity

        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?
        Tibor Digana made changes -
        Field Original Value New Value
        Assignee Tibor Digana [ tibor17 ]
        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.
        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
        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 -

        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.
        Tibor Digana made changes -
        Fix Version/s 2.19 [ 20728 ]
        Hide
        Tibor Digana added a comment -

        commit 8e05b10c95d632db2aceecbb4f570e2b07002378

        Show
        Tibor Digana added a comment - commit 8e05b10c95d632db2aceecbb4f570e2b07002378
        Tibor Digana made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Closed [ 6 ]
        Hide
        Mag Hoehme 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
        Mag Hoehme 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.
        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.

          People

          • Assignee:
            Tibor Digana
            Reporter:
            Mag Hoehme
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: