FULL PRODUCT VERSION :
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)
FULL OPERATING SYSTEM VERSION :
SunOS 5.9 Generic_112233-02 sun4u sparc SUNW,Sun-Fire-880
ADDITIONAL OPERATING SYSTEMS :
Linux 2.4.18-17.8.0 #1 Tue Oct 8 13:51:08 EDT 2002 i686 i686
i386 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
The JVM seems to have a memory leak: when run with the -Xmx
and -Xms options, then the JVM seems to start filling up all
the available memory of the system, and then throws an out
of memory exception.
Even without using the -Xm* options the program grows uncontrolably on Solaris.
The problem presents both on a Red-hat Linux system and on a
Solaris system, even using -Xint or -Xfuture options.
Maybe also other systems are affected by this bug, though I
cannot confirm.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Run the included program
2. the system will swap and eventually you'll have an OutOfMemoryError and
a core dump.
EXPECTED VERSUS ACTUAL BEHAVIOR :
Obviously, I didn't expect it to fill up all my memory :-)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.util.zip.*;
public class Bug {
public static void main( String args[] ) {
while ( true ) {
/* If ANY of these two lines is not commented, the JVM
runs out of memory */
final Deflater deflater = new Deflater( 9, true );
final Inflater inflater = new Inflater( true );
}
}
}
---------- END SOURCE ----------
CUSTOMER WORKAROUND :
One way to avoid the problem is by passing the -Xincgc
option to the JVM
(Review ID: 173339)
======================================================================
###@###.### 10/15/04 20:43 GMT
- duplicates
-
JDK-5072161 OutOfMemoryError while using GZIPOutputStream
- Closed
-
JDK-4899343 CMS collector: prompter finalization?
- Closed
- relates to
-
JDK-6687968 PNGImageReader leaks native memory through an Inflater.
- Resolved
-
JDK-6734186 Native memory leak in java.util.zip.Deflater / thread saftey
- Closed
-
JDK-5105410 ZipFile$ZipFileInputStream doesn't close handle to zipfile
- Resolved
-
JDK-6751792 OutOfMemory error from native leak in PNGEnoder class?
- Closed
-
JDK-5092131 using 1 MB pagesize throws "not enough space" error with 32bit JVM
- Closed
-
JDK-6709675 OutOfMemoryError observed during longevity run of Galactica app with GlassFish V3
- Closed
-
JDK-7010249 Many ParallelClassLoadingTests fail with "Too Many Open Files"
- Closed