History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: GROOVY-891
Type: Bug Bug
Status: Closed Closed
Resolution: Won't Fix
Priority: Critical Critical
Assignee: Jeremy Rayner
Reporter: Peter Kelley
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
groovy

Groovy ant task memory leak

Created: 16/Jun/05 02:37 AM   Updated: 02/Nov/07 07:27 AM
Component/s: None
Affects Version/s: 1.0-JSR-2
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. Zip Archive temp.zip (1.42 Mb)

Environment:
Apache Ant version 1.6.1 compiled on February 12 2004
java version "1.4.2_08"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_08-b03)
Java HotSpot(TM) Client VM (build 1.4.2_08-b03, mixed mode)

or Eclipse 3.1 M5a with included ant and Java 1.5_02

Both running on Windows XP SP2

Testcase included: yes


 Description  « Hide
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.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Peter Kelley - 16/Jun/05 03:14 AM
This also happens on ant 1.6.5 although the problem is less severe

Russel Winder - 15/Jul/07 04:04 AM
Has anyone tried this on 1.7.0?

Guillaume Laforge - 02/Nov/07 07:27 AM
Please reopen if it's still an issue.