Bamboo JUnit Parser Error: GC overhead limit exceeded

I'm getting this error when running the JUnit Parser task in Bamboo Cloud:

simple 02-Aug-2016 10:50:56 Starting task 'Parse test results' of type 'com.atlassian.bamboo.plugins.testresultparser:task.testresultparser.junit'
simple 02-Aug-2016 10:50:56 Parsing test results under /home/bamboo/bamboo-agent-home/xml-data/build-dir/ZOOX-TEST-JOB1...
error 02-Aug-2016 10:51:17 Error occurred while running Task 'Parse test results(3)' of type com.atlassian.bamboo.plugins.testresultparser:task.testresultparser.junit.
error 02-Aug-2016 10:51:17 java.lang.OutOfMemoryError: GC overhead limit exceeded
error 02-Aug-2016 10:51:17 at java.lang.StringCoding$StringEncoder.encode(StringCoding.java:300)
error 02-Aug-2016 10:51:17 at java.lang.StringCoding.encode(StringCoding.java:344)
error 02-Aug-2016 10:51:17 at java.lang.String.getBytes(String.java:918)
error 02-Aug-2016 10:51:17 at java.io.UnixFileSystem.list(Native Method)
error 02-Aug-2016 10:51:17 at java.io.File.list(File.java:1122)
error 02-Aug-2016 10:51:17 at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1257)
error 02-Aug-2016 10:51:17 at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1287)
error 02-Aug-2016 10:51:17 at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1287)
error 02-Aug-2016 10:51:17 at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1287)
error 02-Aug-2016 10:51:17 at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1287)
error 02-Aug-2016 10:51:17 at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1287)
error 02-Aug-2016 10:51:17 at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1287)
error 02-Aug-2016 10:51:17 at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1287)
error 02-Aug-2016 10:51:17 at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1287)
error 02-Aug-2016 10:51:17 at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1287)
error 02-Aug-2016 10:51:17 at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1287)
error 02-Aug-2016 10:51:17 at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1287)
error 02-Aug-2016 10:51:17 at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1287)
error 02-Aug-2016 10:51:17 at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1287)
error 02-Aug-2016 10:51:17 at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1287)
error 02-Aug-2016 10:51:17 at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1211)
error 02-Aug-2016 10:51:17 at org.apache.tools.ant.DirectoryScanner.checkIncludePatterns(DirectoryScanner.java:1030)
error 02-Aug-2016 10:51:17 at org.apache.tools.ant.DirectoryScanner.scan(DirectoryScanner.java:909)
error 02-Aug-2016 10:51:17 at org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:499)
error 02-Aug-2016 10:51:17 at com.atlassian.bamboo.utils.FileVisitor.visitAllFilesThatMatchAPattern(FileVisitor.java:108)
error 02-Aug-2016 10:51:17 at com.atlassian.bamboo.utils.FileVisitor.visitFilesThatMatch(FileVisitor.java:76)
error 02-Aug-2016 10:51:17 at com.atlassian.bamboo.build.test.TestCollationServiceImpl.collateTestResults(TestCollationServiceImpl.java:175)
error 02-Aug-2016 10:51:17 at com.atlassian.bamboo.build.test.TestCollationServiceImpl.collateTestResults(TestCollationServiceImpl.java:62)
error 02-Aug-2016 10:51:17 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
error 02-Aug-2016 10:51:17 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
error 02-Aug-2016 10:51:17 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error 02-Aug-2016 10:51:17 at java.lang.reflect.Method.invoke(Method.java:498)

It's been working fine for the last several months but I think that my project has gotten big enough that it's triggering memory problems now. There is a single glob ({{**}}) in the directories to search for.

2 answers

1 vote

@Marc Zych I think this issue qualifies as a bug in Bamboo. Please create a bug report in our issue tracker (https://jira.atlassian.com/projects/BAM/issues)

0 votes
Marcin Oles Atlassian Team Aug 02, 2016

Hi Marc,

I think this problem can be addressed by narrowing the search scope of JUnit Parser task. If you know anything about the report files and their location, use that knowledge when defining the test results path pattern.

As an example, instead of using **, you may try to use a value similar to this:

**/target/group-*/**/surefire-reports/*.xml

(In this case we knew that test reports will be stored in "target/group-<groupName>/tomcat<version>/surefire-reports", so we could specify such path.) Even the following change might improve the situation:

**/target/**/*.xml

or

**/*.xml

Hi Marcin,

Thank you for the suggestion. However, I wasn't very precise with my statement -  I meant to say that the search path contains ** but isn't exactly **. It is something like this:

dir/dir/**/test.xml

I don't think that I can narrow that down much more.

Are there any other workarounds, @Marcin Oles? It'd be really great if I could reenable this task to get rich test reporting!

Suggest an answer

Log in or Sign up to answer
Community showcase
Asked Dec 06, 2018 in Jira Ops

I'm John Allspaw, Ask Me Anything about incident analysis and postmortems

I'm John Allspaw, co-founder of   Adaptive Capacity Labs, where we help teams use their incidents to learn and improve. We bring research-driven methods and approaches to drive effective inciden...

5,609 views 22 17
View question

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you