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

gc/metaspace/TestMetaspaceInitialization.java failed "assert(capacity_until_gc >= committed_bytes) failed: capacity_until_gc: 3145728 < committed_bytes: 3211264"

XMLWordPrintable

    • b21
    • aarch64
    • linux

      The following test failed in the JDK22 CI:

      gc/metaspace/TestMetaspaceInitialization.java

      Here's a snippet from the log file:

      #section:main
      ----------messages:(7/439)----------
      command: main -XX:MetaspaceSize=0 gc.metaspace.TestMetaspaceInitialization
      reason: User specified action: run main/othervm -XX:MetaspaceSize=0 gc.metaspace.TestMetaspaceInitialization
      started: Fri Aug 18 16:16:20 UTC 2023
      Mode: othervm [/othervm specified]
      Additional options from @modules: --add-modules java.base --add-exports java.base/jdk.internal.misc=ALL-UNNAMED
      finished: Fri Aug 18 16:16:26 UTC 2023
      elapsed time (seconds): 6.376
      ----------configuration:(4/111)----------
      Boot Layer
        add modules: java.base
        add exports: java.base/jdk.internal.misc ALL-UNNAMED

      ----------System.out:(19/1738)----------
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/opt/mach5/mesos/work_dir/slaves/cd627e65-f015-4fb1-a1d2-b6c9b8127f98-S134866/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/937a85a8-c3af-48c8-8500-f5df79fad70d/runs/ea642c42-aad6-44ff-b93d-83598387cbfd/workspace/open/src/hotspot/share/memory/metaspace.cpp:406), pid=56589, tid=56592
      # assert(capacity_until_gc >= committed_bytes) failed: capacity_until_gc: 3145728 < committed_bytes: 3211264
      #
      # JRE version: Java(TM) SE Runtime Environment (22.0+12) (fastdebug build 22-ea+12-823)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 22-ea+12-823, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
      # Problematic frame:
      # V [libjvm.so+0x125801c] MetaspaceGC::allowed_expansion()+0xdc
      #
      # Core dump will be written. Default location: Core dumps may be processed with "/opt/core.sh %p" (or dumping to /opt/mach5/mesos/work_dir/slaves/cd627e65-f015-4fb1-a1d2-b6c9b8127f98-S140239/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/ec58f54b-23d3-46b6-a59e-bd432f71826e/runs/be3d4ab7-7494-42ed-a5f5-35cb2d2c1d37/testoutput/test-support/jtreg_open_test_hotspot_jtreg_tier1_gc/scratch/3/core.56589)
      #
      # An error report file with more information is saved as:
      # /opt/mach5/mesos/work_dir/slaves/cd627e65-f015-4fb1-a1d2-b6c9b8127f98-S140239/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/ec58f54b-23d3-46b6-a59e-bd432f71826e/runs/be3d4ab7-7494-42ed-a5f5-35cb2d2c1d37/testoutput/test-support/jtreg_open_test_hotspot_jtreg_tier1_gc/scratch/3/hs_err_pid56589.log
      #
      # If you would like to submit a bug report, please visit:
      # https://bugreport.java.com/bugreport/crash.jsp
      #
      ----------System.err:(0/0)----------
      ----------rerun:(39/6146)*----------

      Here's the crashing thread's stack:

      --------------- T H R E A D ---------------

      Current thread (0x0000ffff8802d7d0): JavaThread "main" [_thread_in_vm, id=56592, stack(0x0000ffff8f1af000,0x0000ffff8f3ad000) (2040K)]

      Stack: [0x0000ffff8f1af000,0x0000ffff8f3ad000], sp=0x0000ffff8f3a9350, free space=2024k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x125801c] MetaspaceGC::allowed_expansion()+0xdc (metaspace.cpp:406)
      V [libjvm.so+0x8dd58c] metaspace::CommitLimiter::possible_expansion_words() const+0x5c (commitLimiter.cpp:45)
      V [libjvm.so+0x16d103c] metaspace::VirtualSpaceNode::commit_range(MetaWordImpl**, unsigned long)+0x1b8 (virtualSpaceNode.cpp:105)
      V [libjvm.so+0x12558dc] metaspace::Metachunk::commit_up_to(unsigned long)+0xdc (metachunk.cpp:105)
      V [libjvm.so+0x1255b08] metaspace::Metachunk::ensure_committed(unsigned long)+0x48 (metachunk.cpp:123)
      V [libjvm.so+0x125b604] metaspace::MetaspaceArena::allocate_inner(unsigned long)+0x54 (metachunk.hpp:306)
      V [libjvm.so+0x125bc9c] metaspace::MetaspaceArena::allocate(unsigned long)+0x128 (metaspaceArena.cpp:249)
      V [libjvm.so+0x12596bc] Metaspace::allocate(ClassLoaderData*, unsigned long, MetaspaceObj::Type)+0x4c (metaspace.cpp:908)
      V [libjvm.so+0x1259d68] Metaspace::allocate(ClassLoaderData*, unsigned long, MetaspaceObj::Type, JavaThread*)+0x88 (metaspace.cpp:928)
      V [libjvm.so+0x93c350] ConstMethod::allocate(ClassLoaderData*, int, InlineTableSizes*, ConstMethod::MethodType, JavaThread*)+0x50 (constMethod.cpp:47)
      V [libjvm.so+0x126ec08] Method::allocate(ClassLoaderData*, int, AccessFlags, InlineTableSizes*, ConstMethod::MethodType, Symbol*, JavaThread*)+0x58 (method.cpp:91)
      V [libjvm.so+0x86fbd0] ClassFileParser::parse_method(ClassFileStream const*, bool, ConstantPool const*, bool*, JavaThread*)+0x1390 (classFileParser.cpp:2663)
      V [libjvm.so+0x870b14] ClassFileParser::parse_methods(ClassFileStream const*, bool, bool*, bool*, bool*, JavaThread*)+0x334 (classFileParser.cpp:2810)
      V [libjvm.so+0x87419c] ClassFileParser::parse_stream(ClassFileStream const*, JavaThread*)+0xabc (classFileParser.cpp:5811)
      V [libjvm.so+0x874598] ClassFileParser::ClassFileParser(ClassFileStream*, Symbol*, ClassLoaderData*, ClassLoadInfo const*, ClassFileParser::Publicity, JavaThread*)+0x198 (classFileParser.cpp:5537)
      V [libjvm.so+0x10bc0d4] KlassFactory::create_from_stream(ClassFileStream*, Symbol*, ClassLoaderData*, ClassLoadInfo const&, JavaThread*)+0xf4 (klassFactory.cpp:201)
      V [libjvm.so+0x885584] ClassLoader::load_class(Symbol*, bool, JavaThread*)+0x154 (classLoader.cpp:1219)
      V [libjvm.so+0x15d2ae0] SystemDictionary::load_instance_class_impl(Symbol*, Handle, JavaThread*)+0x27c (systemDictionary.cpp:1279)
      V [libjvm.so+0x15d0b24] SystemDictionary::load_instance_class(Symbol*, Handle, JavaThread*)+0x20 (systemDictionary.cpp:1343)
      V [libjvm.so+0x15d1340] SystemDictionary::resolve_instance_class_or_null(Symbol*, Handle, Handle, JavaThread*)+0x68c (systemDictionary.cpp:701)
      V [libjvm.so+0x15d1c2c] SystemDictionary::resolve_or_fail(Symbol*, Handle, Handle, bool, JavaThread*)+0x2c (systemDictionary.cpp:320)
      V [libjvm.so+0x947f4c] ConstantPool::klass_at_impl(constantPoolHandle const&, int, JavaThread*)+0x15c (constantPool.cpp:544)
      V [libjvm.so+0xd5caa4] InterpreterRuntime::_new(JavaThread*, ConstantPool*, int)+0xa4 (constantPool.hpp:389)
      j jdk.internal.util.ClassFileDumper.<init>(Ljava/lang/String;Ljava/lang/String;)V+5 java.base
      j jdk.internal.util.ClassFileDumper.getInstance(Ljava/lang/String;Ljava/lang/String;)Ljdk/internal/util/ClassFileDumper;+31 java.base
      j java.lang.invoke.MethodHandleStatics.<clinit>()V+197 java.base
      v ~StubRoutines::call_stub 0x0000ffff7805f17c
      V [libjvm.so+0xd7353c] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x478 (javaCalls.cpp:415)
      V [libjvm.so+0xd24420] InstanceKlass::call_class_initializer(JavaThread*)+0x23c (instanceKlass.cpp:1572)
      V [libjvm.so+0xd29d2c] InstanceKlass::initialize_impl(JavaThread*)+0x60c (instanceKlass.cpp:1158)
      V [libjvm.so+0xd2a1c8] InstanceKlass::initialize(JavaThread*)+0xb8 (instanceKlass.cpp:748)
      V [libjvm.so+0x110fdc8] LinkResolver::resolve_field(fieldDescriptor&, LinkInfo const&, Bytecodes::Code, bool, JavaThread*)+0x2e8 (linkResolver.cpp:1045)
      V [libjvm.so+0x1110304] LinkResolver::resolve_field_access(fieldDescriptor&, constantPoolHandle const&, int, methodHandle const&, Bytecodes::Code, JavaThread*)+0x84 (linkResolver.cpp:955)
      V [libjvm.so+0xd5ab9c] InterpreterRuntime::resolve_get_put(JavaThread*, Bytecodes::Code)+0x15c (interpreterRuntime.cpp:671)
      V [libjvm.so+0xd5c4a8] InterpreterRuntime::resolve_from_cache(JavaThread*, Bytecodes::Code)+0x164 (interpreterRuntime.cpp:975)
      j java.lang.invoke.MethodHandle.<clinit>()V+16 java.base
      v ~StubRoutines::call_stub 0x0000ffff7805f17c
      V [libjvm.so+0xd7353c] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x478 (javaCalls.cpp:415)
      V [libjvm.so+0xd24420] InstanceKlass::call_class_initializer(JavaThread*)+0x23c (instanceKlass.cpp:1572)
      V [libjvm.so+0xd29d2c] InstanceKlass::initialize_impl(JavaThread*)+0x60c (instanceKlass.cpp:1158)
      V [libjvm.so+0xd2a1c8] InstanceKlass::initialize(JavaThread*)+0xb8 (instanceKlass.cpp:748)
      V [libjvm.so+0x16206e8] initialize_class(Symbol*, JavaThread*)+0x88 (threads.cpp:122)
      V [libjvm.so+0x162208c] Threads::initialize_jsr292_core_classes(JavaThread*)+0x5c (threads.cpp:404)
      V [libjvm.so+0x16249c0] Threads::create_vm(JavaVMInitArgs*, bool*)+0x600 (threads.cpp:726)
      V [libjvm.so+0xe7722c] JNI_CreateJavaVM+0x78 (jni.cpp:3576)
      C [libjli.so+0x42fc] JavaMain+0x7c (java.c:1522)
      C [libjli.so+0x78fc] ThreadJavaMain+0xc (java_md.c:650)
      C [libpthread.so.0+0x7908] start_thread+0x188
      Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
      j jdk.internal.util.ClassFileDumper.<init>(Ljava/lang/String;Ljava/lang/String;)V+5 java.base
      j jdk.internal.util.ClassFileDumper.getInstance(Ljava/lang/String;Ljava/lang/String;)Ljdk/internal/util/ClassFileDumper;+31 java.base
      j java.lang.invoke.MethodHandleStatics.<clinit>()V+197 java.base
      v ~StubRoutines::call_stub 0x0000ffff7805f17c
      j java.lang.invoke.MethodHandle.<clinit>()V+16 java.base
      v ~StubRoutines::call_stub 0x0000ffff7805f17c

            stuefe Thomas Stuefe
            dcubed Daniel Daugherty
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: