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

assert(k != __null) failed: klass not loaded caused by FillerObject_klass

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 19
    • Fix Version/s: 19
    • Component/s: hotspot
    • Subcomponent:
    • Resolved In Build:
      b22

      Description

      # Reproduce

      java -XX:-UseCompressedClassPointers -XX:TLABSize=2048 -Xshare:dump on Linux/x64, or
      java -XX:-UseCompressedClassPointers -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xshare:dump on Linux/x64, or
      run runtime/cds/appcds/TestEpsilonGCWithCDS.java on Linux/x86_32.

      # Symptom

      ```
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/home/jdk/src/hotspot/share/classfile/vmClasses.hpp:55), pid=128873, tid=128876
      # assert(k != __null) failed: klass not loaded
      #
      # JRE version: (19.0) (fastdebug build )
      # Java VM: OpenJDK Server VM (fastdebug 19-internal-adhoc..jdk, interpreted mode, tiered, epsilon gc, linux-x86)
      # Problematic frame:
      # V [libjvm.so+0x85f60d] CollectedHeap::fill_with_dummy_object(HeapWordImpl**, HeapWordImpl**, bool)+0x42d
      #

      (gdb) bt
      #0 0xf66c5506 in vmClasses::check_klass (k=0x0) at /home/jdk/src/hotspot/share/classfile/vmClasses.hpp:55
      #1 0xf68de7a7 in vmClasses::FillerObject_klass () at /home/jdk/src/hotspot/share/classfile/vmClasses.hpp:87
      #2 0xf695ce9e in CollectedHeap::fill_with_object_impl (start=0xb2e370c8, words=2, zap=true) at /home/jdk/src/hotspot/share/gc/shared/collectedHeap.cpp:470
      #3 0xf695b40b in CollectedHeap::fill_with_object (start=0xb2e370c8, words=2, zap=true) at /home/jdk/src/hotspot/share/gc/shared/collectedHeap.cpp:479
      #4 0xf695bf4e in CollectedHeap::fill_with_object (start=0xb2e370c8, end=0xb2e370d0, zap=true) at /home/jdk/src/hotspot/share/gc/shared/collectedHeap.hpp:289
      #5 0xf695b4fd in CollectedHeap::fill_with_dummy_object (this=0xf602c250, start=0xb2e370c8, end=0xb2e370d0, zap=true)
          at /home/jdk/src/hotspot/share/gc/shared/collectedHeap.cpp:503
      #6 0xf71d5866 in ThreadLocalAllocBuffer::insert_filler (this=0xf6017cdc) at /home/jdk/src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp:122
      #7 0xf71d5949 in ThreadLocalAllocBuffer::retire (this=0xf6017cdc, stats=0x0) at /home/jdk/src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp:145
      #8 0xf71d5995 in ThreadLocalAllocBuffer::retire_before_allocation (this=0xf6017cdc) at /home/jdk/src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp:152
      #9 0xf6ed49c0 in MemAllocator::allocate_inside_tlab_slow (this=0xf62255c0, allocation=...) at /home/jdk/src/hotspot/share/gc/shared/memAllocator.cpp:309
      #10 0xf6ed48ea in MemAllocator::allocate_inside_tlab (this=0xf62255c0, allocation=...) at /home/jdk/src/hotspot/share/gc/shared/memAllocator.cpp:278
      #11 0xf6ed4b47 in MemAllocator::mem_allocate (this=0xf62255c0, allocation=...) at /home/jdk/src/hotspot/share/gc/shared/memAllocator.cpp:350
      #12 0xf6ed4b9e in MemAllocator::allocate (this=0xf62255c0) at /home/jdk/src/hotspot/share/gc/shared/memAllocator.cpp:363
      #13 0xf6c1b199 in CollectedHeap::class_allocate (this=0xf602c250, klass=0xaa41bca8, size=26, __the_thread__=0xf6017c10)
          at /home/jdk/src/hotspot/share/gc/shared/collectedHeap.inline.hpp:46
      #14 0xf6c1aead in InstanceMirrorKlass::allocate_instance (this=0xaa41bca8, k=0xaa429d70, __the_thread__=0xf6017c10) at /home/jdk/src/hotspot/share/oops/instanceMirrorKlass.cpp:55
      #15 0xf6c396b5 in java_lang_Class::create_mirror (k=0xaa429d70, class_loader=..., module=..., protection_domain=..., classData=..., __the_thread__=0xf6017c10)
          at /home/jdk/src/hotspot/share/classfile/javaClasses.cpp:1004
      #16 0xf690c541 in ClassFileParser::fill_instance_klass (this=0xf62257d4, ik=0xaa429d70, changed_by_loadhook=false, cl_inst_info=..., __the_thread__=0xf6017c10)
          at /home/jdk/src/hotspot/share/classfile/classFileParser.cpp:5428
      #17 0xf690ba43 in ClassFileParser::create_instance_klass (this=0xf62257d4, changed_by_loadhook=false, cl_inst_info=..., __the_thread__=0xf6017c10)
          at /home/jdk/src/hotspot/share/classfile/classFileParser.cpp:5257
      #18 0xf6dd7ca9 in KlassFactory::create_from_stream (stream=0xf60226b8, name=0xaae374d0, loader_data=0xf6032fa0, cl_info=..., __the_thread__=0xf6017c10)
          at /home/jdk/src/hotspot/share/classfile/klassFactory.cpp:202
      #19 0xf691d2c4 in ClassLoader::load_class (name=0xaae374d0, search_append_only=false, __the_thread__=0xf6017c10) at /home/jdk/src/hotspot/share/classfile/classLoader.cpp:1235
      #20 0xf7187393 in SystemDictionary::load_instance_class_impl (class_name=0xaae374d0, class_loader=..., __the_thread__=0xf6017c10)
          at /home/jdk/src/hotspot/share/classfile/systemDictionary.cpp:1289
      #21 0xf71876c0 in SystemDictionary::load_instance_class (name_hash=2757074569, name=0xaae374d0, class_loader=..., __the_thread__=0xf6017c10)
          at /home/jdk/src/hotspot/share/classfile/systemDictionary.cpp:1354
      #22 0xf7185c36 in SystemDictionary::resolve_instance_class_or_null (name=0xaae374d0, class_loader=..., protection_domain=..., __the_thread__=0xf6017c10)
          at /home/jdk/src/hotspot/share/classfile/systemDictionary.cpp:723
      #23 0xf7184b42 in SystemDictionary::resolve_instance_class_or_null_helper (class_name=0xaae374d0, class_loader=..., protection_domain=..., __the_thread__=0xf6017c10)
          at /home/jdk/src/hotspot/share/classfile/systemDictionary.cpp:294
      #24 0xf7184a1d in SystemDictionary::resolve_or_null (class_name=0xaae374d0, class_loader=..., protection_domain=..., __the_thread__=0xf6017c10)
          at /home/jdk/src/hotspot/share/classfile/systemDictionary.cpp:277
      #25 0xf7184973 in SystemDictionary::resolve_or_fail (class_name=0xaae374d0, class_loader=..., protection_domain=..., throw_error=true, __the_thread__=0xf6017c10)
          at /home/jdk/src/hotspot/share/classfile/systemDictionary.cpp:263
      #26 0xf67314f1 in SystemDictionary::resolve_or_fail (class_name=0xaae374d0, throw_error=true, __the_thread__=0xf6017c10)
          at /home/jdk/src/hotspot/share/classfile/systemDictionary.hpp:100
      #27 0xf724e3ea in vmClasses::resolve (id=vmClassID::Exception_klass_knum, __the_thread__=0xf6017c10) at /home/jdk/src/hotspot/share/classfile/vmClasses.cpp:99
      #28 0xf724e4ed in vmClasses::resolve_until (limit_id=vmClassID::SoftReference_klass_knum, start_id=@0xf6225fa8: vmClassID::Cloneable_klass_knum, __the_thread__=0xf6017c10)
          at /home/jdk/src/hotspot/share/classfile/vmClasses.cpp:108
      #29 0xf724ef3f in vmClasses::resolve_through (last_id=vmClassID::Reference_klass_knum, start_id=@0xf6225fa8: vmClassID::Cloneable_klass_knum, __the_thread__=0xf6017c10)
          at /home/jdk/src/hotspot/share/classfile/vmClasses.hpp:64
      #30 0xf724e75e in vmClasses::resolve_all (__the_thread__=0xf6017c10) at /home/jdk/src/hotspot/share/classfile/vmClasses.cpp:168
      #31 0xf718845a in SystemDictionary::initialize (__the_thread__=0xf6017c10) at /home/jdk/src/hotspot/share/classfile/systemDictionary.cpp:1655
      #32 0xf71f9814 in Universe::genesis (__the_thread__=0xf6017c10) at /home/jdk/src/hotspot/share/memory/universe.cpp:346
      #33 0xf71fb851 in universe2_init () at /home/jdk/src/hotspot/share/memory/universe.cpp:966
      #34 0xf6c07275 in init_globals () at /home/jdk/src/hotspot/share/runtime/init.cpp:132
      #35 0xf71cc844 in Threads::create_vm (args=0xf622626c, canTryAgain=0xf62261d3) at /home/jdk/src/hotspot/share/runtime/thread.cpp:2756
      ```

      The reason is that we load FillerObject_klass too late.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jiefu Jie Fu
              Reporter:
              jiefu Jie Fu
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: