-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix](mow) fix potential mem leak for DeleteBitmap::AggCache #52596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
TPC-H: Total hot run time: 33919 ms |
TPC-DS: Total hot run time: 184724 ms |
|
run buildall |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
TPC-H: Total hot run time: 34483 ms |
TPC-DS: Total hot run time: 186633 ms |
ClickBench: Total hot run time: 29.95 s |
dataroaring
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
Problem Summary: DeleteBitmap::AggCache use a singleton to manage the memory of LRUCache. It needs to release the cache memory at program exit.
Problem Summary: DeleteBitmap::AggCache use a singleton to manage the memory of LRUCache. It needs to release the cache memory at program exit.
Problem Summary: DeleteBitmap::AggCache use a singleton to manage the memory of LRUCache. It needs to release the cache memory at program exit.
### What problem does this PR solve? fix #52596, DeleteBitmapAggCache should be destructed before CacheManager ``` SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /root/doris/be/src/runtime/memory/cache_policy.cpp:35:31 *** Query id: 0-0 *** *** is nereids: 0 *** *** tablet id: 0 *** *** Aborted at 1751405577 (unix time) try "date -d @1751405577" if you are using GNU date *** *** Current BE git commitID: cd35cf0eb5 *** *** SIGSEGV address not mapped to object (@0x10) received by PID 15013 (TID 15013 OR 0x7fced202a4c0) from PID 16; stack trace: *** 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /root/doris/be/src/common/signal_handler.h:420 1# PosixSignals::chained_handler(int, siginfo_t*, void*) [clone .part.0] in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so 2# JVM_handle_linux_signal in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so 3# 0x00007FCED2404090 in /lib/x86_64-linux-gnu/libc.so.6 4# __pthread_mutex_lock at ../nptl/pthread_mutex_lock.c:67 5# doris::CacheManager::unregister_cache(doris::CachePolicy::CacheType) at /root/doris/be/src/runtime/memory/cache_manager.h:56 6# doris::CachePolicy::~CachePolicy() at /root/doris/be/src/runtime/memory/cache_policy.cpp:36 7# doris::DeleteBitmap::AggCachePolicy::~AggCachePolicy() at /root/doris/be/src/olap/tablet_meta.h:568 8# __run_exit_handlers at /build/glibc-SzIz7B/glibc-2.31/stdlib/exit.c:109 9# on_exit at /build/glibc-SzIz7B/glibc-2.31/stdlib/on_exit.c:26 10# __libc_start_main at ../csu/libc-start.c:261 11# _start in /home/work/unlimit_teamcity/TeamCity/Agents/20250702042258agent_172.16.0.200_1/work/60183217f6ee2a9c/output/be/lib/doris_be
### What problem does this PR solve? fix #52596, DeleteBitmapAggCache should be destructed before CacheManager ``` SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /root/doris/be/src/runtime/memory/cache_policy.cpp:35:31 *** Query id: 0-0 *** *** is nereids: 0 *** *** tablet id: 0 *** *** Aborted at 1751405577 (unix time) try "date -d @1751405577" if you are using GNU date *** *** Current BE git commitID: cd35cf0eb5 *** *** SIGSEGV address not mapped to object (@0x10) received by PID 15013 (TID 15013 OR 0x7fced202a4c0) from PID 16; stack trace: *** 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /root/doris/be/src/common/signal_handler.h:420 1# PosixSignals::chained_handler(int, siginfo_t*, void*) [clone .part.0] in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so 2# JVM_handle_linux_signal in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so 3# 0x00007FCED2404090 in /lib/x86_64-linux-gnu/libc.so.6 4# __pthread_mutex_lock at ../nptl/pthread_mutex_lock.c:67 5# doris::CacheManager::unregister_cache(doris::CachePolicy::CacheType) at /root/doris/be/src/runtime/memory/cache_manager.h:56 6# doris::CachePolicy::~CachePolicy() at /root/doris/be/src/runtime/memory/cache_policy.cpp:36 7# doris::DeleteBitmap::AggCachePolicy::~AggCachePolicy() at /root/doris/be/src/olap/tablet_meta.h:568 8# __run_exit_handlers at /build/glibc-SzIz7B/glibc-2.31/stdlib/exit.c:109 9# on_exit at /build/glibc-SzIz7B/glibc-2.31/stdlib/on_exit.c:26 10# __libc_start_main at ../csu/libc-start.c:261 11# _start in /home/work/unlimit_teamcity/TeamCity/Agents/20250702042258agent_172.16.0.200_1/work/60183217f6ee2a9c/output/be/lib/doris_be
fix apache#52596, DeleteBitmapAggCache should be destructed before CacheManager ``` SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /root/doris/be/src/runtime/memory/cache_policy.cpp:35:31 *** Query id: 0-0 *** *** is nereids: 0 *** *** tablet id: 0 *** *** Aborted at 1751405577 (unix time) try "date -d @1751405577" if you are using GNU date *** *** Current BE git commitID: cd35cf0eb5 *** *** SIGSEGV address not mapped to object (@0x10) received by PID 15013 (TID 15013 OR 0x7fced202a4c0) from PID 16; stack trace: *** 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /root/doris/be/src/common/signal_handler.h:420 1# PosixSignals::chained_handler(int, siginfo_t*, void*) [clone .part.0] in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so 2# JVM_handle_linux_signal in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so 3# 0x00007FCED2404090 in /lib/x86_64-linux-gnu/libc.so.6 4# __pthread_mutex_lock at ../nptl/pthread_mutex_lock.c:67 5# doris::CacheManager::unregister_cache(doris::CachePolicy::CacheType) at /root/doris/be/src/runtime/memory/cache_manager.h:56 6# doris::CachePolicy::~CachePolicy() at /root/doris/be/src/runtime/memory/cache_policy.cpp:36 7# doris::DeleteBitmap::AggCachePolicy::~AggCachePolicy() at /root/doris/be/src/olap/tablet_meta.h:568 8# __run_exit_handlers at /build/glibc-SzIz7B/glibc-2.31/stdlib/exit.c:109 9# on_exit at /build/glibc-SzIz7B/glibc-2.31/stdlib/on_exit.c:26 10# __libc_start_main at ../csu/libc-start.c:261 11# _start in /home/work/unlimit_teamcity/TeamCity/Agents/20250702042258agent_172.16.0.200_1/work/60183217f6ee2a9c/output/be/lib/doris_be
fix apache#52596, DeleteBitmapAggCache should be destructed before CacheManager ``` SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /root/doris/be/src/runtime/memory/cache_policy.cpp:35:31 *** Query id: 0-0 *** *** is nereids: 0 *** *** tablet id: 0 *** *** Aborted at 1751405577 (unix time) try "date -d @1751405577" if you are using GNU date *** *** Current BE git commitID: cd35cf0eb5 *** *** SIGSEGV address not mapped to object (@0x10) received by PID 15013 (TID 15013 OR 0x7fced202a4c0) from PID 16; stack trace: *** 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /root/doris/be/src/common/signal_handler.h:420 1# PosixSignals::chained_handler(int, siginfo_t*, void*) [clone .part.0] in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so 2# JVM_handle_linux_signal in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so 3# 0x00007FCED2404090 in /lib/x86_64-linux-gnu/libc.so.6 4# __pthread_mutex_lock at ../nptl/pthread_mutex_lock.c:67 5# doris::CacheManager::unregister_cache(doris::CachePolicy::CacheType) at /root/doris/be/src/runtime/memory/cache_manager.h:56 6# doris::CachePolicy::~CachePolicy() at /root/doris/be/src/runtime/memory/cache_policy.cpp:36 7# doris::DeleteBitmap::AggCachePolicy::~AggCachePolicy() at /root/doris/be/src/olap/tablet_meta.h:568 8# __run_exit_handlers at /build/glibc-SzIz7B/glibc-2.31/stdlib/exit.c:109 9# on_exit at /build/glibc-SzIz7B/glibc-2.31/stdlib/on_exit.c:26 10# __libc_start_main at ../csu/libc-start.c:261 11# _start in /home/work/unlimit_teamcity/TeamCity/Agents/20250702042258agent_172.16.0.200_1/work/60183217f6ee2a9c/output/be/lib/doris_be
…52596) Problem Summary: DeleteBitmap::AggCache use a singleton to manage the memory of LRUCache. It needs to release the cache memory at program exit.
### What problem does this PR solve? fix apache#52596, DeleteBitmapAggCache should be destructed before CacheManager ``` SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /root/doris/be/src/runtime/memory/cache_policy.cpp:35:31 *** Query id: 0-0 *** *** is nereids: 0 *** *** tablet id: 0 *** *** Aborted at 1751405577 (unix time) try "date -d @1751405577" if you are using GNU date *** *** Current BE git commitID: cd35cf0eb5 *** *** SIGSEGV address not mapped to object (@0x10) received by PID 15013 (TID 15013 OR 0x7fced202a4c0) from PID 16; stack trace: *** 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /root/doris/be/src/common/signal_handler.h:420 1# PosixSignals::chained_handler(int, siginfo_t*, void*) [clone .part.0] in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so 2# JVM_handle_linux_signal in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so 3# 0x00007FCED2404090 in /lib/x86_64-linux-gnu/libc.so.6 4# __pthread_mutex_lock at ../nptl/pthread_mutex_lock.c:67 5# doris::CacheManager::unregister_cache(doris::CachePolicy::CacheType) at /root/doris/be/src/runtime/memory/cache_manager.h:56 6# doris::CachePolicy::~CachePolicy() at /root/doris/be/src/runtime/memory/cache_policy.cpp:36 7# doris::DeleteBitmap::AggCachePolicy::~AggCachePolicy() at /root/doris/be/src/olap/tablet_meta.h:568 8# __run_exit_handlers at /build/glibc-SzIz7B/glibc-2.31/stdlib/exit.c:109 9# on_exit at /build/glibc-SzIz7B/glibc-2.31/stdlib/on_exit.c:26 10# __libc_start_main at ../csu/libc-start.c:261 11# _start in /home/work/unlimit_teamcity/TeamCity/Agents/20250702042258agent_172.16.0.200_1/work/60183217f6ee2a9c/output/be/lib/doris_be
…52596) Problem Summary: DeleteBitmap::AggCache use a singleton to manage the memory of LRUCache. It needs to release the cache memory at program exit.
### What problem does this PR solve? fix apache#52596, DeleteBitmapAggCache should be destructed before CacheManager ``` SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /root/doris/be/src/runtime/memory/cache_policy.cpp:35:31 *** Query id: 0-0 *** *** is nereids: 0 *** *** tablet id: 0 *** *** Aborted at 1751405577 (unix time) try "date -d @1751405577" if you are using GNU date *** *** Current BE git commitID: cd35cf0eb5 *** *** SIGSEGV address not mapped to object (@0x10) received by PID 15013 (TID 15013 OR 0x7fced202a4c0) from PID 16; stack trace: *** 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /root/doris/be/src/common/signal_handler.h:420 1# PosixSignals::chained_handler(int, siginfo_t*, void*) [clone .part.0] in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so 2# JVM_handle_linux_signal in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so 3# 0x00007FCED2404090 in /lib/x86_64-linux-gnu/libc.so.6 4# __pthread_mutex_lock at ../nptl/pthread_mutex_lock.c:67 5# doris::CacheManager::unregister_cache(doris::CachePolicy::CacheType) at /root/doris/be/src/runtime/memory/cache_manager.h:56 6# doris::CachePolicy::~CachePolicy() at /root/doris/be/src/runtime/memory/cache_policy.cpp:36 7# doris::DeleteBitmap::AggCachePolicy::~AggCachePolicy() at /root/doris/be/src/olap/tablet_meta.h:568 8# __run_exit_handlers at /build/glibc-SzIz7B/glibc-2.31/stdlib/exit.c:109 9# on_exit at /build/glibc-SzIz7B/glibc-2.31/stdlib/on_exit.c:26 10# __libc_start_main at ../csu/libc-start.c:261 11# _start in /home/work/unlimit_teamcity/TeamCity/Agents/20250702042258agent_172.16.0.200_1/work/60183217f6ee2a9c/output/be/lib/doris_be
…52596) Problem Summary: DeleteBitmap::AggCache use a singleton to manage the memory of LRUCache. It needs to release the cache memory at program exit.
### What problem does this PR solve? fix apache#52596, DeleteBitmapAggCache should be destructed before CacheManager ``` SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /root/doris/be/src/runtime/memory/cache_policy.cpp:35:31 *** Query id: 0-0 *** *** is nereids: 0 *** *** tablet id: 0 *** *** Aborted at 1751405577 (unix time) try "date -d @1751405577" if you are using GNU date *** *** Current BE git commitID: cd35cf0eb5 *** *** SIGSEGV address not mapped to object (@0x10) received by PID 15013 (TID 15013 OR 0x7fced202a4c0) from PID 16; stack trace: *** 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /root/doris/be/src/common/signal_handler.h:420 1# PosixSignals::chained_handler(int, siginfo_t*, void*) [clone .part.0] in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so 2# JVM_handle_linux_signal in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so 3# 0x00007FCED2404090 in /lib/x86_64-linux-gnu/libc.so.6 4# __pthread_mutex_lock at ../nptl/pthread_mutex_lock.c:67 5# doris::CacheManager::unregister_cache(doris::CachePolicy::CacheType) at /root/doris/be/src/runtime/memory/cache_manager.h:56 6# doris::CachePolicy::~CachePolicy() at /root/doris/be/src/runtime/memory/cache_policy.cpp:36 7# doris::DeleteBitmap::AggCachePolicy::~AggCachePolicy() at /root/doris/be/src/olap/tablet_meta.h:568 8# __run_exit_handlers at /build/glibc-SzIz7B/glibc-2.31/stdlib/exit.c:109 9# on_exit at /build/glibc-SzIz7B/glibc-2.31/stdlib/on_exit.c:26 10# __libc_start_main at ../csu/libc-start.c:261 11# _start in /home/work/unlimit_teamcity/TeamCity/Agents/20250702042258agent_172.16.0.200_1/work/60183217f6ee2a9c/output/be/lib/doris_be
### What problem does this PR solve? fix apache#52596, DeleteBitmapAggCache should be destructed before CacheManager ``` SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /root/doris/be/src/runtime/memory/cache_policy.cpp:35:31 *** Query id: 0-0 *** *** is nereids: 0 *** *** tablet id: 0 *** *** Aborted at 1751405577 (unix time) try "date -d @1751405577" if you are using GNU date *** *** Current BE git commitID: cd35cf0eb5 *** *** SIGSEGV address not mapped to object (@0x10) received by PID 15013 (TID 15013 OR 0x7fced202a4c0) from PID 16; stack trace: *** 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /root/doris/be/src/common/signal_handler.h:420 1# PosixSignals::chained_handler(int, siginfo_t*, void*) [clone .part.0] in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so 2# JVM_handle_linux_signal in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so 3# 0x00007FCED2404090 in /lib/x86_64-linux-gnu/libc.so.6 4# __pthread_mutex_lock at ../nptl/pthread_mutex_lock.c:67 5# doris::CacheManager::unregister_cache(doris::CachePolicy::CacheType) at /root/doris/be/src/runtime/memory/cache_manager.h:56 6# doris::CachePolicy::~CachePolicy() at /root/doris/be/src/runtime/memory/cache_policy.cpp:36 7# doris::DeleteBitmap::AggCachePolicy::~AggCachePolicy() at /root/doris/be/src/olap/tablet_meta.h:568 8# __run_exit_handlers at /build/glibc-SzIz7B/glibc-2.31/stdlib/exit.c:109 9# on_exit at /build/glibc-SzIz7B/glibc-2.31/stdlib/on_exit.c:26 10# __libc_start_main at ../csu/libc-start.c:261 11# _start in /home/work/unlimit_teamcity/TeamCity/Agents/20250702042258agent_172.16.0.200_1/work/60183217f6ee2a9c/output/be/lib/doris_be
fix apache#52596, DeleteBitmapAggCache should be destructed before CacheManager ``` SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /root/doris/be/src/runtime/memory/cache_policy.cpp:35:31 *** Query id: 0-0 *** *** is nereids: 0 *** *** tablet id: 0 *** *** Aborted at 1751405577 (unix time) try "date -d @1751405577" if you are using GNU date *** *** Current BE git commitID: cd35cf0eb5 *** *** SIGSEGV address not mapped to object (@0x10) received by PID 15013 (TID 15013 OR 0x7fced202a4c0) from PID 16; stack trace: *** 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /root/doris/be/src/common/signal_handler.h:420 1# PosixSignals::chained_handler(int, siginfo_t*, void*) [clone .part.0] in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so 2# JVM_handle_linux_signal in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so 3# 0x00007FCED2404090 in /lib/x86_64-linux-gnu/libc.so.6 4# __pthread_mutex_lock at ../nptl/pthread_mutex_lock.c:67 5# doris::CacheManager::unregister_cache(doris::CachePolicy::CacheType) at /root/doris/be/src/runtime/memory/cache_manager.h:56 6# doris::CachePolicy::~CachePolicy() at /root/doris/be/src/runtime/memory/cache_policy.cpp:36 7# doris::DeleteBitmap::AggCachePolicy::~AggCachePolicy() at /root/doris/be/src/olap/tablet_meta.h:568 8# __run_exit_handlers at /build/glibc-SzIz7B/glibc-2.31/stdlib/exit.c:109 9# on_exit at /build/glibc-SzIz7B/glibc-2.31/stdlib/on_exit.c:26 10# __libc_start_main at ../csu/libc-start.c:261 11# _start in /home/work/unlimit_teamcity/TeamCity/Agents/20250702042258agent_172.16.0.200_1/work/60183217f6ee2a9c/output/be/lib/doris_be
…che apache#52596 (apache#52614) Cherry-picked from apache#52596 Co-authored-by: zhannngchen <zhangchen@selectdb.com>
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
DeleteBitmap::AggCache use a singleton to manage the memory of LRUCache. It needs to release the cache memory at program exit.
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)