Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-23149

ArtifactArchiver throws java.lang.OutOfMemoryError: Map failed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Critical Critical
    • core
    • None

      During builds with the "Archive Artifacts" step the following occurs:

      Archiving artifacts
      ERROR: Publisher hudson.tasks.ArtifactArchiver aborted due to exception
      Failed to copy /opt/home/xxxxxx/.hudson/jobs/SERVICE_Create_new_RELEASE/workspace/ssbuilder/output/xxxx_branches_RB-2014-IT-10/xxxx/branches/RB-2014-IT-10/xxx-webapp/target/xxxx-TCT-SC1-LIVE-5.2.25.1.0-2930.noarch.rpm to /opt/home/xxx/.hudson/jobs/SERVICE_Create_new_RELEASE/builds/2014-05-20_09-19-03/archive/ssbuilder/output/xxxxx_branches_RB-2014-IT-10/portal/branches/RB-2014-IT-10/xxxx-webapp/target/xxxx-TCT-SC1-LIVE-5.2.25.1.0-2930.noarch.rpm due to Map failed
      	at org.apache.tools.ant.taskdefs.Copy.doFileOperations(Copy.java:914)
      	at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:567)
      	at hudson.Util.copyFile(Util.java:922)
      	at hudson.FilePath$38$1.visit(FilePath.java:1943)
      	at hudson.util.DirScanner.scanSingle(DirScanner.java:49)
      	at hudson.FilePath$ExplicitlySpecifiedDirScanner.scan(FilePath.java:2547)
      	at hudson.FilePath$38.invoke(FilePath.java:1938)
      	at hudson.FilePath$38.invoke(FilePath.java:1931)
      	at hudson.FilePath.act(FilePath.java:920)
      	at hudson.FilePath.act(FilePath.java:893)
      	at hudson.FilePath.copyRecursiveTo(FilePath.java:1931)
      	at jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:57)
      	at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:140)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:714)
      	at hudson.model.Build$BuildExecution.post2(Build.java:182)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:663)
      	at hudson.model.Run.execute(Run.java:1725)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:231)
      Caused by: java.io.IOException: Map failed
      	at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:849)
      	at sun.nio.ch.FileChannelImpl.transferFromFileChannel(FileChannelImpl.java:578)
      	at sun.nio.ch.FileChannelImpl.transferFrom(FileChannelImpl.java:652)
      	at org.apache.tools.ant.util.ResourceUtils.copyResource(ResourceUtils.java:532)
      	at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:559)
      	at org.apache.tools.ant.taskdefs.Copy.doFileOperations(Copy.java:899)
      	... 21 more
      Caused by: java.lang.OutOfMemoryError: Map failed
      	at sun.nio.ch.FileChannelImpl.map0(Native Method)
      	at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:846)
      	... 26 more
      Description set: 
      Releasing all remaining resources of the job
      Finished: FAILURE
      

      This does not happen on every build, and there doesn't appear to be a correlation between the size and/or number of artifacts being archived, e.g. one job is archiving 7 items with a total of ~300MB and another with 5 items each no bigger than 25MB.

      I know this happened with earlier versions of Ant so I replaced the ant-1.8.3.jar under WEB-INF with 1.8.4 and this reduced the frequency of the problem but it could just be misleading as I don't have stats to prove this, its just a gut feeling.

      Name  ↓	Value   
      awt.toolkit	sun.awt.X11.XToolkit
      com.sun.management.jmxremote.authenticate	false
      com.sun.management.jmxremote.port	9990
      com.sun.management.jmxremote.ssl	false
      executable-war	/opt/work/hudson/bin/hudson.war
      file.encoding	UTF-8
      file.encoding.pkg	sun.io
      file.separator	/
      guice.disable.misplaced.annotation.check	true
      hudson.diyChunking	true
      java.awt.graphicsenv	sun.awt.X11GraphicsEnvironment
      java.awt.headless	true
      java.awt.printerjob	sun.print.PSPrinterJob
      java.class.path	hudson.war
      java.class.version	51.0
      java.endorsed.dirs	/opt/java/jdk1.7.0_25/jre/lib/endorsed
      java.ext.dirs	/opt/java/jdk1.7.0_25/jre/lib/ext:/usr/java/packages/lib/ext
      java.home	/opt/java/jdk1.7.0_25/jre
      java.io.tmpdir	/tmp
      java.library.path	/usr/java/packages/lib/i386:/lib:/usr/lib
      java.rmi.server.randomIDs	true
      java.runtime.name	Java(TM) SE Runtime Environment
      java.runtime.version	1.7.0_25-b15
      java.specification.name	Java Platform API Specification
      java.specification.vendor	Oracle Corporation
      java.specification.version	1.7
      java.vendor	Oracle Corporation
      java.vendor.url	http://java.oracle.com/
      java.vendor.url.bug	http://bugreport.sun.com/bugreport/
      java.version	1.7.0_25
      java.vm.info	mixed mode
      java.vm.name	Java HotSpot(TM) Server VM
      java.vm.specification.name	Java Virtual Machine Specification
      java.vm.specification.vendor	Oracle Corporation
      java.vm.specification.version	1.7
      java.vm.vendor	Oracle Corporation
      java.vm.version	23.25-b01
      jna.platform.library.path	/usr/lib:/lib
      line.separator	
      mail.smtp.sendpartial	true
      mail.smtps.sendpartial	true
      os.arch	i386
      os.name	Linux
      os.version	2.6.18-128.1.6.el5PAE
      path.separator	:
      securerandom.source	file:/dev/./urandom
      sun.arch.data.model	32
      sun.boot.class.path	/opt/java/jdk1.7.0_25/jre/lib/resources.jar:/opt/java/jdk1.7.0_25/jre/lib/rt.jar:/opt/java/jdk1.7.0_25/jre/lib/sunrsasign.jar:/opt/java/jdk1.7.0_25/jre/lib/jsse.jar:/opt/java/jdk1.7.0_25/jre/lib/jce.jar:/opt/java/jdk1.7.0_25/jre/lib/charsets.jar:/opt/java/jdk1.7.0_25/jre/lib/jfr.jar:/opt/java/jdk1.7.0_25/jre/classes
      sun.boot.library.path	/opt/java/jdk1.7.0_25/jre/lib/i386
      sun.cpu.endian	little
      sun.cpu.isalist	
      sun.font.fontmanager	sun.awt.X11FontManager
      sun.io.unicode.encoding	UnicodeLittle
      sun.java.command	hudson.war --httpPort=9999
      sun.java.launcher	SUN_STANDARD
      sun.jnu.encoding	UTF-8
      sun.management.compiler	HotSpot Tiered Compilers
      sun.os.patch.level	unknown
      svnkit.http.methods	Digest,Basic,NTLM,Negotiate
      svnkit.ssh2.persistent	false
      user.country	US
      user.dir	/opt/work/hudson/bin
      user.home	/opt/home/integration
      user.language	en
      user.name	integration
      user.timezone	UTC
      Environment Variables
      Name  ↓	Value   
      _	/usr/bin/nohup
      __array_start	0
      _first	0
      _second	1
      CISCO_OS	centos5-32
      EDITOR	vim
      escape_flag	1
      G_BROKEN_FILENAMES	1
      GEM_HOME	/opt/home/integration/.rvm/gems/ruby-1.9.3-p392
      GEM_PATH	/opt/home/integration/.rvm/gems/ruby-1.9.3-p392:/opt/home/integration/.rvm/gems/ruby-1.9.3-p392@global
      GROOVY_HOME	/opt/groovy
      HISTSIZE	1000
      HISTTIMEFORMAT	%F %T
      HOME	/opt/home/integration
      HOSTNAME	xxxxxxx
      INPUTRC	/etc/inputrc
      IRBRC	/opt/home/integration/.rvm/rubies/ruby-1.9.3-p392/.irbrc
      JAVA_HOME	/usr/java/jdk1.7.0_25
      LANG	en_US.UTF-8
      LESSOPEN	|/usr/bin/lesspipe.sh %s
      LOGNAME	xxxxxxxxxxx
      LS_COLORS	no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:
      M2_HOME	/opt/maven
      MAIL	/var/spool/mail/integration
      MAVEN_OPTS	-Xmx512m
      MY_RUBY_HOME	/opt/home/xxxxxxxx/.rvm/rubies/ruby-1.9.3-p392
      NLSPATH	/usr/dt/lib/nls/msg/%L/%N.cat
      PATH	/opt/home/xxxxxxxx/.rvm/gems/ruby-1.9.3-p392/bin:/opt/home/xxxxxxxx/.rvm/gems/ruby-1.9.3-p392@global/bin:/opt/home/xxxxxxxx/.rvm/rubies/ruby-1.9.3-p392/bin:/opt/home/xxxxxxxx/.rvm/bin:/opt/python26/bin:/opt/maven/bin:/usr/kerberos/bin:/usr/java/jdk1.7.0_25/bin:/opt/groovy/bin:/usr/local/bin:/bin:/usr/bin:/opt/home/xxxxxxxx/bin
      PWD	/opt/work/hudson/bin
      RUBY_VERSION	ruby-1.9.3-p392
      rvm_bin_path	/opt/home/xxxxxxxx/.rvm/bin
      rvm_debug_clr	
      rvm_error_clr	
      rvm_notify_clr	
      rvm_path	/opt/home/xxxxxxxx/.rvm
      rvm_prefix	/opt/home/xxxxxxxx
      rvm_reset_clr	
      rvm_version	1.18.19 ()
      rvm_warn_clr	
      SHELL	/bin/bash
      SHLVL	2
      SOAPUI_HOME	/opt/soapui
      SSH_ASKPASS	/usr/libexec/openssh/gnome-ssh-askpass
      TERM	xterm-color
      USER	xxxxxxxx
      XFILESEARCHPATH	/usr/dt/app-defaults/%L/Dt
      Plugins
      Name  ↓	Version   	Enabled   	Pinned   
      analysis-core	1.56	true	false
      ant	1.2	true	true
      antisamy-markup-formatter	1.1	true	true
      anything-goes-formatter	1.0	true	false
      audit-trail	1.8	true	false
      blame-upstream-commiters	1.2	true	false
      build-flow-plugin	0.10	true	false
      build-pipeline-plugin	1.4.2	true	false
      build-timeout	1.13	true	false
      buildgraph-view	1.1.1	true	false
      chucknorris	0.5	true	false
      ci-game	1.19	true	false
      cobertura	1.9.4	true	false
      conditional-buildstep	1.3.3	true	false
      copyartifact	1.30	true	false
      credentials	1.10	true	true
      cvs	2.11	true	true
      dashboard-view	2.9.2	true	false
      depgraph-view	0.11	true	false
      description-setter	1.8	true	false
      disk-usage	0.23	true	false
      dropdown-viewstabbar-plugin	1.6	true	false
      email-ext	2.37.2.2	true	false
      emma	1.29	true	false
      emotional-hudson	1.3	false	false
      envinject	1.89	true	false
      extended-choice-parameter	0.30	true	false
      external-monitor-job	1.2	true	true
      findbugs	4.56	true	false
      gerrit-trigger	2.11.1	true	false
      git	2.2.1	true	false
      git-client	1.8.0	true	false
      global-build-stats	1.3	true	false
      greenballs	1.14	true	false
      groovy	1.16	true	false
      jacoco	1.0.14	true	false
      javadoc	1.1	true	true
      jenkins-multijob-plugin	1.13	true	false
      jobConfigHistory	2.6	true	false
      jquery	1.7.2-1	true	false
      jquery-ui	1.0.2	true	false
      ldap	1.8	true	true
      locks-and-latches	0.6	true	false
      mailer	1.8	true	true
      matrix-auth	1.1	true	false
      maven-plugin	2.2	true	true
      multiple-scms	0.3	true	false
      nodejs	0.2.1	true	false
      nodelabelparameter	1.5.1	true	false
      pam-auth	1.1	true	true
      parameterized-trigger	2.24	true	false
      plot	1.7	true	false
      pmd	3.38	true	false
      port-allocator	1.8	true	false
      publish-over-ssh	1.11	true	false
      radiatorviewplugin	1.18	true	false
      rake	1.8.0	true	false
      regexemail	0.3	true	false
      release	1.10	true	false
      ruby	1.2	true	false
      ruby-runtime	0.12	true	false
      run-condition	1.0	true	false
      rvm	0.4	true	false
      scm-api	0.2	true	false
      setenv	1.1	false	false
      sidebar-link	1.6	true	false
      sonar	2.1	true	false
      ssh-agent	1.4.1	true	false
      ssh-credentials	1.6.1	true	true
      ssh-slaves	1.6	true	true
      subversion	2.2	true	true
      synchronizedbuildsteps	0.0.2	true	false
      text-finder	1.10	true	false
      token-macro	1.10	true	false
      translation	1.11	true	true
      windows-slaves	1.0	true	false
      ws-cleanup	0.20	true	false
      

            Unassigned Unassigned
            jm_cisco James McGivern
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: