Red Hat Bugzilla – Bug 976897
Excessive Heap Consumption in com.sun.imageio.plugins.jpeg.JPEGImageWriter
Last modified: 2013-12-12 14:10:17 EST
Created attachment 763948 [details] Test Case Description of problem: After upgrading to java-1.6.0-openjdk-1.6.0.0-1.61.1.11.11.el6_4.x86_64, Java applications are consuming more memory (specifically int[] objects allocated by com.sun.imageio.plugins.jpeg.JPEGImageWriter), without releasing it. Version-Release number of selected component (if applicable): java-1.6.0-openjdk-1.6.0.0-1.61.1.11.11.el6_4.x86_64 How reproducible: Easily reprocible with a test case. Steps to Reproduce: 1. Compile and run Prueba.java (attached in bz) 2. Use the following VM parameter: -Xmx64m 3. Use the following Program Parameter: 1000 Actual results: It throws a OOME Heap Size Exception Expected results: Allocate objects and print memory information Additional info:
Created attachment 767894 [details] Java 7 compatible test-case
Created attachment 767905 [details] Candidate fix
pushed: http://pkgs.devel.redhat.com/cgit/rpms/java-1.6.0-openjdk/commit/?h=rhel-6.5&id=2f3a1268c31d11de89c14a48577f78b133acab89 and building: https://brewweb.devel.redhat.com/taskinfo?taskID=6108579
Fix has been committed upstream in the 8 branch: http://hg.openjdk.java.net/jdk8/2d/jdk/rev/7f0e569c5a66 I'll ask the backport on 6 and 7 now. Cheers, Mario
The fix has been backported to 7, I'm awaiting the backport to 6 now.
I have backported the patch for 6 myself, here is the RFC: http://mail.openjdk.java.net/pipermail/jdk6-dev/2013-August/003033.html And here the patch: http://cr.openjdk.java.net/~neugens/8020983/webrev/ Waiting for reviewer's approval now.
The fix is in 8 and 7, and is going to 6. I will include the patch to RPMs directly to speed up escalation.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-1741.html
Note this leak also impacted RHEL 5's open jdk (java-1.6.0-openjdk-1.6.0.0-1.41.1.11.11.90.el5_9) but appears to have been fixed as well (java-1.6.0-openjdk-1.6.0.0-1.42.1.11.14.el5_10)