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

ZGC: CriticalMetaspaceAllocation asserts

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 18
    • Fix Version/s: 18
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      gc
    • Resolved In Build:
      b26
    • Verification:
      Verified

      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*"

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              eosterlund Erik Ă–sterlund
              Reporter:
              stefank Stefan Karlsson
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: