-
Bug
-
Resolution: Duplicate
-
P3
-
22
We have seen this happening intermittently when running some tests in JMH with -XX:ArchiveClassesAtExit=dynamic.jsa.
MetaspaceShared::try_link_class() encounters an old class that's already in the static archive. It calls set_class_has_failed_verification() on it, but the SystemDictionaryShared doesn't have a DumpTimeClassInfo that were loading from the static archive:
Stack: [0x00007f124479b000,0x00007f124489c000], sp=0x00007f124489a5b0, free space=1021k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0xe6e711] SystemDictionaryShared::set_class_has_failed_verification(InstanceKlass*)+0x41 (dumpTimeClassInfo.hpp:211)
V [libjvm.so+0xc4add8] MetaspaceShared::try_link_class(JavaThread*, InstanceKlass*)+0x138 (metaspaceShared.cpp:827)
V [libjvm.so+0xc4cb76] MetaspaceShared::link_shared_classes(bool, JavaThread*)+0x136 (metaspaceShared.cpp:604)
V [libjvm.so+0x74e4ee] DynamicArchive::dump_at_exit(JavaThread*, char const*)+0xae (dynamicArchive.cpp:405)
V [libjvm.so+0x8f22e5] before_exit(JavaThread*, bool)+0x85 (java.cpp:471)
V [libjvm.so+0xebada0] Threads::destroy_vm()+0x1b0 (threads.cpp:914)
V [libjvm.so+0x987f3a] jni_DestroyJavaVM+0xaa (jni.cpp:3743)
C [libjli.so+0x4502] JavaMain+0x2c2 (java.c:600)
C [libjli.so+0x7e49] ThreadJavaMain+0x9 (java_md.c:650)
Thus, "p" is null in the following code:
void SystemDictionaryShared::set_class_has_failed_verification(InstanceKlass* ik) {
Arguments::assert_is_dumping_archive();
DumpTimeClassInfo* p = get_info(ik);
p->set_failed_verification();
}
MetaspaceShared::try_link_class() encounters an old class that's already in the static archive. It calls set_class_has_failed_verification() on it, but the SystemDictionaryShared doesn't have a DumpTimeClassInfo that were loading from the static archive:
Stack: [0x00007f124479b000,0x00007f124489c000], sp=0x00007f124489a5b0, free space=1021k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0xe6e711] SystemDictionaryShared::set_class_has_failed_verification(InstanceKlass*)+0x41 (dumpTimeClassInfo.hpp:211)
V [libjvm.so+0xc4add8] MetaspaceShared::try_link_class(JavaThread*, InstanceKlass*)+0x138 (metaspaceShared.cpp:827)
V [libjvm.so+0xc4cb76] MetaspaceShared::link_shared_classes(bool, JavaThread*)+0x136 (metaspaceShared.cpp:604)
V [libjvm.so+0x74e4ee] DynamicArchive::dump_at_exit(JavaThread*, char const*)+0xae (dynamicArchive.cpp:405)
V [libjvm.so+0x8f22e5] before_exit(JavaThread*, bool)+0x85 (java.cpp:471)
V [libjvm.so+0xebada0] Threads::destroy_vm()+0x1b0 (threads.cpp:914)
V [libjvm.so+0x987f3a] jni_DestroyJavaVM+0xaa (jni.cpp:3743)
C [libjli.so+0x4502] JavaMain+0x2c2 (java.c:600)
C [libjli.so+0x7e49] ThreadJavaMain+0x9 (java_md.c:650)
Thus, "p" is null in the following code:
void SystemDictionaryShared::set_class_has_failed_verification(InstanceKlass* ik) {
Arguments::assert_is_dumping_archive();
DumpTimeClassInfo* p = get_info(ik);
p->set_failed_verification();
}
- duplicates
-
JDK-8312181 CDS dynamic dump crashes when verifying unlinked class from static archive
-
- Resolved
-
- relates to
-
JDK-8251918 [Graal] Crash in DumpTimeSharedClassInfo::add_verification_constraint
-
- Resolved
-
-
JDK-8247529 Crash in runtime/cds/appcds/dynamicArchive/LambdaProxyCallerIsHidden.java with Graal
-
- Resolved
-