dragonwell-project / dragonwell21

GNU General Public License v2.0
70 stars 20 forks source link

[ASAN][upstream]memory leak in ArchiveHeapWriter::init() src/hotspot/share/cds/archiveHeapWriter.cpp:84 #136

Open sendaoYan opened 1 day ago

sendaoYan commented 1 day ago

build command:

export "CUSTOM_CONFIG=--enable-asan --enable-ubsan --enable-lsan" && export ASAN_OPTIONS="detect_leaks=1" && export LSAN_OPTIONS=suppressions=$HOME/tone/tone-matrix-compiler/jtreg/asan/leak-suppressions.txt
bash configure --with-jobs=128 --prefix=/home/yansendao/git/jdk/install-fastdebug --verbose --with-debug-level=fastdebug --enable-unlimited-crypto --with-vendor-name=yansendao --with-vendor-url=https://github.com/sendaoYan --with-vendor-bug-url=mailto:yansendao.ysd@alibaba-inc.com --with-vendor-vm-bug-url=mailto:yansendao.ysd@alibaba-inc.com --with-jvm-variants=server --with-boot-jdk=/home/yansendao/software/jdk/24/jdk-repo-binary --with-gtest=/home/yansendao/git/googletest-v1.14.x --with-jtreg=/home/yansendao/software/jdk/jtreg-7.4 --with-jmh=build/jmh/jars    --with-version-opt=8a2a75e5 --with-zlib=system --enable-ccache --with-native-debug-symbols=external    --enable-asan --enable-ubsan --enable-lsan
time make all

java memory leak replay command:

/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/bin/java -Xshare:dump -XX:SharedClassListFile=/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/link_opt/classlist.interim -XX:SharedArchiveFile=/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/link_opt/classlist.jsa -Xmx128M -Xms128M

result:

==1755269==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 289114 byte(s) in 1 object(s) allocated from:
    #0 0x7fa873eb0667 in __interceptor_malloc (/lib64/libasan.so.6+0xb0667)
    #1 0x7fa85c562ce7 in os::malloc(unsigned long, MemTag, NativeCallStack const&) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x142cbce7)
    #2 0x7fa8573d267a in AllocateHeap(unsigned long, MemTag, AllocFailStrategy::AllocFailEnum) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0xf13b67a)
    #3 0x7fa8574e531b in ResizeableResourceHashtable<unsigned long, oop, (AnyObj::allocation_type)2, (MemTag)13, &(unsigned int primitive_hash<unsigned long>(unsigned long const&)), &(bool primitive_equals<unsigned long>(unsigned long const&, unsigned long const&))>::ResizeableResourceHashtable(unsigned int, unsigned int) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0xf24e31b)
    #4 0x7fa8574c7c46 in ArchiveHeapWriter::init() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0xf230c46)
    #5 0x7fa85c0262ca in MetaspaceShared::preload_and_dump_impl(StaticArchiveBuilder&, JavaThread*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x13d8f2ca)
    #6 0x7fa85c0273e5 in MetaspaceShared::preload_and_dump(JavaThread*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x13d903e5)
    #7 0x7fa85dc4f727 in Threads::create_vm(JavaVMInitArgs*, bool*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x159b8727)
    #8 0x7fa85ab4285e in JNI_CreateJavaVM (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x128ab85e)
    #9 0x7fa873da5aac in JavaMain (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/bin/../lib/libjli.so+0x33aac)
    #10 0x7fa873db2fc8 in ThreadJavaMain (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/bin/../lib/libjli.so+0x40fc8)
    #11 0x7fa8747f33fa in start_thread (/lib64/libpthread.so.0+0x93fa)

Direct leak of 4465 byte(s) in 235 object(s) allocated from:
    #0 0x7fa873eb0667 in __interceptor_malloc (/lib64/libasan.so.6+0xb0667)
    #1 0x7fa85c562ce7 in os::malloc(unsigned long, MemTag, NativeCallStack const&) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x142cbce7)
    #2 0x7fa8573d267a in AllocateHeap(unsigned long, MemTag, AllocFailStrategy::AllocFailEnum) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0xf13b67a)
    #3 0x7fa858c037aa in CompactHashtableWriter::CompactHashtableWriter(int, CompactHashtableStats*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x1096c7aa)
    #4 0x7fa85d9c8ff1 in SymbolTable::write_to_archive(GrowableArray<Symbol*>*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15731ff1)
    #5 0x7fa85c00f37e in VM_PopulateDumpSharedSpace::doit() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x13d7837e)
    #6 0x7fa85e087f66 in VM_Operation::evaluate() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15df0f66)
    #7 0x7fa85e11833e in VMThread::evaluate_operation(VM_Operation*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15e8133e)
    #8 0x7fa85e11b770 in VMThread::inner_execute(VM_Operation*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15e84770)
    #9 0x7fa85e11c68a in VMThread::loop() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15e8568a)
    #10 0x7fa85e11ca46 in VMThread::run() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15e85a46)
    #11 0x7fa85dbc68e6 in Thread::call_run() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x1592f8e6)
    #12 0x7fa85c58c961 in thread_native_entry(Thread*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x142f5961)
    #13 0x7fa8747f33fa in start_thread (/lib64/libpthread.so.0+0x93fa)

Direct leak of 874 byte(s) in 46 object(s) allocated from:
    #0 0x7fa873eb0667 in __interceptor_malloc (/lib64/libasan.so.6+0xb0667)
    #1 0x7fa85c562ce7 in os::malloc(unsigned long, MemTag, NativeCallStack const&) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x142cbce7)
    #2 0x7fa8573d267a in AllocateHeap(unsigned long, MemTag, AllocFailStrategy::AllocFailEnum) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0xf13b67a)
    #3 0x7fa858c037aa in CompactHashtableWriter::CompactHashtableWriter(int, CompactHashtableStats*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x1096c7aa)
    #4 0x7fa85d5333a5 in StringTable::init_shared_table(DumpedInternedStrings const*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x1529c3a5)
    #5 0x7fa85a2042c8 in HeapShared::archive_strings() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x11f6d2c8)
    #6 0x7fa85a217a8b in HeapShared::copy_objects() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x11f80a8b)
    #7 0x7fa85a217f91 in HeapShared::archive_objects(ArchiveHeapInfo*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x11f80f91)
    #8 0x7fa85c00e2c6 in VM_PopulateDumpSharedSpace::dump_java_heap_objects(GrowableArray<Klass*>*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x13d772c6)
    #9 0x7fa85c00f2a7 in VM_PopulateDumpSharedSpace::doit() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x13d782a7)
    #10 0x7fa85e087f66 in VM_Operation::evaluate() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15df0f66)
    #11 0x7fa85e11833e in VMThread::evaluate_operation(VM_Operation*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15e8133e)
    #12 0x7fa85e11b770 in VMThread::inner_execute(VM_Operation*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15e84770)
    #13 0x7fa85e11c68a in VMThread::loop() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15e8568a)
    #14 0x7fa85e11ca46 in VMThread::run() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15e85a46)
    #15 0x7fa85dbc68e6 in Thread::call_run() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x1592f8e6)
    #16 0x7fa85c58c961 in thread_native_entry(Thread*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x142f5961)
    #17 0x7fa8747f33fa in start_thread (/lib64/libpthread.so.0+0x93fa)

Direct leak of 222 byte(s) in 3 object(s) allocated from:
    #0 0x7fa873eb0667 in __interceptor_malloc (/lib64/libasan.so.6+0xb0667)
    #1 0x7fa85c562ce7 in os::malloc(unsigned long, MemTag, NativeCallStack const&) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x142cbce7)
    #2 0x7fa8573d38fa in AnyObj::operator new(unsigned long, MemTag) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0xf13c8fa)
    #3 0x7fa8574d384a in ArchiveHeapWriter::maybe_fill_gc_region_gap(unsigned long) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0xf23c84a)
    #4 0x7fa8574d444f in ArchiveHeapWriter::copy_one_source_obj_to_buffer(oop) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0xf23d44f)
    #5 0x7fa8574d7bfc in ArchiveHeapWriter::copy_source_objs_to_buffer(GrowableArrayCHeap<oop, (MemTag)13>*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0xf240bfc)
    #6 0x7fa8574da36f in ArchiveHeapWriter::write(GrowableArrayCHeap<oop, (MemTag)13>*, ArchiveHeapInfo*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0xf24336f)
    #7 0x7fa85a217fc7 in HeapShared::archive_objects(ArchiveHeapInfo*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x11f80fc7)
    #8 0x7fa85c00e2c6 in VM_PopulateDumpSharedSpace::dump_java_heap_objects(GrowableArray<Klass*>*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x13d772c6)
    #9 0x7fa85c00f2a7 in VM_PopulateDumpSharedSpace::doit() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x13d782a7)
    #10 0x7fa85e087f66 in VM_Operation::evaluate() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15df0f66)
    #11 0x7fa85e11833e in VMThread::evaluate_operation(VM_Operation*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15e8133e)
    #12 0x7fa85e11b770 in VMThread::inner_execute(VM_Operation*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15e84770)
    #13 0x7fa85e11c68a in VMThread::loop() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15e8568a)
    #14 0x7fa85e11ca46 in VMThread::run() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15e85a46)
    #15 0x7fa85dbc68e6 in Thread::call_run() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x1592f8e6)
    #16 0x7fa85c58c961 in thread_native_entry(Thread*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x142f5961)
    #17 0x7fa8747f33fa in start_thread (/lib64/libpthread.so.0+0x93fa)

Direct leak of 190 byte(s) in 10 object(s) allocated from:
    #0 0x7fa873eb0667 in __interceptor_malloc (/lib64/libasan.so.6+0xb0667)
    #1 0x7fa85c562ce7 in os::malloc(unsigned long, MemTag, NativeCallStack const&) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x142cbce7)
    #2 0x7fa8573d267a in AllocateHeap(unsigned long, MemTag, AllocFailStrategy::AllocFailEnum) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0xf13b67a)
    #3 0x7fa858c037aa in CompactHashtableWriter::CompactHashtableWriter(int, CompactHashtableStats*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x1096c7aa)
    #4 0x7fa85da9832f in SystemDictionaryShared::write_dictionary(RunTimeSharedDictionary*, bool) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x1580132f)
    #5 0x7fa85da9aa23 in SystemDictionaryShared::write_to_archive(bool) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15803a23)
    #6 0x7fa85c00c879 in VM_PopulateDumpSharedSpace::dump_read_only_tables() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x13d75879)
    #7 0x7fa85c00f42b in VM_PopulateDumpSharedSpace::doit() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x13d7842b)
    #8 0x7fa85e087f66 in VM_Operation::evaluate() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15df0f66)
    #9 0x7fa85e11833e in VMThread::evaluate_operation(VM_Operation*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15e8133e)
    #10 0x7fa85e11b770 in VMThread::inner_execute(VM_Operation*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15e84770)
    #11 0x7fa85e11c68a in VMThread::loop() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15e8568a)
    #12 0x7fa85e11ca46 in VMThread::run() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15e85a46)
    #13 0x7fa85dbc68e6 in Thread::call_run() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x1592f8e6)
    #14 0x7fa85c58c961 in thread_native_entry(Thread*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x142f5961)
    #15 0x7fa8747f33fa in start_thread (/lib64/libpthread.so.0+0x93fa)

Direct leak of 19 byte(s) in 1 object(s) allocated from:
    #0 0x7fa873eb0667 in __interceptor_malloc (/lib64/libasan.so.6+0xb0667)
    #1 0x7fa85c562ce7 in os::malloc(unsigned long, MemTag, NativeCallStack const&) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x142cbce7)
    #2 0x7fa85c568903 in os::strdup(char const*, MemTag) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x142d1903)
    #3 0x7fa85c1be444 in Modules::get_addmods_names_as_sorted_string() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x13f27444)
    #4 0x7fa85c1bf1cc in Modules::dump_addmods_names() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x13f281cc)
    #5 0x7fa85c006dd1 in VM_PopulateDumpSharedSpace::dump_early_read_only_tables() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x13d6fdd1)
    #6 0x7fa85c00f41f in VM_PopulateDumpSharedSpace::doit() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x13d7841f)
    #7 0x7fa85e087f66 in VM_Operation::evaluate() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15df0f66)
    #8 0x7fa85e11833e in VMThread::evaluate_operation(VM_Operation*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15e8133e)
    #9 0x7fa85e11b770 in VMThread::inner_execute(VM_Operation*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15e84770)
    #10 0x7fa85e11c68a in VMThread::loop() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15e8568a)
    #11 0x7fa85e11ca46 in VMThread::run() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15e85a46)
    #12 0x7fa85dbc68e6 in Thread::call_run() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x1592f8e6)
    #13 0x7fa85c58c961 in thread_native_entry(Thread*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x142f5961)
    #14 0x7fa8747f33fa in start_thread (/lib64/libpthread.so.0+0x93fa)

Direct leak of 19 byte(s) in 1 object(s) allocated from:
    #0 0x7fa873eb0667 in __interceptor_malloc (/lib64/libasan.so.6+0xb0667)
    #1 0x7fa85c562ce7 in os::malloc(unsigned long, MemTag, NativeCallStack const&) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x142cbce7)
    #2 0x7fa8573d267a in AllocateHeap(unsigned long, MemTag, AllocFailStrategy::AllocFailEnum) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0xf13b67a)
    #3 0x7fa858c037aa in CompactHashtableWriter::CompactHashtableWriter(int, CompactHashtableStats*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x1096c7aa)
    #4 0x7fa85da9832f in SystemDictionaryShared::write_dictionary(RunTimeSharedDictionary*, bool) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x1580132f)
    #5 0x7fa85da9aa38 in SystemDictionaryShared::write_to_archive(bool) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15803a38)
    #6 0x7fa85c00c879 in VM_PopulateDumpSharedSpace::dump_read_only_tables() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x13d75879)
    #7 0x7fa85c00f42b in VM_PopulateDumpSharedSpace::doit() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x13d7842b)
    #8 0x7fa85e087f66 in VM_Operation::evaluate() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15df0f66)
    #9 0x7fa85e11833e in VMThread::evaluate_operation(VM_Operation*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15e8133e)
    #10 0x7fa85e11b770 in VMThread::inner_execute(VM_Operation*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15e84770)
    #11 0x7fa85e11c68a in VMThread::loop() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15e8568a)
    #12 0x7fa85e11ca46 in VMThread::run() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15e85a46)
    #13 0x7fa85dbc68e6 in Thread::call_run() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x1592f8e6)
    #14 0x7fa85c58c961 in thread_native_entry(Thread*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x142f5961)
    #15 0x7fa8747f33fa in start_thread (/lib64/libpthread.so.0+0x93fa)

Indirect leak of 1648646 byte(s) in 22279 object(s) allocated from:
    #0 0x7fa873eb0667 in __interceptor_malloc (/lib64/libasan.so.6+0xb0667)
    #1 0x7fa85c562ce7 in os::malloc(unsigned long, MemTag, NativeCallStack const&) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x142cbce7)
    #2 0x7fa8573d38fa in AnyObj::operator new(unsigned long, MemTag) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0xf13c8fa)
    #3 0x7fa8574d7d9d in ArchiveHeapWriter::copy_source_objs_to_buffer(GrowableArrayCHeap<oop, (MemTag)13>*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0xf240d9d)
    #4 0x7fa8574da36f in ArchiveHeapWriter::write(GrowableArrayCHeap<oop, (MemTag)13>*, ArchiveHeapInfo*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0xf24336f)
    #5 0x7fa85a217fc7 in HeapShared::archive_objects(ArchiveHeapInfo*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x11f80fc7)
    #6 0x7fa85c00e2c6 in VM_PopulateDumpSharedSpace::dump_java_heap_objects(GrowableArray<Klass*>*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x13d772c6)
    #7 0x7fa85c00f2a7 in VM_PopulateDumpSharedSpace::doit() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x13d782a7)
    #8 0x7fa85e087f66 in VM_Operation::evaluate() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15df0f66)
    #9 0x7fa85e11833e in VMThread::evaluate_operation(VM_Operation*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15e8133e)
    #10 0x7fa85e11b770 in VMThread::inner_execute(VM_Operation*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15e84770)
    #11 0x7fa85e11c68a in VMThread::loop() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15e8568a)
    #12 0x7fa85e11ca46 in VMThread::run() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x15e85a46)
    #13 0x7fa85dbc68e6 in Thread::call_run() (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x1592f8e6)
    #14 0x7fa85c58c961 in thread_native_entry(Thread*) (/home/yansendao/git/jdk/build/linux-x86_64-server-fastdebug/support/interim-image/lib/server/libjvm.so+0x142f5961)
    #15 0x7fa8747f33fa in start_thread (/lib64/libpthread.so.0+0x93fa)

SUMMARY: AddressSanitizer: 1943549 byte(s) leaked in 22576 allocation(s)

ASAN leak 已知问题屏蔽方法: 运行时配置环境变量,export LSAN_OPTIONS=suppressions=$HOME/tone/tone-matrix-compiler/jtreg/asan/leak-suppressions.txt leak-suppressions.txt文件内容为每一行屏蔽一个函数方法 leak:函数签名,参考如下:

image

leak-suppressions.txt make-linux-x86_64-server-fastdebug-2.log.zip make-linux-x86_64-server-fastdebug-1.log.zip