Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 2.12.3
-
Fix Version/s: 2.12.4
-
Component/s: Maven Surefire Plugin
-
Labels:None
-
Complexity:Intermediate
-
Number of attachments :
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) ...
Fixed in r1385045, thanks for the bug report !
We've been struggling with test coverage for the toolchain stuff, but I finally think I managed to find a nice unit test.