United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7131791 G1: Asserts in nightly testing due to 6976060
JDK-7131791 : G1: Asserts in nightly testing due to 6976060

Details
Type:
Bug
Submit Date:
2012-01-20
Status:
Closed
Updated Date:
2013-10-23
Project Name:
JDK
Resolved Date:
2012-03-24
Component:
hotspot
OS:
generic
Sub-Component:
gc
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
hs23
Fixed Versions:
hs23 (b12)

Related Reports
Backport:
Backport:

Sub Tasks

Description
The nightlies of 2012-01-18 contains 556 new failures related to this fix:

changeset:   2977:9509c20bba28
user:        brutisso
date:        Mon Jan 16 22:10:05 2012 +0100
summary:     6976060: G1: humongous object allocations should initiate marking cycles when necessary

It is a pure G1 issue. The problem is in G1CollectedHeap::attempt_allocation_humongous. Here is the problematic code:

   if (result != NULL) {
      if (g1_policy()->need_to_start_conc_mark("concurrent humongous allocation")) {
        // We need to release the Heap_lock before we try to call collect
        collect(GCCause::_g1_humongous_allocation);
      }
      return result;
    }

The idea is that the call to collect() should start a concurrent marking cycle. This is what it does, but the problem is that it is blocking. Which means that what we have in "result" is a naked oop.

This crashes all over the place. There are so many different tests that I think it will be difficult to list them here. The most common stack traces look like:

#  assert(obj->is_oop_or_null(true )) failed: Error

Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x76c2f1]  VMError::report_and_die()+0x1a1;;  VMError::report_and_die()+0x1a1
V  [libjvm.so+0x306d88]  report_vm_error(char const*, int, char const*, char const*)+0x68;;  report_vm_error(char const*, int, char const*, char const*)+0x68
V  [libjvm.so+0x76c12a]  VMError::report(outputStream*)+0x164a;;  VMError::report(outputStream*)+0x164a
V  [libjvm.so+0x76c2f1]  VMError::report_and_die()+0x1a1;;  VMError::report_and_die()+0x1a1
V  [libjvm.so+0x306d88]  report_vm_error(char const*, int, char const*, char const*)+0x68;;  report_vm_error(char const*, int, char const*, char const*)+0x68
V  [libjvm.so+0x3d9bd6]  void G1CMOopClosure::do_oop_nv<oopDesc*>(oopDesc**)+0x176;;  void G1CMOopClosure::do_oop_nv<oopDesc*>(oopDesc**)+0x176
V  [libjvm.so+0x5f30f4]  objArrayKlass::oop_oop_iterate_nv(oopDesc*, G1CMOopClosure*)+0x74;;  objArrayKlass::oop_oop_iterate_nv(oopDesc*, G1CMOopClosure*)+0x74
V  [libjvm.so+0x2bea1b]  CMTask::scan_object(oopDesc*)+0x4b;;  CMTask::scan_object(oopDesc*)+0x4b
V  [libjvm.so+0x2c9acb]  CMBitMapClosure::do_bit(unsigned int)+0xab;;  CMBitMapClosure::do_bit(unsigned int)+0xab
V  [libjvm.so+0x2c225d]  CMTask::do_marking_step(double, bool, bool)+0x9dd;;  CMTask::do_marking_step(double, bool, bool)+0x9dd
V  [libjvm.so+0x2ca328]  CMConcurrentMarkingTask::work(unsigned int)+0x1e8;;  CMConcurrentMarkingTask::work(unsigned int)+0x1e8
V  [libjvm.so+0x7a060b]  GangWorker::loop()+0x30b;;  GangWorker::loop()+0x30b
V  [libjvm.so+0x79e7d8]  GangWorker::run()+0x18;;  GangWorker::run()+0x18
V  [libjvm.so+0x61a5b1]  java_start(Thread*)+0x111;;  _ZL10java_startP6Thread+0x111
C  [libpthread.so.0+0x5832]  abort@@GLIBC_2.0+0x5832


and

#  assert(Universe::heap()->is_in_closed_subset(o)) failed: should be in closed

Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x76c2f1]  VMError::report_and_die()+0x1a1;;  VMError::report_and_die()+0x1a1
V  [libjvm.so+0x306d88]  report_vm_error(char const*, int, char const*, char const*)+0x68;;  report_vm_error(char const*, int, char const*, char const*)+0x68
V  [libjvm.so+0x76c12a]  VMError::report(outputStream*)+0x164a;;  VMError::report(outputStream*)+0x164a
V  [libjvm.so+0x76c2f1]  VMError::report_and_die()+0x1a1;;  VMError::report_and_die()+0x1a1
V  [libjvm.so+0x306d88]  report_vm_error(char const*, int, char const*, char const*)+0x68;;  report_vm_error(char const*, int, char const*, char const*)+0x68
V  [libjvm.so+0x3d83f1]  void assert_is_in_closed_subset<oopDesc*>(oopDesc**)+0x41;;  void assert_is_in_closed_subset<oopDesc*>(oopDesc**)+0x41
V  [libjvm.so+0x3c8e09]  instanceKlass::oop_oop_iterate_nv(oopDesc*, FilterOutOfRegionClosure*)+0x79;;  instanceKlass::oop_oop_iterate_nv(oopDesc*, FilterOutOfRegionClosure*)+0x79
V  [libjvm.so+0x3bafa0]  HeapRegion::oops_on_card_seq_iterate_careful(MemRegion, FilterOutOfRegionClosure*, bool, signed char*)+0x470;;  HeapRegion::oops_on_card_seq_iterate_careful(MemRegion, FilterOutOfRegionClosure*, bool, signed char*)+0x470
V  [libjvm.so+0x388daa]  G1RemSet::concurrentRefineOneCard_impl(signed char*, int, bool)+0x22a;;  G1RemSet::concurrentRefineOneCard_impl(signed char*, int, bool)+0x22a
V  [libjvm.so+0x3891f4]  G1RemSet::concurrentRefineOneCard(signed char*, int, bool)+0xa4;;  G1RemSet::concurrentRefineOneCard(signed char*, int, bool)+0xa4
V  [libjvm.so+0x389689]  RefineRecordRefsIntoCSCardTableEntryClosure::do_card_ptr(signed char*, int)+0x59;;  RefineRecordRefsIntoCSCardTableEntryClosure::do_card_ptr(signed char*, int)+0x59
V  [libjvm.so+0x32d9d5]  DirtyCardQueueSet::apply_closure_to_completed_buffer(CardTableEntryClosure*, int, int, bool)+0xb5;;  DirtyCardQueueSet::apply_closure_to_completed_buffer(CardTableEntryClosure*, int, int, bool)+0xb5
V  [libjvm.so+0x35d20c]  G1CollectedHeap::iterate_dirty_card_closure(CardTableEntryClosure*, DirtyCardQueue*, bool, int)+0x4c;;  G1CollectedHeap::iterate_dirty_card_closure(CardTableEntryClosure*, DirtyCardQueue*, bool, int)+0x4c
V  [libjvm.so+0x387db1]  G1RemSet::updateRS(DirtyCardQueue*, int)+0x41;;  G1RemSet::updateRS(DirtyCardQueue*, int)+0x41
V  [libjvm.so+0x3882fc]  G1RemSet::oops_into_collection_set_do(OopsInHeapRegionClosure*, int)+0x25c;;  G1RemSet::oops_into_collection_set_do(OopsInHeapRegionClosure*, int)+0x25c
V  [libjvm.so+0x35f20c]  G1CollectedHeap::g1_process_strong_roots(bool, SharedHeap::ScanningOption, OopClosure*, OopsInHeapRegionClosure*, OopsInGenClosure*, int)+0x2ac;;  G1CollectedHeap::g1_process_strong_roots(bool, SharedHeap::ScanningOption, OopClosure*, OopsInHeapRegionClosure*, OopsInGenClosure*, int)+0x2ac
V  [libjvm.so+0x37798a]  G1ParTask::work(unsigned int)+0x96a;;  G1ParTask::work(unsigned int)+0x96a
V  [libjvm.so+0x7a060b]  GangWorker::loop()+0x30b;;  GangWorker::loop()+0x30b
V  [libjvm.so+0x79e7d8]  GangWorker::run()+0x18;;  GangWorker::run()+0x18
V  [libjvm.so+0x61a5b1]  java_start(Thread*)+0x111;;  _ZL10java_startP6Thread+0x111
C  [libpthread.so.0+0x5832]  abort@@GLIBC_2.0+0x5832

                                    

Comments
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/rev/57025542827f
                                     
2012-01-20
EVALUATION

http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/57025542827f
                                     
2012-03-22



Hardware and Software, Engineered to Work Together