[ https://issues.apache.org/jira/browse/SUREFIRE-1622?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Hammer updated SUREFIRE-1622: ------------------------------------- Affects Version/s: 3.0.0-M3 2.22.0 Description: [~tibor17] identified the real problem as being the use of a config parameter in the maven-surefire-plugin configuration that should not be used any longer. We have an aggregating plugin where the classpath of a lot of different projects are combined for integration tests. We now have problems since one point in time with failing tests: {noformat} Please refer to /var/lib/jenkins/jobs/myproject_trunk svn/workspace/buildhelper/target/surefire-reports for the individual test results. Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream. The forked VM terminated without properly saying goodbye. VM crash or System.exit called? Command was /bin/sh -c cd "/var/lib/jenkins/jobs/myproject_trunk svn/workspace/buildhelper" && /var/lib/jenkins/tools/hudson.model.JDK/java8/jre/bin/java -Dfile.encoding=UTF-8 org.apache.maven.surefire.booter.ForkedBooter '/var/lib/jenkins/jobs/myproject_trunk svn/workspace/buildhelper/target/surefire' 2019-01-08T17-09-39_970-jvmRun1 surefire76194600426378498tmp surefire_18239836832627501299tmp Error while executing forked tests.Error while executing process.Cannot run program "/bin/sh" (in directory "/var/lib/jenkins/jobs/myproject_trunk svn/workspace/buildhelper"): error=7, Die Argumentliste ist zu langorg.apache.maven.surefire.shade.org.apache.maven.shared.utils.cli.CommandLineException: Error while executing process. at org.apache.maven.surefire.shade.org.apache.maven.shared.utils.cli.Commandline.execute(Commandline.java:412) at org.apache.maven.plugin.surefire.booterclient.lazytestprovider.OutputStreamFlushableCommandline.execute(OutputStreamFlushableCommandline.java:65) at org.apache.maven.surefire.shade.org.apache.maven.shared.utils.cli.CommandLineUtils.executeCommandLineAsCallable(CommandLineUtils.java:229) at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:609) at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:282) at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245) at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1183) at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1011) at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:857) 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.jvnet.hudson.maven3.launcher.Maven35Launcher.main(Maven35Launcher.java:130) 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 jenkins.maven3.agent.Maven35Main.launch(Maven35Main.java:176) 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 hudson.maven.Maven3Builder.call(Maven3Builder.java:139) at hudson.maven.Maven3Builder.call(Maven3Builder.java:70) at hudson.remoting.UserRequest.perform(UserRequest.java:212) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:369) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: Cannot run program "/bin/sh" (in directory "/var/lib/jenkins/jobs/myproject_trunk svn/workspace/buildhelper"): error=7, Die Argumentliste ist zu lang at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at java.lang.Runtime.exec(Runtime.java:620) at org.apache.maven.surefire.shade.org.apache.maven.shared.utils.cli.Commandline.execute(Commandline.java:407) ... 41 more Caused by: java.io.IOException: error=7, Die Argumentliste ist zu lang at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:247) at java.lang.ProcessImpl.start(ProcessImpl.java:134) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 43 more{noformat} I suspect that the internal implementation of maven surefire does not allow to work with a really long classpath. I tried the suggestion with the ulimit command as described here: [https://unix.stackexchange.com/questions/45583/argument-list-too-long-how-do-i-deal-with-it-without-changing-my-command] However it does not work. Is there a way to switch on a more verbose log to learn what is internally the cause of the problem? was: We have an aggregating plugin where the classpath of a lot of different projects are combined for integration tests. We now have problems since one point in time with failing tests: {noformat} Please refer to /var/lib/jenkins/jobs/myproject_trunk svn/workspace/buildhelper/target/surefire-reports for the individual test results. Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream. The forked VM terminated without properly saying goodbye. VM crash or System.exit called? Command was /bin/sh -c cd "/var/lib/jenkins/jobs/myproject_trunk svn/workspace/buildhelper" && /var/lib/jenkins/tools/hudson.model.JDK/java8/jre/bin/java -Dfile.encoding=UTF-8 org.apache.maven.surefire.booter.ForkedBooter '/var/lib/jenkins/jobs/myproject_trunk svn/workspace/buildhelper/target/surefire' 2019-01-08T17-09-39_970-jvmRun1 surefire76194600426378498tmp surefire_18239836832627501299tmp Error while executing forked tests.Error while executing process.Cannot run program "/bin/sh" (in directory "/var/lib/jenkins/jobs/myproject_trunk svn/workspace/buildhelper"): error=7, Die Argumentliste ist zu langorg.apache.maven.surefire.shade.org.apache.maven.shared.utils.cli.CommandLineException: Error while executing process. at org.apache.maven.surefire.shade.org.apache.maven.shared.utils.cli.Commandline.execute(Commandline.java:412) at org.apache.maven.plugin.surefire.booterclient.lazytestprovider.OutputStreamFlushableCommandline.execute(OutputStreamFlushableCommandline.java:65) at org.apache.maven.surefire.shade.org.apache.maven.shared.utils.cli.CommandLineUtils.executeCommandLineAsCallable(CommandLineUtils.java:229) at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:609) at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:282) at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245) at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1183) at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1011) at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:857) 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.jvnet.hudson.maven3.launcher.Maven35Launcher.main(Maven35Launcher.java:130) 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 jenkins.maven3.agent.Maven35Main.launch(Maven35Main.java:176) 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 hudson.maven.Maven3Builder.call(Maven3Builder.java:139) at hudson.maven.Maven3Builder.call(Maven3Builder.java:70) at hudson.remoting.UserRequest.perform(UserRequest.java:212) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:369) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: Cannot run program "/bin/sh" (in directory "/var/lib/jenkins/jobs/myproject_trunk svn/workspace/buildhelper"): error=7, Die Argumentliste ist zu lang at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at java.lang.Runtime.exec(Runtime.java:620) at org.apache.maven.surefire.shade.org.apache.maven.shared.utils.cli.Commandline.execute(Commandline.java:407) ... 41 more Caused by: java.io.IOException: error=7, Die Argumentliste ist zu lang at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:247) at java.lang.ProcessImpl.start(ProcessImpl.java:134) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 43 more{noformat} I suspect that the internal implementation of maven surefire does not allow to work with a really long classpath. I tried the suggestion with the ulimit command as described here: [https://unix.stackexchange.com/questions/45583/argument-list-too-long-how-do-i-deal-with-it-without-changing-my-command] However it does not work. Is there a way to switch on a more verbose log to learn what is internally the cause of the problem? Summary: failure to run tests if useSystemClassLoader config entry is used (was: failure to run tests if classpath gets too long (?)) I changed the title. Please check if this is what you think it should be. Imho still the two other problems (compiling with " " in path, no test failure with newer versions of surefire plugin when problem like discoverer here happens) are there but maybe we should not put everything to one issue. > failure to run tests if useSystemClassLoader config entry is used > ----------------------------------------------------------------- > > Key: SUREFIRE-1622 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1622 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin > Affects Versions: 3.0.0-M3, 2.22.0, 2.22.1 > Environment: debian linux > Linux jenkins 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u3 (2016-01-17) > x86_64 GNU/Linux > Jenkins 2.157 > Reporter: Carsten Hammer > Priority: Major > > [~tibor17] identified the real problem as being the use of a config parameter > in the maven-surefire-plugin configuration that should not be used any > longer. > > We have an aggregating plugin where the classpath of a lot of different > projects are combined for integration tests. We now have problems since one > point in time with failing tests: > {noformat} > Please refer to /var/lib/jenkins/jobs/myproject_trunk > svn/workspace/buildhelper/target/surefire-reports for the individual test > results. > Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump > and [date].dumpstream. > The forked VM terminated without properly saying goodbye. VM crash or > System.exit called? > Command was /bin/sh -c cd "/var/lib/jenkins/jobs/myproject_trunk > svn/workspace/buildhelper" && > /var/lib/jenkins/tools/hudson.model.JDK/java8/jre/bin/java > -Dfile.encoding=UTF-8 org.apache.maven.surefire.booter.ForkedBooter > '/var/lib/jenkins/jobs/myproject_trunk > svn/workspace/buildhelper/target/surefire' 2019-01-08T17-09-39_970-jvmRun1 > surefire76194600426378498tmp surefire_18239836832627501299tmp > Error while executing forked tests.Error while executing process.Cannot run > program "/bin/sh" (in directory "/var/lib/jenkins/jobs/myproject_trunk > svn/workspace/buildhelper"): error=7, Die Argumentliste ist zu > langorg.apache.maven.surefire.shade.org.apache.maven.shared.utils.cli.CommandLineException: > Error while executing process. > at > org.apache.maven.surefire.shade.org.apache.maven.shared.utils.cli.Commandline.execute(Commandline.java:412) > at > org.apache.maven.plugin.surefire.booterclient.lazytestprovider.OutputStreamFlushableCommandline.execute(OutputStreamFlushableCommandline.java:65) > at > org.apache.maven.surefire.shade.org.apache.maven.shared.utils.cli.CommandLineUtils.executeCommandLineAsCallable(CommandLineUtils.java:229) > at > org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:609) > at > org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:282) > at > org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245) > at > org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1183) > at > org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1011) > at > org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:857) > 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.jvnet.hudson.maven3.launcher.Maven35Launcher.main(Maven35Launcher.java:130) > 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 jenkins.maven3.agent.Maven35Main.launch(Maven35Main.java:176) > 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 hudson.maven.Maven3Builder.call(Maven3Builder.java:139) > at hudson.maven.Maven3Builder.call(Maven3Builder.java:70) > at hudson.remoting.UserRequest.perform(UserRequest.java:212) > at hudson.remoting.UserRequest.perform(UserRequest.java:54) > at hudson.remoting.Request$2.run(Request.java:369) > at > hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) > at java.util.concurrent.FutureTask.run(FutureTask.java:266) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) > at java.lang.Thread.run(Thread.java:748) > Caused by: java.io.IOException: Cannot run program "/bin/sh" (in directory > "/var/lib/jenkins/jobs/myproject_trunk svn/workspace/buildhelper"): error=7, > Die Argumentliste ist zu lang > at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) > at java.lang.Runtime.exec(Runtime.java:620) > at > org.apache.maven.surefire.shade.org.apache.maven.shared.utils.cli.Commandline.execute(Commandline.java:407) > ... 41 more > Caused by: java.io.IOException: error=7, Die Argumentliste ist zu lang > at java.lang.UNIXProcess.forkAndExec(Native Method) > at java.lang.UNIXProcess.<init>(UNIXProcess.java:247) > at java.lang.ProcessImpl.start(ProcessImpl.java:134) > at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) > ... 43 more{noformat} > I suspect that the internal implementation of maven surefire does not allow > to work with a really long classpath. > I tried the suggestion with the ulimit command as described here: > [https://unix.stackexchange.com/questions/45583/argument-list-too-long-how-do-i-deal-with-it-without-changing-my-command] > However it does not work. > Is there a way to switch on a more verbose log to learn what is internally > the cause of the problem? > -- This message was sent by Atlassian JIRA (v7.6.3#76005)