Bug 976897

Summary: Excessive Heap Consumption in com.sun.imageio.plugins.jpeg.JPEGImageWriter
Product: Red Hat Enterprise Linux 6 Reporter: Ricardo Martinelli de Oliveira <rmartine>
Component: java-1.6.0-openjdkAssignee: jiri vanek <jvanek>
Status: CLOSED ERRATA QA Contact: Lukas Zachar <lzachar>
Severity: high Docs Contact:
Priority: high    
Version: 6.4CC: acavalla, akaiser, aogburn, cww, dbhole, jvanek, neugens, rgorosito
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1025555 (view as bug list) Environment:
Last Closed: 2013-11-21 19:25:05 EST Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 992910    
Description Flags
Test Case
Java 7 compatible test-case
Candidate fix none

Description Ricardo Martinelli de Oliveira 2013-06-21 15:45:59 EDT
Created attachment 763948 [details]
Test Case

Description of problem:
After upgrading to java-1.6.0-openjdk-, 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):

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:
Comment 4 Adam Domurad 2013-07-02 14:32:27 EDT
Created attachment 767894 [details]
Java 7 compatible test-case
Comment 5 Adam Domurad 2013-07-02 14:37:02 EDT
Created attachment 767905 [details]
Candidate fix
Comment 13 Mario Torre 2013-07-31 05:19:51 EDT
Fix has been committed upstream in the 8 branch:


I'll ask the backport on 6 and 7 now.

Comment 15 Mario Torre 2013-08-05 05:46:07 EDT
The fix has been backported to 7, I'm awaiting the backport to 6 now.
Comment 16 Mario Torre 2013-08-26 12:31:39 EDT
I have backported the patch for 6 myself, here is the RFC:


And here the patch:


Waiting for reviewer's approval now.
Comment 17 jiri vanek 2013-08-27 12:03:16 EDT
The fix is in 8 and 7, and is going to 6. I will include the patch to RPMs directly to speed up escalation.
Comment 20 errata-xmlrpc 2013-11-21 19:25:05 EST
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.

Comment 21 Aaron Ogburn 2013-12-12 14:10:17 EST
Note this leak also impacted RHEL 5's open jdk (java-1.6.0-openjdk- but appears to have been fixed as well (java-1.6.0-openjdk-