ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 49326] New: OutOfMemoryError: Map failed
Date Fri, 21 May 2010 12:42:51 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=49326

           Summary: OutOfMemoryError: Map failed
           Product: Ant
           Version: 1.8.1
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: notifications@ant.apache.org
        ReportedBy: mbm@ptc.com


Revision 922179 of ResourceUtils.java, to resolve
https://issues.apache.org/bugzilla/show_bug.cgi?id=48894, is causing copies of
large files to fail when max heap is set to a “high” value.  I got the error
below with –Xmx800M.  I lowered it to 750 and it worked.  The file being copied
is 840M.  A file of 670M failed with –Xmx900M, but succeeded with 800.

It runs for 2 seconds and fails as soon as this task is called.  Java VisualVM
shows the process uses less than 20M.  It’s using Java 1.6 on 32-bit Windows
XP.

   <copy file="my.zip” tofile="my.01.zip" />

BUILD FAILED
Failed to copy my.zip to my.01.zip due to Map failed
        at org.apache.tools.ant.taskdefs.Copy.doFileOperations(Copy.java:853)
        at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:523)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor45.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:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
        at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
        at org.apache.tools.ant.Main.runBuild(Main.java:801)
        at org.apache.tools.ant.Main.startAnt(Main.java:218)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.io.IOException: Map failed
        at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:761)
        at
sun.nio.ch.FileChannelImpl.transferToTrustedChannel(FileChannelImpl.java:450)
        at sun.nio.ch.FileChannelImpl.transferTo(FileChannelImpl.java:523)
        at
org.apache.tools.ant.util.ResourceUtils.copyResource(ResourceUtils.java:475)
        at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:519)
        at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:481)
        at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:310)
        at org.apache.tools.ant.taskdefs.Copy.doFileOperations(Copy.java:841)
        ... 17 more
Caused by: java.lang.OutOfMemoryError: Map failed
        at sun.nio.ch.FileChannelImpl.map0(Native Method)
        at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:758)
        ... 24 more

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
Mime
View raw message