From aa0053347fff2c0e0d2f4cac5007d4411355772b Mon Sep 17 00:00:00 2001 From: camby Date: Fri, 25 Oct 2024 20:42:20 +0800 Subject: [PATCH] [fix](crash) be crash on ~LRUFileCache (#42498) come from: https://github.com/apache/doris/pull/39036 Crash stack: ``` (gdb) bt #0 0x00007ff5c8c6c387 in raise () from /lib64/libc.so.6 #1 0x00007ff5c8c6da78 in abort () from /lib64/libc.so.6 #2 0x0000561eb0a5e38a in __gnu_cxx::__verbose_terminate_handler () at ../../../../libstdc++-v3/libsupc++/vterminate.cc:95 #3 0x0000561eb0a5caf6 in __cxxabiv1::__terminate (handler=) at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:48 #4 0x0000561eb0a5cb61 in std::terminate () at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:58 #5 0x0000561ea4028552 in doris::io::LRUFileCache::~LRUFileCache (this=0x7ff540fed000) at /root/be/src/io/cache/block/block_lru_file_cache.h:62 #6 0x0000561ea402857e in doris::io::LRUFileCache::~LRUFileCache (this=0x33688) at /root/be/src/io/cache/block/block_lru_file_cache.h:54 #7 0x0000561ea4251cd2 in std::default_delete::operator() (this=0x7ff54101d000, __ptr=0x33688) at /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/unique_ptr.h:85 #8 std::unique_ptr >::~unique_ptr (this=0x7ff54101d000) at /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/unique_ptr.h:361 #9 std::destroy_at > > (__location=0x7ff54101d000) at /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_construct.h:88 #10 std::_Destroy > > (__pointer=0x7ff54101d000) at /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_construct.h:138 #11 std::_Destroy_aux::__destroy >*> (__first=0x7ff54101d000, __last=0x7ff54101d008) at /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_construct.h:152 #12 std::_Destroy >*> (__first=, __last=0x7ff54101d008) at /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_construct.h:184 #13 std::_Destroy >*, std::unique_ptr > > (__first=, __last=0x7ff54101d008) at /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/alloc_traits.h:746 #14 std::vector >, std::allocator > > >::~vector (this=0x7ff596a24ba8) at /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_vector.h:680 #15 doris::io::FileCacheFactory::~FileCacheFactory (this=0x7ff596a24b80) at /root/be/src/io/cache/block/block_file_cache_factory.h:42 #16 doris::ExecEnv::destroy (this=0x561eb130b800 ) at /root/be/src/runtime/exec_env_init.cpp:651 #17 0x0000561ea35c3fe3 in main (argc=, argv=) at /root/be/src/service/doris_main.cpp:628 ``` --- be/src/io/cache/block/block_lru_file_cache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/be/src/io/cache/block/block_lru_file_cache.h b/be/src/io/cache/block/block_lru_file_cache.h index 08060c94c13dfd..62b282fb816c5a 100644 --- a/be/src/io/cache/block/block_lru_file_cache.h +++ b/be/src/io/cache/block/block_lru_file_cache.h @@ -54,7 +54,7 @@ class LRUFileCache final : public IFileCache { ~LRUFileCache() override { _close = true; if (_cache_background_load_thread.joinable()) { - _cache_background_thread.join(); + _cache_background_load_thread.join(); } if (_cache_background_thread.joinable()) { _cache_background_thread.join();