Description
# assert(false) failed: Possible safepoint reached by thread that does not allow it
V [libjvm.so+0x1915d83] JavaThread::check_possible_safepoint()+0xa3
V [libjvm.so+0x14e01dc] MetaspaceCriticalAllocation::wait_for_purge(MetadataAllocationRequest*)+0xbc
V [libjvm.so+0x14e09c8] MetaspaceCriticalAllocation::allocate(ClassLoaderData*, unsigned long, Metaspace::MetadataType)+0xb8
V [libjvm.so+0x14dc360] Metaspace::allocate(ClassLoaderData*, unsigned long, MetaspaceObj::Type, JavaThread*)+0x120
V [libjvm.so+0xeaeab2] InstanceKlass::allocate_instance_klass(ClassFileParser const&, JavaThread*)+0xf2
Reproducible by editing test/hotspot/jtreg/vmTestbase/gc/gctests/LoadUnloadGC/LoadUnloadGC.java to run with -XX:MetaspaceSize=64m
Setting MetaspaceSize to MaxMetaspaceSize removes the high-watermark triggered 'Metadata GC Threshold' GCs, and makes the allocation have to wait for Metaspace to be purged. This waiting asserts that we are not allowed to safepoint while holding the MetaspaceCritical_lock.
Command line:
make --no-print-directory -C ../build/fastdebug/ test TEST=test/hotspot/jtreg/vmTestbase/gc/gctests/LoadUnloadGC/LoadUnloadGC.java JTREG="JAVA_OPTIONS=-XX:+UseZGC -Xlog:gc*"
V [libjvm.so+0x1915d83] JavaThread::check_possible_safepoint()+0xa3
V [libjvm.so+0x14e01dc] MetaspaceCriticalAllocation::wait_for_purge(MetadataAllocationRequest*)+0xbc
V [libjvm.so+0x14e09c8] MetaspaceCriticalAllocation::allocate(ClassLoaderData*, unsigned long, Metaspace::MetadataType)+0xb8
V [libjvm.so+0x14dc360] Metaspace::allocate(ClassLoaderData*, unsigned long, MetaspaceObj::Type, JavaThread*)+0x120
V [libjvm.so+0xeaeab2] InstanceKlass::allocate_instance_klass(ClassFileParser const&, JavaThread*)+0xf2
Reproducible by editing test/hotspot/jtreg/vmTestbase/gc/gctests/LoadUnloadGC/LoadUnloadGC.java to run with -XX:MetaspaceSize=64m
Setting MetaspaceSize to MaxMetaspaceSize removes the high-watermark triggered 'Metadata GC Threshold' GCs, and makes the allocation have to wait for Metaspace to be purged. This waiting asserts that we are not allowed to safepoint while holding the MetaspaceCritical_lock.
Command line:
make --no-print-directory -C ../build/fastdebug/ test TEST=test/hotspot/jtreg/vmTestbase/gc/gctests/LoadUnloadGC/LoadUnloadGC.java JTREG="JAVA_OPTIONS=-XX:+UseZGC -Xlog:gc*"