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

Surefire fails with StackOverflowError when toolchains are present

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 2.12.3
    • 2.12.4
    • Maven Surefire Plugin
    • None

    Description

      All our builds failed after an upgrade from 2.12.2 to 2.12.3 with the following stack trace. Looking at the trunk version of AbstractSurefireMojo.java, there's indeed an infinite recursion between the two methods. The recursion only happens when a toolchain is defined in the project.

      [INFO] --- maven-surefire-plugin:2.12.3:test (default-test) @ config-server ---
      [INFO] Toolchain in surefire-plugin: JDK[/opt/app/****/tools/jdk/64/jdk1.6.0_15]
      java.lang.reflect.InvocationTargetException
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
      	at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)
      	at hudson.maven.Maven3Builder.call(Maven3Builder.java:98)
      	at hudson.maven.Maven3Builder.call(Maven3Builder.java:64)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:287)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      	at java.lang.Thread.run(Thread.java:662)
      Caused by: java.lang.StackOverflowError
      	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.getEffectiveForkMode(AbstractSurefireMojo.java:890)
      	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.isForkModeNever(AbstractSurefireMojo.java:880)
      	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.getEffectiveForkMode(AbstractSurefireMojo.java:892)
      	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.isForkModeNever(AbstractSurefireMojo.java:880)
      	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.getEffectiveForkMode(AbstractSurefireMojo.java:892)
      	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.isForkModeNever(AbstractSurefireMojo.java:880)
      ...
      

      Attachments

        Activity

          People

            krosenvold Kristian Rosenvold
            sergei_ivanov@mail.ru Sergei S. Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: