The following test failed in the JDK20 CI:
serviceability/jvmti/SetBreakpoint/TestManyBreakpoints.java
Here's a snippet from the log file:
#section:main
----------messages:(7/582)----------
command: main -agentlib:TestManyBreakpoints -Xlog:gc+metaspace -Xint -XX:MetaspaceSize=16K -XX:MaxMetaspaceSize=64M TestManyBreakpoints
reason: User specified action: run main/othervm/native -agentlib:TestManyBreakpoints -Xlog:gc+metaspace -Xint -XX:MetaspaceSize=16K -XX:MaxMetaspaceSize=64M TestManyBreakpoints
started: Wed Oct 12 19:44:27 GMT 2022
Mode: othervm [/othervm specified]
Additional options from @modules: --add-modules java.base --add-exports java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED
finished: Wed Oct 12 19:45:47 GMT 2022
elapsed time (seconds): 80.802
----------configuration:(4/137)----------
Boot Layer
add modules: java.base
add exports: java.base/jdk.internal.org.objectweb.asm ALL-UNNAMED
----------System.out:(21/1751)----------
[0.157s][info][gc,metaspace] CDS archive(s) not mapped
[0.157s][info][gc,metaspace] Compressed class space mapped at: 0x0000000300000000-0x0000000303400000, reserved size: 54525952
[0.157s][info][gc,metaspace] Narrow klass base: 0x0000000000000000, Narrow klass shift: 3, Narrow klass range: 0x303400000
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc: SuppressErrorAt=/metaspace.cpp:407
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/System/Volumes/Data/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S79698/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/4320560a-a83b-4c56-8159-abb5c3d0e832/runs/3892d155-f50f-4d5c-9a79-4e4e93caa2ac/workspace/open/src/hotspot/share/memory/metaspace.cpp:407), pid=32469, tid=8195
# assert(capacity_until_gc >= committed_bytes) failed: capacity_until_gc: 2949120 < committed_bytes: 3014656
#
# JRE version: Java(TM) SE Runtime Environment (20.0+19) (fastdebug build 20-ea+19-1368)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 20-ea+19-1368, interpreted mode, compressed oops, compressed class ptrs, g1 gc, bsd-aarch64)
# Core dump will be written. Default location: core.32469
#
# An error report file with more information is saved as:
# /System/Volumes/Data/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S92573/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/451888ce-9aab-4d60-b2fb-53abd158845b/runs/9edd7d8f-4393-4ecf-985d-19ca95d6c0c6/testoutput/test-support/jtreg_open_test_hotspot_jtreg_tier1_serviceability/scratch/0/hs_err_pid32469.log
#
# If you would like to submit a bug report, please visit:
# https://bugreport.java.com/bugreport/crash.jsp
#
----------System.err:(0/0)----------
----------rerun:(42/6483)*----------
Here's the crashing thread's stack:
--------------- T H R E A D ---------------
Current thread (0x0000000126016610): JavaThread "main" [_thread_in_vm, id=8195, stack(0x000000016b074000,0x000000016b277000)]
Stack: [0x000000016b074000,0x000000016b277000], sp=0x000000016b274c70, free space=2051k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.dylib+0x1090804] VMError::report_and_die(int, char const*, char const*, char*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x5c8 (metaspace.cpp:407)
V [libjvm.dylib+0x1090f40] VMError::report_and_die(Thread*, void*, char const*, int, char const*, char const*, char*)+0x40
V [libjvm.dylib+0x569220] report_vm_error(char const*, int, char const*, char const*, ...)+0x80
V [libjvm.dylib+0xce5c1c] MetaspaceGC::allowed_expansion()+0x8c
V [libjvm.dylib+0x4cabc0] metaspace::CommitLimiter::possible_expansion_words() const+0xa4
V [libjvm.dylib+0x10861e0] metaspace::VirtualSpaceNode::commit_range(MetaWordImpl**, unsigned long)+0x204
V [libjvm.dylib+0xce2798] metaspace::Metachunk::commit_up_to(unsigned long)+0x30c
V [libjvm.dylib+0xce2b6c] metaspace::Metachunk::ensure_committed(unsigned long)+0x48
V [libjvm.dylib+0xce85cc] metaspace::MetaspaceArena::allocate_inner(unsigned long)+0xb0
V [libjvm.dylib+0xce84a4] metaspace::MetaspaceArena::allocate(unsigned long)+0xe4
V [libjvm.dylib+0xce6ff0] Metaspace::allocate(ClassLoaderData*, unsigned long, MetaspaceObj::Type)+0x98
V [libjvm.dylib+0xce70cc] Metaspace::allocate(ClassLoaderData*, unsigned long, MetaspaceObj::Type, JavaThread*)+0x60
V [libjvm.dylib+0x510104] ConstMethod::allocate(ClassLoaderData*, int, InlineTableSizes*, ConstMethod::MethodType, JavaThread*)+0x50
V [libjvm.dylib+0xcf6eb0] Method::allocate(ClassLoaderData*, int, AccessFlags, InlineTableSizes*, ConstMethod::MethodType, Symbol*, JavaThread*)+0x78
V [libjvm.dylib+0x47835c] ClassFileParser::parse_method(ClassFileStream const*, bool, ConstantPool const*, AccessFlags*, JavaThread*)+0x1914
V [libjvm.dylib+0x478e6c] ClassFileParser::parse_methods(ClassFileStream const*, bool, AccessFlags*, bool*, bool*, JavaThread*)+0x3a8
V [libjvm.dylib+0x4817ec] ClassFileParser::parse_stream(ClassFileStream const*, JavaThread*)+0x8d8
V [libjvm.dylib+0x480ed8] ClassFileParser::ClassFileParser(ClassFileStream*, Symbol*, ClassLoaderData*, ClassLoadInfo const*, ClassFileParser::Publicity, JavaThread*)+0x314
V [libjvm.dylib+0xb6ac10] KlassFactory::create_from_stream(ClassFileStream*, Symbol*, ClassLoaderData*, ClassLoadInfo const&, JavaThread*)+0xa4
V [libjvm.dylib+0x48c7fc] ClassLoader::load_class(Symbol*, bool, JavaThread*)+0x278
V [libjvm.dylib+0xfae0fc] SystemDictionary::load_instance_class_impl(Symbol*, Handle, JavaThread*)+0x434
V [libjvm.dylib+0xfabc88] SystemDictionary::load_instance_class(Symbol*, Handle, JavaThread*)+0x24
V [libjvm.dylib+0xfab0a0] SystemDictionary::resolve_instance_class_or_null(Symbol*, Handle, Handle, JavaThread*)+0x704
V [libjvm.dylib+0xfaa2c0] SystemDictionary::resolve_or_fail(Symbol*, Handle, Handle, bool, JavaThread*)+0x24
V [libjvm.dylib+0x5159ec] ConstantPool::klass_at_impl(constantPoolHandle const&, int, JavaThread*)+0x688
V [libjvm.dylib+0x85835c] InterpreterRuntime::ldc(JavaThread*, bool)+0x3ac
j jdk.internal.access.SharedSecrets.getJavaLangModuleAccess()Ljdk/internal/access/JavaLangModuleAccess;+8 java.base
j jdk.internal.module.ModuleBootstrap.<clinit>()V+22 java.base
v ~StubRoutines::call_stub 0x000000011030017c
V [libjvm.dylib+0x86fc34] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x4cc
V [libjvm.dylib+0x830d48] InstanceKlass::call_class_initializer(JavaThread*)+0x2a4
V [libjvm.dylib+0x82f4b4] InstanceKlass::initialize_impl(JavaThread*)+0x8d8
V [libjvm.dylib+0xbb53e8] LinkResolver::resolve_static_call(CallInfo&, LinkInfo const&, bool, JavaThread*)+0x78
V [libjvm.dylib+0xbb7ab8] LinkResolver::resolve_invoke(CallInfo&, Handle, constantPoolHandle const&, int, Bytecodes::Code, JavaThread*)+0x104
V [libjvm.dylib+0x8606b4] InterpreterRuntime::resolve_invoke(JavaThread*, Bytecodes::Code)+0x5dc
V [libjvm.dylib+0x8614dc] InterpreterRuntime::resolve_from_cache(JavaThread*, Bytecodes::Code)+0x1e8
j java.lang.System.initPhase2(ZZ)I+0 java.base
v ~StubRoutines::call_stub 0x000000011030017c
V [libjvm.dylib+0x86fc34] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x4cc
V [libjvm.dylib+0x86f2b4] JavaCalls::call_static(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, JavaThread*)+0xd0
V [libjvm.dylib+0xffbf68] Threads::create_vm(JavaVMInitArgs*, bool*)+0x8f8
V [libjvm.dylib+0x96d204] JNI_CreateJavaVM+0xa8
C [libjli.dylib+0x8d30] JavaMain+0x104
C [libjli.dylib+0xb8d8] ThreadJavaMain+0xc
C [libsystem_pthread.dylib+0x726c] _pthread_start+0x94
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j jdk.internal.access.SharedSecrets.getJavaLangModuleAccess()Ljdk/internal/access/JavaLangModuleAccess;+8 java.base
j jdk.internal.module.ModuleBootstrap.<clinit>()V+22 java.base
v ~StubRoutines::call_stub 0x000000011030017c
j java.lang.System.initPhase2(ZZ)I+0 java.base
v ~StubRoutines::call_stub 0x000000011030017c
serviceability/jvmti/SetBreakpoint/TestManyBreakpoints.java
Here's a snippet from the log file:
#section:main
----------messages:(7/582)----------
command: main -agentlib:TestManyBreakpoints -Xlog:gc+metaspace -Xint -XX:MetaspaceSize=16K -XX:MaxMetaspaceSize=64M TestManyBreakpoints
reason: User specified action: run main/othervm/native -agentlib:TestManyBreakpoints -Xlog:gc+metaspace -Xint -XX:MetaspaceSize=16K -XX:MaxMetaspaceSize=64M TestManyBreakpoints
started: Wed Oct 12 19:44:27 GMT 2022
Mode: othervm [/othervm specified]
Additional options from @modules: --add-modules java.base --add-exports java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED
finished: Wed Oct 12 19:45:47 GMT 2022
elapsed time (seconds): 80.802
----------configuration:(4/137)----------
Boot Layer
add modules: java.base
add exports: java.base/jdk.internal.org.objectweb.asm ALL-UNNAMED
----------System.out:(21/1751)----------
[0.157s][info][gc,metaspace] CDS archive(s) not mapped
[0.157s][info][gc,metaspace] Compressed class space mapped at: 0x0000000300000000-0x0000000303400000, reserved size: 54525952
[0.157s][info][gc,metaspace] Narrow klass base: 0x0000000000000000, Narrow klass shift: 3, Narrow klass range: 0x303400000
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc: SuppressErrorAt=/metaspace.cpp:407
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/System/Volumes/Data/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S79698/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/4320560a-a83b-4c56-8159-abb5c3d0e832/runs/3892d155-f50f-4d5c-9a79-4e4e93caa2ac/workspace/open/src/hotspot/share/memory/metaspace.cpp:407), pid=32469, tid=8195
# assert(capacity_until_gc >= committed_bytes) failed: capacity_until_gc: 2949120 < committed_bytes: 3014656
#
# JRE version: Java(TM) SE Runtime Environment (20.0+19) (fastdebug build 20-ea+19-1368)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 20-ea+19-1368, interpreted mode, compressed oops, compressed class ptrs, g1 gc, bsd-aarch64)
# Core dump will be written. Default location: core.32469
#
# An error report file with more information is saved as:
# /System/Volumes/Data/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S92573/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/451888ce-9aab-4d60-b2fb-53abd158845b/runs/9edd7d8f-4393-4ecf-985d-19ca95d6c0c6/testoutput/test-support/jtreg_open_test_hotspot_jtreg_tier1_serviceability/scratch/0/hs_err_pid32469.log
#
# If you would like to submit a bug report, please visit:
# https://bugreport.java.com/bugreport/crash.jsp
#
----------System.err:(0/0)----------
----------rerun:(42/6483)*----------
Here's the crashing thread's stack:
--------------- T H R E A D ---------------
Current thread (0x0000000126016610): JavaThread "main" [_thread_in_vm, id=8195, stack(0x000000016b074000,0x000000016b277000)]
Stack: [0x000000016b074000,0x000000016b277000], sp=0x000000016b274c70, free space=2051k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.dylib+0x1090804] VMError::report_and_die(int, char const*, char const*, char*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x5c8 (metaspace.cpp:407)
V [libjvm.dylib+0x1090f40] VMError::report_and_die(Thread*, void*, char const*, int, char const*, char const*, char*)+0x40
V [libjvm.dylib+0x569220] report_vm_error(char const*, int, char const*, char const*, ...)+0x80
V [libjvm.dylib+0xce5c1c] MetaspaceGC::allowed_expansion()+0x8c
V [libjvm.dylib+0x4cabc0] metaspace::CommitLimiter::possible_expansion_words() const+0xa4
V [libjvm.dylib+0x10861e0] metaspace::VirtualSpaceNode::commit_range(MetaWordImpl**, unsigned long)+0x204
V [libjvm.dylib+0xce2798] metaspace::Metachunk::commit_up_to(unsigned long)+0x30c
V [libjvm.dylib+0xce2b6c] metaspace::Metachunk::ensure_committed(unsigned long)+0x48
V [libjvm.dylib+0xce85cc] metaspace::MetaspaceArena::allocate_inner(unsigned long)+0xb0
V [libjvm.dylib+0xce84a4] metaspace::MetaspaceArena::allocate(unsigned long)+0xe4
V [libjvm.dylib+0xce6ff0] Metaspace::allocate(ClassLoaderData*, unsigned long, MetaspaceObj::Type)+0x98
V [libjvm.dylib+0xce70cc] Metaspace::allocate(ClassLoaderData*, unsigned long, MetaspaceObj::Type, JavaThread*)+0x60
V [libjvm.dylib+0x510104] ConstMethod::allocate(ClassLoaderData*, int, InlineTableSizes*, ConstMethod::MethodType, JavaThread*)+0x50
V [libjvm.dylib+0xcf6eb0] Method::allocate(ClassLoaderData*, int, AccessFlags, InlineTableSizes*, ConstMethod::MethodType, Symbol*, JavaThread*)+0x78
V [libjvm.dylib+0x47835c] ClassFileParser::parse_method(ClassFileStream const*, bool, ConstantPool const*, AccessFlags*, JavaThread*)+0x1914
V [libjvm.dylib+0x478e6c] ClassFileParser::parse_methods(ClassFileStream const*, bool, AccessFlags*, bool*, bool*, JavaThread*)+0x3a8
V [libjvm.dylib+0x4817ec] ClassFileParser::parse_stream(ClassFileStream const*, JavaThread*)+0x8d8
V [libjvm.dylib+0x480ed8] ClassFileParser::ClassFileParser(ClassFileStream*, Symbol*, ClassLoaderData*, ClassLoadInfo const*, ClassFileParser::Publicity, JavaThread*)+0x314
V [libjvm.dylib+0xb6ac10] KlassFactory::create_from_stream(ClassFileStream*, Symbol*, ClassLoaderData*, ClassLoadInfo const&, JavaThread*)+0xa4
V [libjvm.dylib+0x48c7fc] ClassLoader::load_class(Symbol*, bool, JavaThread*)+0x278
V [libjvm.dylib+0xfae0fc] SystemDictionary::load_instance_class_impl(Symbol*, Handle, JavaThread*)+0x434
V [libjvm.dylib+0xfabc88] SystemDictionary::load_instance_class(Symbol*, Handle, JavaThread*)+0x24
V [libjvm.dylib+0xfab0a0] SystemDictionary::resolve_instance_class_or_null(Symbol*, Handle, Handle, JavaThread*)+0x704
V [libjvm.dylib+0xfaa2c0] SystemDictionary::resolve_or_fail(Symbol*, Handle, Handle, bool, JavaThread*)+0x24
V [libjvm.dylib+0x5159ec] ConstantPool::klass_at_impl(constantPoolHandle const&, int, JavaThread*)+0x688
V [libjvm.dylib+0x85835c] InterpreterRuntime::ldc(JavaThread*, bool)+0x3ac
j jdk.internal.access.SharedSecrets.getJavaLangModuleAccess()Ljdk/internal/access/JavaLangModuleAccess;+8 java.base
j jdk.internal.module.ModuleBootstrap.<clinit>()V+22 java.base
v ~StubRoutines::call_stub 0x000000011030017c
V [libjvm.dylib+0x86fc34] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x4cc
V [libjvm.dylib+0x830d48] InstanceKlass::call_class_initializer(JavaThread*)+0x2a4
V [libjvm.dylib+0x82f4b4] InstanceKlass::initialize_impl(JavaThread*)+0x8d8
V [libjvm.dylib+0xbb53e8] LinkResolver::resolve_static_call(CallInfo&, LinkInfo const&, bool, JavaThread*)+0x78
V [libjvm.dylib+0xbb7ab8] LinkResolver::resolve_invoke(CallInfo&, Handle, constantPoolHandle const&, int, Bytecodes::Code, JavaThread*)+0x104
V [libjvm.dylib+0x8606b4] InterpreterRuntime::resolve_invoke(JavaThread*, Bytecodes::Code)+0x5dc
V [libjvm.dylib+0x8614dc] InterpreterRuntime::resolve_from_cache(JavaThread*, Bytecodes::Code)+0x1e8
j java.lang.System.initPhase2(ZZ)I+0 java.base
v ~StubRoutines::call_stub 0x000000011030017c
V [libjvm.dylib+0x86fc34] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x4cc
V [libjvm.dylib+0x86f2b4] JavaCalls::call_static(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, JavaThread*)+0xd0
V [libjvm.dylib+0xffbf68] Threads::create_vm(JavaVMInitArgs*, bool*)+0x8f8
V [libjvm.dylib+0x96d204] JNI_CreateJavaVM+0xa8
C [libjli.dylib+0x8d30] JavaMain+0x104
C [libjli.dylib+0xb8d8] ThreadJavaMain+0xc
C [libsystem_pthread.dylib+0x726c] _pthread_start+0x94
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j jdk.internal.access.SharedSecrets.getJavaLangModuleAccess()Ljdk/internal/access/JavaLangModuleAccess;+8 java.base
j jdk.internal.module.ModuleBootstrap.<clinit>()V+22 java.base
v ~StubRoutines::call_stub 0x000000011030017c
j java.lang.System.initPhase2(ZZ)I+0 java.base
v ~StubRoutines::call_stub 0x000000011030017c