maven build success despite OOM

100 views
Skip to first unread message

Ned

unread,
Feb 24, 2020, 9:57:23 AM2/24/20
to Jenkins Users
Hello,

I have a test, which junit-vintage cannot execute because of OOM. The build however finish with status 'BUILD SUCCESS'. Is it possible to configure Jenkins to fail in that case as well or is this just a bug?

Ned


[INFO] Running com.company.OOM_IT
Feb 22, 2020 4:34:00 PM org.junit.platform.launcher.core.DefaultLauncher handleThrowable
WARNING: TestEngine with ID 'junit-vintage' failed to execute tests
java.lang.OutOfMemoryError: GC overhead limit exceeded

[INFO] 
[INFO] Results:
[INFO] 
[WARNING] Tests run: 1000, Failures: 0, Errors: 0, Skipped: 1
[INFO] 
[ERROR] There are test failures.

Please refer to /var/lib/jenkins/jobs/project/workspace/project_name/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.
There was an error in the forked process
GC overhead limit exceeded
org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process
GC overhead limit exceeded
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:656)
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:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
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:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
at jenkins.maven3.agent.Maven35Main.launch(Maven35Main.java:178)
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:211)
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)

[JENKINS] Recording test results
Started calculate disk usage of build
Finished Calculation of disk usage of build in 0 seconds
Started calculate disk usage of workspace
Finished Calculation of disk usage of workspace in 0 seconds
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

James Nord

unread,
Feb 25, 2020, 4:02:31 PM2/25/20
to Jenkins Users
what kind of job are you using and how do you launch maven?

Ned

unread,
Feb 26, 2020, 9:41:36 AM2/26/20
to Jenkins Users
I've used maven project template in jenkins to create the job. The launch command
mvn -e clean test -Pmyprofile

James Nord

unread,
Feb 26, 2020, 6:05:37 PM2/26/20
to Jenkins Users
that sounds like a bug in the maven job type. if you can reproduce it with something you share can you file an issue in issues.jenkins-ci.org along with the source, Jenkins plugin versions jdk and maven versions.

you can get very similar results to the maven job type in pipeline using the pipeline-maven-plugin (with maven step), but it sounds like you may be invested in the maven job type.

James Nord

unread,
Feb 26, 2020, 6:07:03 PM2/26/20
to Jenkins Users
I'm assuming if you run that outside of Jenkins that the maven command returns a non zero exit code?

Jan Monterrubio

unread,
Feb 29, 2020, 6:18:53 PM2/29/20
to jenkins...@googlegroups.com
Is your profile setting the ignore errors property for maven ? 

On Wed, Feb 26, 2020 at 17:07 James Nord <james...@gmail.com> wrote:
I'm assuming if you run that outside of Jenkins that the maven command returns a non zero exit code?

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d91777e2-908e-43d5-a454-38f2ea8bcb4b%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages