JDK-6841742 : par compact - remove unused/unsupported options
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs15
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2009-05-15
  • Updated: 2011-07-29
  • Resolved: 2011-05-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 Other
7Fixed hs21Fixed
Description
java run with "-XX:-UseParallelOldGCCompacting -XX:+UseParallelOldGC" hangs
with product bits and crashes with fastdebug bits.

The crash is:
------------------------------------------
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/BUILD_AREA/jdk7/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelComp
act.cpp:3355), pid=23758, tid=4254608
#  Error: assert(status == ParMarkBitMap::full,"iteration not complete")
#
# JRE version: 7.0-b59
# Java VM: Java HotSpot(TM) Server VM (16.0-b03-fastdebug mixed mode linux-x86 )
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

---------------  T H R E A D  ---------------

Current thread (0x0a105000):  VMThread [stack: 0x0038e000,0x0040f000] [id=23766]

Stack: [0x0038e000,0x0040f000],  sp=0x0040dac0,  free space=1fe0040db28k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x954945];;  VMError::report(outputStream*)+0x1255
V  [libjvm.so+0x954bf4];;  VMError::report_and_die()+0x194
V  [libjvm.so+0x420f25];;  report_assertion_failure(char const*, int, char const*)+0x65
V  [libjvm.so+0x81baac];;  PSParallelCompact::move_and_update(ParCompactionManager*, PSParallelCompact::Sp
aceId)+0x1ac
V  [libjvm.so+0x814f2f];;  PSParallelCompact::compact_serial(ParCompactionManager*)+0x8f
V  [libjvm.so+0x820519];;  PSParallelCompact::invoke_no_policy(bool)+0x959
V  [libjvm.so+0x82a20b];;  PSScavenge::invoke()+0x19b
V  [libjvm.so+0x7d27e2];;  ParallelScavengeHeap::failed_mem_allocate(unsigned int, bool)+0x122
V  [libjvm.so+0x9565c6];;  VM_ParallelGCFailedAllocation::doit()+0xd6
V  [libjvm.so+0x9711d2];;  VM_Operation::evaluate()+0x82
V  [libjvm.so+0x96f2a2];;  VMThread::evaluate_operation(VM_Operation*)+0xb2
V  [libjvm.so+0x96f760];;  VMThread::loop()+0x210
V  [libjvm.so+0x96fcfd];;  VMThread::run()+0xbd
V  [libjvm.so+0x7b4bc9];;  _ZL10java_startP6Thread+0xf9
C  [libpthread.so.0+0x549b]

VM_Operation (0x002c1e90): ParallelGCFailedAllocation, mode: safepoint, requested by thread 0x0a01f800


------------------------------------------


The test case which could be use to reproduce the problem is:
public class test {

    public final int MAX = 100000000;

    public void check() {
        Object[] oo = new Object[MAX];
        for (int j=0; j < MAX; j++) {
            oo[j] = new Object();
            System.out.println("iteration: " +j);
        }
    }

    public static void main (String[] args) {
        try {
            new test().check();
        } catch (OutOfMemoryError oome) {
            System.out.println("PASSED: OOME thrown");
            System.exit(0);
        } catch (Throwable t) {
            System.out.println("FAILED: unexpected exception:");
            t.printStackTrace();
        }
        System.out.println("PASSED: no exceptions");
    }
}

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/eda9eb483d29
23-04-2011

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/eda9eb483d29
08-04-2011

EVALUATION The option UseParallelOldGCCompacting was never intended for use in production and should not have been made visible in the product; it should have remained a 'develop' option so it was only visible in debug builds. Will change the option so that a warning is printed if it is used; it will be rejected in jdk8. The above also applies to UseParallelDensePrefixUpdate and UseParallelOldGCDensePrefix; they will be handled similarly.
23-03-2011