You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2007/06/19 15:33:21 UTC
DO NOT REPLY [Bug 42696] New: - OutOfMemoryError using unzip Task
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42696>.
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=42696
Summary: OutOfMemoryError using unzip Task
Product: Ant
Version: 1.7.0
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: major
Priority: P2
Component: Core tasks
AssignedTo: dev@ant.apache.org
ReportedBy: b.eicki@gmx.net
If I try to expand a rather huge zip file (in my case 42910 files, 783359kb
uncompressed, 66906kb compressed) using the unzip task I get a
java.lang.OutOfMemoryError: requested 37904 bytes for Chuck::new. Out of swap
space?
My Java Options (Jdk 1.5.0_08 / Jdk 1.6_01) are
ANT_OPTS=-XX:NewRatio=2 -Xms512m -Xmx1024m -verbose:gc -XX:+PrintGCDetails
on a windows xp pro 32-bit system with a total of 2 GB memory available.
The problem now seems that this operation does not need much memory from the
heap, so only one gc happens
[GC [DefNew: 139776K->17472K(157248K), 0.1300398 secs] 139776K->29555K(506816K),
0.1301295 secs]
while the memory usage given by the windows task manager for the java process
constantly increases towards 1GB before the process terminates.
If I reduce either Xms or increase NewRatio more gc happen and the memory usage
as shown by the task manager never increases to more than 400 MB. At each gc it
drops to 200 MB or less.
Decreasing Xms or increasing NewRatio is obviously a valid workaround for me,
but nevertheless it is some kind of a memory leak here.
I even tried to find a cause for this (native) memory leak and it seems to be
within org.apache.tools.zip.ZipFile. For me it seems that "new Inflater(true)"
causes this problem (though changing it simply to false will of course not
work), because the problem still occurs if you comment out "extractFile" method
in Expand.java such that nothing is really done except opening up input streams
from the ZipFile for a number of ZipEntry objects.
So maybe this is in its core not a bug of ant, but a bug of the native java
implementation for windows.
--
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