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

CDS custom loader support causes asserts during class unloading

XMLWordPrintable

      CDS supports loading archived classes into custom class loaders. (These classes are called "unregistered classes" in CDS terminology.)

      In some cases, an "unregistered class" may fail to load but gets added to the ClassLoaderData of the custom class loader. This will cause an assert in debug builds:

      # assert(ik->is_loaded()) failed: class should be loaded 0x000000000b518eb8
      V [libjvm.so+0xfa6bd5] InstanceKlass::unload_class(InstanceKlass*)+0x555 (instanceKlass.cpp:2870)
      V [libjvm.so+0xa790e3] ClassLoaderData::classes_do(void (*)(InstanceKlass*))+0xc3 (classLoaderData.cpp:441)
      V [libjvm.so+0xa7d61e] ClassLoaderData::unload()+0x12e (classLoaderData.cpp:628)
      V [libjvm.so+0xa908b4] ClassUnloadingContext::register_unloading_class_loader_data(ClassLoaderData*)+0x24 (classUnloadingContext.cpp:70)
      V [libjvm.so+0xa863b4] ClassLoaderDataGraph::do_unloading()+0x84 (classLoaderDataGraph.cpp:423)
      V [libjvm.so+0x198d832] SystemDictionary::do_unloading(GCTimer*)+0x172 (systemDictionary.cpp:1562)
      V [libjvm.so+0xd9a80a] G1CollectedHeap::unload_classes_and_code(char const*, BoolObjectClosure*, GCTimer*)+0x1ba (g1CollectedHeap.cpp:2685)
      V [libjvm.so+0xdee362] G1FullCollector::phase1_mark_live_objects()+0x6c2 (g1FullCollector.cpp:323)
      V [libjvm.so+0xdee49c] G1FullCollector::collect()+0x1c (g1FullCollector.cpp:208)
      V [libjvm.so+0xd94fd7] G1CollectedHeap::do_full_collection(bool, bool, unsigned long)+0x227 (g1CollectedHeap.cpp:895)
      V [libjvm.so+0xeb7d9e] VM_G1CollectFull::doit()+0x4e (g1VMOperations.cpp:55)
      V [libjvm.so+0x1ae3617] VM_Operation::evaluate()+0xf7 (vmOperations.cpp:74)
      V [libjvm.so+0x1aff37b] VMThread::evaluate_operation(VM_Operation*)+0x6fb (vmThread.cpp:284)
      V [libjvm.so+0x1affc13] VMThread::inner_execute(VM_Operation*)+0x393 (vmThread.cpp:421)
      V [libjvm.so+0x1affdd4] VMThread::loop()+0x84 (vmThread.cpp:487)
      V [libjvm.so+0x1affee2] VMThread::run()+0x92 (vmThread.cpp:177)
      V [libjvm.so+0x19ee08a] Thread::call_run()+0xba (thread.cpp:243)
      V [libjvm.so+0x1692583] thread_native_entry(Thread*)+0x123 (os_linux.cpp:896)
      C [libc.so.6+0x9caa4]

            iklam Ioi Lam
            iklam Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: