[ 
https://issues.apache.org/jira/browse/SUREFIRE-1808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17143896#comment-17143896
 ] 

Tibor Digana edited comment on SUREFIRE-1808 at 6/24/20, 2:58 PM:
------------------------------------------------------------------

In case of OOME you must not rely on stack trace that the particular line has 
reached the OOM.
The JVM is used to throw it several times and finaly it is thrown from anywhere 
asnd the process exits abnormally. The root cause does not have to be related 
to the line in stack trace.

You are using very old version. Plse switch the version to {{3.0.0-M5}} and let 
us know what you have observed.


was (Author: tibor17):
In case of OOME you must not rely on stack trace that the particular line has 
OOM.
The JVM is used to throw it several times and finaly the it thrown from 
anywhere.
It does not have to be related to the line.

You are using very old version. Plse switch the version to {{3.0.0-M5}} and let 
us know what you have observed.

> OutOfMemoryError running with TestNG
> ------------------------------------
>
>                 Key: SUREFIRE-1808
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1808
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Surefire Plugin, TestNG support
>    Affects Versions: 3.0.0-M3
>         Environment: OS: Linux
>            Reporter: Jingfei Hu
>            Priority: Major
>              Labels: OOM, TestNG, surefire
>         Attachments: image-2020-06-24-14-37-45-038.png
>
>
> Hi team,
> We've been suffering OutOfMemory intermittently in our test labs recently. 
> The call stack is below 
>  
> [ERROR] Java heap space -> [Help 1][ERROR] Java heap space -> [Help 
> 1]java.lang.OutOfMemoryError: Java heap space at 
> java.util.Arrays.copyOf(Arrays.java:3332) at 
> java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:124)
>  at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:448) at 
> java.lang.StringBuilder.append(StringBuilder.java:136) at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter$CloseableCloser.run(ForkStarter.java:204)
>  at 
> org.apache.maven.surefire.shade.common.org.apache.maven.shared.utils.cli.CommandLineUtils$1.call(CommandLineUtils.java:301)
>  at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:615)
>  at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:283)
>  at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:246)
>  at 
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1161)
>  at 
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1002)
>  at 
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:848)
>  at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
>  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:51)
>  at 
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
>  at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309) at 
> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194) at 
> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107) at 
> org.apache.maven.cli.MavenCli.execute(MavenCli.java:993) at 
> org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345) at 
> org.apache.maven.cli.MavenCli.main(MavenCli.java:191) 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)[ERROR]
>  [ERROR] [ERROR] For more information about the errors and possible 
> solutions, please read the following articles:[ERROR] [Help 1] 
> [http://cwiki.apache.org/confluence/display/MAVEN/OutOfMemoryError]
>  
> Our test count is +4k, and pass rate is around 95% for each execution. The 
> OOM error is not always reproducible. And we set memory dump parameters, but 
> there is no dump file generated when it occurs. 
>  
> More information:
> maven-surefire-plugin: 3.0.0-M3
> testng: 6.4
> maven: 3.2.5
>  
> The line of code throwing the exception is below.
>  
> !image-2020-06-24-14-37-45-038.png!
>  
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to