groovy

Groovy ant task memory leak

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Won't Fix
  • Affects Version/s: 1.0-JSR-2
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
  • Testcase included:
    yes
  • Number of attachments :
    1

Description

There appears to be a memory leak in the groovy ant task. This becomes apparent when calling from one ant file to a number of others, each with a groovy task.

I performed the following tests:

  • Increase the complexity and memory used of the groovy script in ant. This had no effect.
  • Increase the number of groovy tasks in a single ant script. This had no effect
  • Increase the total number of ant scripts called. This showed memory growth.

The following message is typical:

BUILD FAILED
D:\projects\config\build\temp\build.xml:13: Following error occured while executing this line
D:\projects\config\build\temp\dependencies.xml:87: Following error occured while executing this line
java.lang.OutOfMemoryError

I have attached a demonstration ant build system similar to our project build where the problem first occurred. For best results set the JVM memory via the ANT_OPTS environment variable to something like 16 Meg ie:

set ANT_OPTS=-Xmx16M

and then run ant.

Activity

Hide
Peter Kelley added a comment -

This also happens on ant 1.6.5 although the problem is less severe

Show
Peter Kelley added a comment - This also happens on ant 1.6.5 although the problem is less severe
Hide
Russel Winder added a comment -

Has anyone tried this on 1.7.0?

Show
Russel Winder added a comment - Has anyone tried this on 1.7.0?
Hide
Guillaume Laforge added a comment -

Please reopen if it's still an issue.

Show
Guillaume Laforge added a comment - Please reopen if it's still an issue.
Hide
Craig Federighi added a comment -

This is still very much an issue – the supplied test case shows a large/rapid memory leak under Ant 1.7.1 + Groovy 1.6.

Show
Craig Federighi added a comment - This is still very much an issue – the supplied test case shows a large/rapid memory leak under Ant 1.7.1 + Groovy 1.6.

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: