Repository navigation
[JENKINS-1283] Remote stdout copier java.lang.OutOfMemoryError: Java heap space #24107
Description
java.exe -jar hudson-core-1.183.jar longNightlyJob bash -c "Fullbuild.sh"
produces OutOfMemory error:
Exception in thread "Fullbuild.sh: stdout copier" java.lang.OutOfMemoryError:
Java heap space
at java.util.Arrays.copyOf(Unknown Source)
at java.io.ByteArrayOutputStream.write(Unknown Source)
at sun.net.www.http.PosterOutputStream.write(Unknown Source)
at hudson.util.EncodingStream.write(EncodingStream.java:22)
at java.io.FilterOutputStream.write(Unknown Source)
at hudson.util.DualOutputStream.write(DualOutputStream.java:29)
at hudson.util.StreamCopyThread.run(StreamCopyThread.java:28)
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Unknown Source)
at java.io.ByteArrayOutputStream.write(Unknown Source)
at sun.net.www.http.PosterOutputStream.write(Unknown Source)
at sun.nio.cs.StreamEncoder.writeBytes(Unknown Source)
at sun.nio.cs.StreamEncoder.implClose(Unknown Source)
at sun.nio.cs.StreamEncoder.close(Unknown Source)
at java.io.OutputStreamWriter.close(Unknown Source)
at hudson.Main.remotePost(Main.java:99)
at hudson.Main.run(Main.java:40)
at hudson.Main.main(Main.java:26)
It would be nice to have the output buffered into a logfile and transfered to
the Master in pieces. Please, cut the "salami" in slices before eating
P.S. Hudson is great! Definitely: architecture, concepts, plug-ins!
Originally reported by hostlows, imported from: Remote stdout copier java.lang.OutOfMemoryError: Java heap space
- status: Closed
- priority: Major
- component(s): other
- resolution: Fixed
- resolved: 2008-02-12T08:17:58+00:00
- votes: 0
- watchers: 0
- imported: 2025-12-08
Raw content of original issue
java.exe -jar hudson-core-1.183.jar longNightlyJob bash -c "Fullbuild.sh" produces OutOfMemory error:
Exception in thread "Fullbuild.sh: stdout copier" java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Unknown Source) at java.io.ByteArrayOutputStream.write(Unknown Source) at sun.net.www.http.PosterOutputStream.write(Unknown Source) at hudson.util.EncodingStream.write(EncodingStream.java:22) at java.io.FilterOutputStream.write(Unknown Source) at hudson.util.DualOutputStream.write(DualOutputStream.java:29) at hudson.util.StreamCopyThread.run(StreamCopyThread.java:28) Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Unknown Source) at java.io.ByteArrayOutputStream.write(Unknown Source) at sun.net.www.http.PosterOutputStream.write(Unknown Source) at sun.nio.cs.StreamEncoder.writeBytes(Unknown Source) at sun.nio.cs.StreamEncoder.implClose(Unknown Source) at sun.nio.cs.StreamEncoder.close(Unknown Source) at java.io.OutputStreamWriter.close(Unknown Source) at hudson.Main.remotePost(Main.java:99) at hudson.Main.run(Main.java:40) at hudson.Main.main(Main.java:26)
It would be nice to have the output buffered into a logfile and transfered to the Master in pieces. Please, cut the "salami" in slices before eating
P.S. Hudson is great! Definitely: architecture, concepts, plug-ins!
- environment:
Platform: All, OS: Windows XP
Activity
jenkins-infra-bot commentedon Feb 12, 2008
Raw content of original comment:
Implemented in 1.184.
jenkins-infra-bot commentedon Feb 14, 2008
Raw content of original comment:
Hello,
looking at:
http://fisheye5.cenqua.com/changelog/hudson/hudson?cs=MAIN:kohsuke:20080212161656
the fix uses deleteOnExit, there was a problem with deleteOnExit of tmp-files in older Java-releases, I
don't know wether this is fixed:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4513817
If I understand it correctly every build will produce a tmp-file, the list will grow rather rapidly.
Regards
Mirko
jenkins-infra-bot commentedon Dec 11, 2009
Raw content of original comment:
The changeset is now available as http://fisheye4.atlassian.com/changelog/hudson?cs=7102
jenkins-infra-bot commentedon Dec 11, 2009
Raw content of original comment:
http://fisheye4.atlassian.com/browse/hudson/trunk/hudson/main/core/src/main/java/hudson/Main.java?r=21479#l113 shows that deleteOnExit is still there, so propably it is still a problem.
Another bugs refering to this with a solution for JAVA 1.6 is:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4872014
which references:
http://www.jroller.com/javabean/entry/solving_an_outofmemoryerror_java_6
jenkins-infra-bot commentedon Dec 11, 2009
Raw content of original comment:
The original bug is gone, however http://issues.jenkins-ci.org/browse/JENKINS-5066 describes that deleteOnExit is evil.