GC can be running and will barf if it hits a null CLD. Idea is to add a prepass over the Klasses in the archive to fix the CLD to point to the_null_cld.
To reproduce, call GC somewhere during field initialization in this stack with ZGC.
#9 0x00007f0fda43f2f7 in XCollectedHeap::collect (this=0x7f0fd404a910, cause=GCCause::_java_lang_system_gc) at src/hotspot/share/gc/x/xCollectedHeap.cpp:188
#10 0x00007f0fd9ab55bc in verify_the_heap (k=0x7f0cf2032d50, which=0x7f0fda9400a9 "before") at src/hotspot/share/cds/heapShared.cpp:1031
#11 0x00007f0fd9ab5f00 in HeapShared::init_archived_fields_for (k=0x7f0cf2032d50, record=0x7f0cf2cdf0e0) at src/hotspot/share/cds/heapShared.cpp:1185
#12 0x00007f0fd9ab58d4 in HeapShared::initialize_from_archived_subgraph (current=0x7f0fd4034710, k=0x7f0cf2032d50) at src/hotspot/share/cds/heapShared.cpp:1093
#13 0x00007f0fd9c66e3d in JVM_InitializeFromArchive (env=0x7f0fd4034b10, cls=0x7f0fd8bc8b28) at src/hotspot/share/prims/jvm.cpp:3592
#14 0x00007f0fd8a6b2b0 in Java_jdk_internal_misc_CDS_initializeFromArchive (env=0x7f0fd4034b10, ignore=0x7f0fd8bc8b18, c=0x7f0fd8bc8b28) at src/java.base/share/native/libjava/CDS.c:32
- relates to
-
JDK-8296433 Encountered null CLD while loading shared lambda proxy class
- Resolved