Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 70945 invoked from network); 12 Jan 2005 11:45:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 12 Jan 2005 11:45:38 -0000 Received: (qmail 87928 invoked by uid 500); 12 Jan 2005 11:45:35 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 87891 invoked by uid 500); 12 Jan 2005 11:45:35 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 87874 invoked by uid 99); 12 Jan 2005 11:45:34 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from ajax-1.apache.org (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 12 Jan 2005 03:45:33 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (8.12.11/8.12.11) with ESMTP id j0CBjUYq015441 for ; Wed, 12 Jan 2005 12:45:30 +0100 Received: (from nobody@localhost) by ajax.apache.org (8.12.11/8.12.11/Submit) id j0CBjT6M015439; Wed, 12 Jan 2005 12:45:29 +0100 Date: Wed, 12 Jan 2005 12:45:29 +0100 Message-Id: <200501121145.j0CBjT6M015439@ajax.apache.org> From: bugzilla@apache.org To: dev@ant.apache.org Subject: DO NOT REPLY [Bug 33061] New: - OutOfMemoryError with custom Task in sub-build X-Bugzilla-Reason: AssignedTo X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND� INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=33061 Summary: OutOfMemoryError with custom Task in sub-build Product: Ant Version: 1.6.2 Platform: All OS/Version: All Status: NEW Severity: major Priority: P2 Component: Core AssignedTo: dev@ant.apache.org ReportedBy: preuss@disy.net Our situation: We do have a product build from 80+ modules. Each module has its own buildscript, which is called from a master buildscript. The module build scripts define custom tasks, which make use of thirdparty libraries, for example Dom4J. Now, since we introduced those custom tasks, we get OutOfMemoryErrors somewhere in the build process, even if we give it incredible amounts of memory (1 GB, for example). We don't get this error when putting dom4j.jar into the Ant classpath, so this is a workaround for now. It isn't acceptable for the long term though, as we plan to use even more custom tasks which might use other thirdparty libraries and have to maintain several Ant installations, so this would represent too big a maintenance burden. ---- Reproducing the problem: The attached zipfile contains four files to reproduce the problem: - a minimal custom task using Dom4J - a minimal test.xml that is loaded by the custom task using Dom4J - a subbuild.xml which defines the task and calls it - a build.xml which simply calls subbuild.xml a huge amount of times * compile DummyTask.java * update the classpath definition in subbuild.xml to your local environment * run build.xml using Ant 1.6.2, JDK 1.4.2, without having dom4j.jar in the classpath, giving it 2MB of heap (-mx2m). After some time, you get an OutOfMemoryError * try the same with dom4j.jar in the Ant classpath. You don't get the error. ---- Analysis: Adding some debug statements to AntClassLoader and running Ant in JProfiler, it becomes obvious that neither the AntClassLoader, nor the Dom4J classes used for loading and executing the custom task ever get garbage collected. Those classes build up in memory until it comes to the OutOfMemoryError. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org