Time to load coverage database time increaes incrementally

The time to load the coverage database is getting incremented with each build and finally results in Out of Memmory error. The build finishes and publishes report in good time when the existing report and DB is cleared.

Below is the stack trace for the same

java.lang.OutOfMemoryError: GC overhead limit exceeded
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:115)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at org.apache.tools.ant.Main.runBuild(Main.java:698)
        at org.apache.tools.ant.Main.startAnt(Main.java:199)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
        at java.io.BufferedReader.<init>(BufferedReader.java:80)
        at java.io.BufferedReader.<init>(BufferedReader.java:91)
        at org.apache.tools.ant.DefaultLogger.messageLogged(DefaultLogger.java:255)
        at org.apache.tools.ant.Project.fireMessageLoggedEvent(Project.java:2171)
        at org.apache.tools.ant.Project.fireMessageLogged(Project.java:2271)
        at org.apache.tools.ant.Project.log(Project.java:449)
        at com.cenqua.clover.ant.AbstractAntLogger.antLog(AbstractAntLogger.java:28)
        at com.cenqua.clover.ant.AbstractAntLogger.log(AbstractAntLogger.java:48)
        at com.cenqua.clover.Logger.debug(Logger.java:155)
        at com.cenqua.clover.RecordingTranscripts.readSliceFromDisk(RecordingTranscripts.java:122)
        at com.cenqua.clover.RecordingTranscripts$FileRef.read(RecordingTranscripts.java:354)
        at com.cenqua.clover.CoverageDataCollator.collatePerTestRecordings(CoverageDataCollator.java:156)
        at com.cenqua.clover.CoverageDataCollator.loadCoverageData(CoverageDataCollator.java:68)
        at com.cenqua.clover.CloverDatabase.loadCoverageData(CloverDatabase.java:164)
        at com.cenqua.clover.CloverDatabase.loadCoverageData(CloverDatabase.java:159)
        at com.cenqua.clover.reporters.CloverReportConfig.getCoverageDatabase(CloverReportConfig.java:342)
        at com.cenqua.clover.reporters.Current.getCoverageDatabase(Current.java:126)
        at com.cenqua.clover.reporters.CloverReporter.<init>(CloverReporter.java:33)
        at com.cenqua.clover.reporters.html.HtmlReporter.<init>(HtmlReporter.java:125)
        at com.cenqua.clover.reporters.CloverReporter.buildReporter(CloverReporter.java:72)
        at com.cenqua.clover.tasks.CloverReportTask.generateReports(CloverReportTask.java:428)
        at com.cenqua.clover.tasks.CloverReportTask.cloverExecute(CloverReportTask.java:385)
        at com.cenqua.clover.tasks.CloverHtmlReportTask.cloverExecute(CloverHtmlReportTask.java:108)
        at com.cenqua.clover.tasks.AbstractCloverTask.execute(AbstractCloverTask.java:55)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
--- Nested Exception ---
java.lang.OutOfMemoryError: GC overhead limit exceeded
        at java.io.BufferedReader.<init>(BufferedReader.java:80)
        at java.io.BufferedReader.<init>(BufferedReader.java:91)
        at org.apache.tools.ant.DefaultLogger.messageLogged(DefaultLogger.java:255)
        at org.apache.tools.ant.Project.fireMessageLoggedEvent(Project.java:2171)
        at org.apache.tools.ant.Project.fireMessageLogged(Project.java:2271)
        at org.apache.tools.ant.Project.log(Project.java:449)
        at com.cenqua.clover.ant.AbstractAntLogger.antLog(AbstractAntLogger.java:28)
        at com.cenqua.clover.ant.AbstractAntLogger.log(AbstractAntLogger.java:48)
        at com.cenqua.clover.Logger.debug(Logger.java:155)
        at com.cenqua.clover.RecordingTranscripts.readSliceFromDisk(RecordingTranscripts.java:122)
        at com.cenqua.clover.RecordingTranscripts$FileRef.read(RecordingTranscripts.java:354)
        at com.cenqua.clover.CoverageDataCollator.collatePerTestRecordings(CoverageDataCollator.java:156)
        at com.cenqua.clover.CoverageDataCollator.loadCoverageData(CoverageDataCollator.java:68)
        at com.cenqua.clover.CloverDatabase.loadCoverageData(CloverDatabase.java:164)
        at com.cenqua.clover.CloverDatabase.loadCoverageData(CloverDatabase.java:159)
        at com.cenqua.clover.reporters.CloverReportConfig.getCoverageDatabase(CloverReportConfig.java:342)
        at com.cenqua.clover.reporters.Current.getCoverageDatabase(Current.java:126)
        at com.cenqua.clover.reporters.CloverReporter.<init>(CloverReporter.java:33)
        at com.cenqua.clover.reporters.html.HtmlReporter.<init>(HtmlReporter.java:125)
        at com.cenqua.clover.reporters.CloverReporter.buildReporter(CloverReporter.java:72)
        at com.cenqua.clover.tasks.CloverReportTask.generateReports(CloverReportTask.java:428)
        at com.cenqua.clover.tasks.CloverReportTask.cloverExecute(CloverReportTask.java:385)
        at com.cenqua.clover.tasks.CloverHtmlReportTask.cloverExecute(CloverHtmlReportTask.java:108)
        at com.cenqua.clover.tasks.AbstractCloverTask.execute(AbstractCloverTask.java:55)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)

at org.apache.tools.ant.Target.performTasks(Target.java:385)

1 answer

1 accepted

1 votes

Hi,

Clover databases shouldn't be kept around between builds - they should be deleted as soon as you've reported on them. Consequently what you're experiencing is probably a symptom of inefficiencies we've never attempted to optimised because we don't expect or want customers to use the databases in that way.

Hope this helps.

Hi,

Now added to clean targets task to delete the coverage data base and generated report and this works, thanks a lot for the proposal.

I was expecting this clean up to be done with <clover-clean but was not working(not deleting) but when I do a manual delete using <del and point ot directories to delete it works.

One more clarification, if we delete old coverage DB and covergare files would we still be able to generate historical reports?

Clover clean should indeed delete the db. If not, that's a bug!

To take historical snapshots, you need to run <clover-historypoint/> http://confluence.atlassian.com/display/CLOVER/clover-historypoint

This historical data is stored in a history directory of your choosing (stored as zipped xml files). You can then, at any point after, generate a history report.

Suggest an answer

Log in or Join to answer
Community showcase
Teodora [Botron]
Published Thursday in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

240 views 0 11
Read article

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot