JDK-5024647 : OutofMemoryError when -XX:+UseParallelGC is used.
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 5.0
  • Priority: P2
  • Status: Closed
  • Resolution: Not an Issue
  • OS: solaris_9
  • CPU: x86
  • Submitted: 2004-03-31
  • Updated: 2004-05-13
  • Resolved: 2004-04-08
Related Reports
Relates :  
Description
JDK          :   1.5.0-b44
VM           :   server  switch/Mode  :   -Xcomp -XX:+UseParallelGC  (Also failed with -Xmx64m)
Platform[s]  :   Sol 9  x86 was tested.
Test owner   : 
Failing Test : 
 gc/gctests/WeakReference/weak001

TestBase Location: 
==================
    /net/sqesvr-nfs/global/nfs/test_results4/VM/UNIFIED-DTF/DTWS/suites/VM_FULLLOOK/testbase/

Test source location:
=====================
/net/sqesvr-nfs/global/nfs/test_results4/VM/UNIFIED-DTF/DTWS/suites/VM_FULLLOOK/testbase/src/gc/gctests/WeakReference/weak001/*.java

Share source location:
======================
/net/sqesvr-nfs/global/nfs/test_results4/VM/UNIFIED-DTF/DTWS/suites/VM_FULLLOOK/testbase/src/nsk/logging/share/*

tlog  file location:
==================
/java/sqa/st4/VM/tiger/DTWS/results/1.5.0-beta2-b44/ServerVM/SOLX865.9/comp/VM/GC_FULLLOOK-24-WEEKLY-VM-ServerVM-comp-SOLX865.9-en-2004-03-24-18-01-24-0295/ResultDir/weak001

How to reproduce:
====================

   1. cd /net/jano.sfbay/export/disk20/GammaBase/Bugs/{this_bug_number}
   2. myrerun.sh  (your jdk)


Output
======
Number of threads: 200
Run the test for : 1 iteration(s)
A single thread to eat memory via Algorithms.eatMemory()

Iteration: 0
Failure 2 in thread 185 (boolean). java.lang.ref.WeakReference@126e85f was enque
ued the second time in the same queue.
Failure 2 in thread 199 (NonbranchyTree). java.lang.ref.WeakReference@1434234 wa
s enqueued the second time in the same queue.
Failure 2 in thread 195 (boolean). java.lang.ref.WeakReference@1b1aa65 was enque
ued the second time in the same queue.
Failure 2 in thread 194 (char). java.lang.ref.WeakReference@199f91c was enqueued
 the second time in the same queue

...

7 unexpected exception during the test.
java.lang.OutOfMemoryError: Java heap space

8 unexpected exception during the test.
java.lang.OutOfMemoryError: Java heap space

9 unexpected exception during the test.
java.lang.OutOfMemoryError: Java heap space
TEST FAILED.



Specific Machine Info:
=====================
Hostname: schist
Hostid: 4389546
Release: 5.9
Kernel architecture: i86pc
Application architecture: i386
Hardware provider: 
Domain: jlabs.SFBay.Sun.COM
Kernel version: SunOS 5.9 Generic 112234-09 Sep 2003
===========
Status of virtual processor 0 as of: 03/31/2004 14:00:40
  on-line since 03/29/2004 09:26:41.
  The i386 processor operates at 1400 MHz,
        and has an i387 compatible floating point processor.
Status of virtual processor 1 as of: 03/31/2004 14:00:40
  on-line since 03/29/2004 09:26:43.
  The i386 processor operates at 1400 MHz,
        and has an i387 compatible floating point processor.
===========
                         Solaris 9 12/03 s9x_u5wos_08 x86
           Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                           Assembled 19 September 2003
===========
Memory size: 2048 Megabytes

---------

Hostname: corellia
Hostid: 1ff831d6
Release: 5.9
Kernel architecture: i86pc
Application architecture: i386
Hardware provider: 
Domain: jlabs.SFBay.Sun.COM
Kernel version: SunOS 5.9 Generic 112234-09 Oct 2003
===========
Status of virtual processor 0 as of: 03/31/2004 14:07:05
  on-line since 03/12/2004 14:10:08.
  The i386 processor operates at 600 MHz,
        and has an i387 compatible floating point processor.
Status of virtual processor 1 as of: 03/31/2004 14:07:05
  on-line since 03/12/2004 14:10:11.
  The i386 processor operates at 600 MHz,
        and has an i387 compatible floating point processor.
===========
                        Solaris 9 12/03 s9x_u5wos_08a x86
           Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                            Assembled 28 October 2003
===========
Memory size: 256 Megabytes






###@###.### 2004-03-31

Test also failed
=================
gc/gctests/SoftReference/soft001
###@###.### 2004-04-02

Comments
SUGGESTED FIX Any test that uses Algorithms.eatMemory() and tests the ParallelGC should use the -XX:-UseGCTimeLimit flag.
11-06-2004

PUBLIC COMMENTS no comment
10-06-2004

EVALUATION The test indicated in the description does not throw and out-of-memory exception if -XX:-UseGCTimeLimit is used. That is the source of the out-of-memory. ###@###.### 2004-04-05 Algorithms.eatMemory() allocate objects and keeps them alive. If an allocation fails, it reduces the size of the object and tries the allocation again until a minimum size for an object is reached. Then it continues to allocate the minimum size object. All the objects are kept alive so move of the heap is full of live objects and subsequent attemps to allocate an object cause a GC. This causes almost continuous GC that recover very little space. The ParallelGC throws and out-of-memory in this case. Any test that uses Algorithms.eatMemory() and tests the ParallelGC should use the -XX:-UseGCTimeLimit flag. ###@###.### 2004-04-05 The failures Failure 2 in thread 126 (double). java.lang.ref.WeakReference@1ef9f1d was enqueued the second time in the same queue. occurs in 1.4.2. Executions of the test does not always show that failure, but with repeated runs I've reproduced it in b36, b32, b18, and 1.4.2. ###@###.### 2004-04-08 See the suggested fix for the way to run the test. I'm closing this as not a bug.
08-04-2004