Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8285979

G1: G1SegmentedArraySegment::header_size() is incorrect since JDK-8283368

XMLWordPrintable

    • gc
    • b21

      The following crashes were observed while running gc/g1.
      ```
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/jdk/src/hotspot/share/gc/g1/g1SegmentedArray.cpp:218), pid=68376, tid=68415
      # guarantee(is_aligned(slot, _alloc_options->slot_alignment())) failed: result 0x000000000000002b not aligned at 8
      #
      # JRE version: OpenJDK Runtime Environment (19.0) (slowdebug build 19-internal-adhoc.jvm.jdk-501)
      # Java VM: OpenJDK 64-Bit Client VM (slowdebug 19-internal-adhoc.jvm.jdk-501, interpreted mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0x4ee392] G1SegmentedArray::allocate()+0x198
      #


      Current thread (0x00007f2704001b70): WorkerThread "G1 Conc#2" [stack: 0x00007f26fd15e000,0x00007f26fd25e000] [id=68415]

      Stack: [0x00007f26fd15e000,0x00007f26fd25e000], sp=0x00007f26fd25c4f0, free space=1017k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x4ee392] G1SegmentedArray::allocate()+0x198
      V [libjvm.so+0x429362] FreeListAllocator::allocate()+0xe2
      V [libjvm.so+0x441726] G1CardSetAllocator::allocate()+0x1c
      V [libjvm.so+0x4417e3] G1CardSetMemoryManager::allocate(unsigned int)+0x75
      V [libjvm.so+0x43e800] G1CardSet::allocate_mem_object(unsigned long)+0x36
      V [libjvm.so+0x43f00a] G1CardSet::coarsen_container(void* volatile*, void*, unsigned int, bool)+0xa0
      V [libjvm.so+0x43ecbf] G1CardSet::add_to_howl(void*, unsigned int, unsigned int, bool)+0xf7
      V [libjvm.so+0x43f623] G1CardSet::add_to_container(void* volatile*, void*, unsigned int, unsigned int, bool)+0x15d
      V [libjvm.so+0x43f725] G1CardSet::add_card(unsigned int, unsigned int, bool)+0x81
      V [libjvm.so+0x441f36] G1TransferCard::operator()(unsigned int)+0x2e
      V [libjvm.so+0x443709] void G1CardSetArray::iterate<G1TransferCard>(G1TransferCard&)+0x57
      V [libjvm.so+0x4427d5] void G1CardSet::iterate_cards_during_transfer<G1TransferCard>(void*, G1TransferCard&)+0xdb
      V [libjvm.so+0x43f265] G1CardSet::transfer_cards(G1CardSetHashTableValue*, void*, unsigned int)+0x9d
      V [libjvm.so+0x43f814] G1CardSet::add_card(unsigned int, unsigned int, bool)+0x170
      V [libjvm.so+0x4d01d1] HeapRegionRemSet::add_reference(void*, unsigned int)+0xcf
      V [libjvm.so+0x4d5d0e] void G1RebuildRemSetClosure::do_oop_work<narrowOop>(narrowOop*)+0xa6
      V [libjvm.so+0x4cfcaf] G1RebuildRemSetClosure::do_oop(narrowOop*)+0x23
      V [libjvm.so+0x4cef4e] EnableIf<!IsSame<G1RebuildRemSetClosure, OopClosure>::value, void>::type call_do_oop<narrowOop, G1RebuildRemSetClosure, OopClosure, G1RebuildRemSetClosure>(void (G1RebuildRemSetClosure::*)(narrowOop*), void (OopClosure::*)(narrowOop*), G1RebuildRemSetClosure*, narrowOop*)+0x42
      V [libjvm.so+0x4e3555] void Devirtualizer::do_oop<G1RebuildRemSetClosure, narrowOop>(G1RebuildRemSetClosure*, narrowOop*)+0x47
      V [libjvm.so+0x4d961a] void OopOopIterateDispatch<G1RebuildRemSetClosure>::Table::oop_oop_iterate<InstanceKlass, narrowOop>(G1RebuildRemSetClosure*, oopDesc*, Klass*)+0x12d
      V [libjvm.so+0x4d70a0] void OopIteratorClosureDispatch::oop_oop_iterate<G1RebuildRemSetClosure>(G1RebuildRemSetClosure*, oopDesc*, Klass*)+0x38
      V [libjvm.so+0x4d6a44] void oopDesc::oop_iterate<G1RebuildRemSetClosure>(G1RebuildRemSetClosure*)+0x32
      V [libjvm.so+0x4d459f] G1RebuildRemSetTask::G1RebuildRemSetHeapRegionClosure::scan_for_references(oopDesc*, MemRegion)+0x9f
      V [libjvm.so+0x4d4e68] G1RebuildRemSetTask::G1RebuildRemSetHeapRegionClosure::rebuild_rem_set_in_region(G1CMBitMap const*, HeapWordImpl**, HeapWordImpl**, HeapRegion*, MemRegion)+0x23a
      V [libjvm.so+0x4d51e0] G1RebuildRemSetTask::G1RebuildRemSetHeapRegionClosure::do_heap_region(HeapRegion*)+0x2ae
      V [libjvm.so+0x55f1b3] HeapRegionManager::par_iterate(HeapRegionClosure*, HeapRegionClaimer*, unsigned int) const+0x107
      V [libjvm.so+0x457139] G1CollectedHeap::heap_region_par_iterate_from_worker_offset(HeapRegionClosure*, HeapRegionClaimer*, unsigned int) const+0x49
      V [libjvm.so+0x4d5550] G1RebuildRemSetTask::work(unsigned int)+0x6e
      V [libjvm.so+0xc70916] WorkerTaskDispatcher::worker_run_task()+0x84
      V [libjvm.so+0xc70de0] WorkerThread::run()+0x30
      V [libjvm.so+0xbacd18] Thread::call_run()+0x180
      V [libjvm.so+0x9aa23d] thread_native_entry(Thread*)+0x18f
      ```

      Reproduce:
       - configure --with-jvm-features=-compiler2 ...
       - run gc/g1

            jiefu Jie Fu
            jiefu Jie Fu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: