infiniflow / infinity

The AI-native database built for LLM applications, providing incredibly fast hybrid search of dense vector, sparse vector, tensor (multi-vector), and full-text
https://infiniflow.org
Apache License 2.0
2.68k stars 275 forks source link

[Bug]: Data race on index building on memindex #2196

Closed JinHai-CN closed 4 days ago

JinHai-CN commented 2 weeks ago

Is there an existing issue for the same bug?

Version or Commit ID

main

Other environment information

No response

Actual behavior and How to reproduce it

Case1:

Write of size 8 at 0x7220001fa618 by thread T10:
0x55555593e4be operator delete 
0x5555591f4be6 std::promise::~promise 
0x5555567deca6 std::__destroy_at[abi:ne180100]<…> construct_at.h:67 
0x5555567dec72 std::allocator_traits::destroy[abi:ne180100]<…> allocator_traits.h:316 
0x5555567dec1f std::__shared_ptr_emplace::__on_zero_shared_impl[abi:ne180100]<…> shared_ptr.h:284 
0x5555567de7c6 std::__shared_ptr_emplace::__on_zero_shared shared_ptr.h:287 
0x55555594d2ab std::__shared_count::__release_shared[abi:ne180100] shared_ptr.h:157 
0x55555594d23a std::__shared_weak_count::__release_shared[abi:ne180100] shared_ptr.h:186 
0x5555567de177 std::shared_ptr::~shared_ptr[abi:ne180100] shared_ptr.h:648 
0x5555585b9f46 (infinity+0x3065f45) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) ctpl_stl.h:261 
0x5555585bb7e6 (infinity+0x30677e5) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) compressed_pair.h:44 
0x5555585bb9d6 (infinity+0x30679d5) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) compressed_pair.h:97 
0x5555585bcad6 (infinity+0x3068ad5) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) function.h:182 
0x5555585bb21a (infinity+0x3067219) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) function.h:297 
0x555555abff97 std::__function::__value_func::~__value_func[abi:ne180100] function.h:396 
0x555555abf9c6 std::function::~function function.h:972 
0x555555ac7604 std::default_delete::operator()[abi:ne180100] const unique_ptr.h:66 
0x555555ac7535 std::unique_ptr::reset[abi:ne180100] unique_ptr.h:266 
0x555555ac71ca std::unique_ptr::~unique_ptr[abi:ne180100] unique_ptr.h:236 
0x555555ac6f7a <lambda>::operator() const ctpl_stl.h:294 
0x555555ac6d96 (infinity+0x572d95) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) invoke.h:344 
0x555555ac6d4e (infinity+0x572d4d) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) thread.h:193 
0x555555ac6983 std::__thread_proxy[abi:ne180100]<…> thread.h:202 
Previous atomic read of size 1 at 0x7220001fa618 by thread T11 (mutexes: write M0):
0x5555558bf403 pthread_cond_wait 
0x5555591f3e76 std::condition_variable::wait 
0x5555585b8b8c (infinity+0x3064b8b) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) abstract_hnsw.cppm:153 
0x555558587f7b _ZZN8infinityW13abstract_hnsw14HnswIndexInMem10InsertVecsEmPNS_W18block_column_entry16BlockColumnEntryEPNS_W14buffer_manager13BufferManagerEmmRKNS_W11hnsw_common16HnswInsertConfigEENK3 $_0clIRPNS_W8hnsw_alg7KnnHnswINS_W14vec_store_type19PlainL2VecStoreTypeIfEEjEEEEDaOT_ abstract_hnsw.cpp:156 
0x555558587ce6 (infinity+0x3033ce5) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) invoke.h:344 
0x555558587c6f (infinity+0x3033c6e) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) variant:619 
0x555558587bf6 (infinity+0x3033bf5) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) invoke.h:344 
0x555558586490 (infinity+0x303248f) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) variant:533 
0x555558586313 (infinity+0x3032312) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) variant:501 
0x555558586216 (infinity+0x3032215) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) variant:586 
0x5555585861a3 (infinity+0x30321a2) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) variant:598 
0x55555857c194 (infinity+0x3028193) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) variant:1561 
0x55555857c116 (infinity+0x3028115) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) abstract_hnsw.cpp:146 
0x55555692ea3e (infinity+0x13daa3d) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) segment_index_entry.cpp:235 
0x5555569f08a8 (infinity+0x149c8a7) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) table_entry.cpp:768 
0x5555569ecc75 (infinity+0x1498c74) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) table_entry.cpp:723 
0x5555569ec4e6 (infinity+0x14984e5) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) table_entry.cpp:497 
0x555556849c3d (infinity+0x12f5c3c) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) catalog.cpp:401 
0x555555bed8ae (infinity+0x6998ad) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) txn_store.cpp:414 
0x555555bf12cc (infinity+0x69d2cb) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) txn_store.cpp:662 
0x555555b9128a (infinity+0x63d289) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) txn.cpp:596 
0x555555ce684a (infinity+0x792849) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) wal_manager.cpp:372 
0x555555d09d86 (infinity+0x7b5d85) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) wal_manager.cpp:121 
0x555555d09ce6 (infinity+0x7b5ce5) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) invoke.h:344 
0x555555d09c9e (infinity+0x7b5c9d) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) thread.h:193 
0x555555d09933 (infinity+0x7b5932) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) thread.h:202 
Mutex M0 (0x724c0029ff68) created at:
0x5555558c03bf pthread_mutex_lock 
0x5555591f503d std::mutex::lock 
0x55555692dd11 (infinity+0x13d9d10) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) segment_index_entry.cpp:201 
0x5555569f08a8 (infinity+0x149c8a7) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) table_entry.cpp:768 
0x5555569ecc75 (infinity+0x1498c74) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) table_entry.cpp:723 
0x5555569ec4e6 (infinity+0x14984e5) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) table_entry.cpp:497 
0x555556849c3d (infinity+0x12f5c3c) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) catalog.cpp:401 
0x555555bed8ae (infinity+0x6998ad) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) txn_store.cpp:414 
0x555555bf12cc (infinity+0x69d2cb) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) txn_store.cpp:662 
0x555555b9128a (infinity+0x63d289) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) txn.cpp:596 
0x555555ce684a (infinity+0x792849) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) wal_manager.cpp:372 
0x555555d09d86 (infinity+0x7b5d85) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) wal_manager.cpp:121 
0x555555d09ce6 (infinity+0x7b5ce5) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) invoke.h:344 
0x555555d09c9e (infinity+0x7b5c9d) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) thread.h:193 
0x555555d09933 (infinity+0x7b5932) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) thread.h:202 
Thread T10 (tid=563101, running) created by main thread at:
0x5555558be890 pthread_create 
0x555555a2ec4a std::__libcpp_thread_create[abi:ne180100] __threading_support:317 
0x555555ac6723 std::thread::thread<…> thread.h:212 
0x555555ac04ea ctpl::thread_pool::set_thread ctpl_stl.h:304 
0x555555abc0f5 ctpl::thread_pool::resize ctpl_stl.h:171 
0x555555abae9a ctpl::thread_pool::thread_pool ctpl_stl.h:145 
0x555555ab5b1a (infinity+0x561b19) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) infinity_context.cppm:90 
0x5555559493b5 (infinity+0x3f53b4) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) singleton.cppm:22 
0x55555593f8ae main infinity_main.cpp:178 
Thread T11 (tid=563102, running) created by main thread at:
0x5555558be890 pthread_create 
0x555555a2ec4a std::__libcpp_thread_create[abi:ne180100] __threading_support:317 
0x555555ce2eb3 (infinity+0x78eeb2) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) thread.h:212 
0x555555ce2cfc (infinity+0x78ecfb) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) wal_manager.cpp:121 
0x555555b78f20 (infinity+0x624f1f) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) storage.cpp:234 
0x555555ab7018 (infinity+0x563017) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) infinity_context.cpp:130 
0x555555ab6496 (infinity+0x562495) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) infinity_context.cpp:92 
0x55555593f8e7 main infinity_main.cpp:178 

Case2:

Write of size 8 at 0x7220000a5d18 by thread T9:
0x55555593e4be operator delete 
0x5555591f4be6 std::promise::~promise 
0x5555567deca6 std::__destroy_at[abi:ne180100]<…> construct_at.h:67 
0x5555567dec72 std::allocator_traits::destroy[abi:ne180100]<…> allocator_traits.h:316 
0x5555567dec1f std::__shared_ptr_emplace::__on_zero_shared_impl[abi:ne180100]<…> shared_ptr.h:284 
0x5555567de7c6 std::__shared_ptr_emplace::__on_zero_shared shared_ptr.h:287 
0x55555594d2ab std::__shared_count::__release_shared[abi:ne180100] shared_ptr.h:157 
0x55555594d23a std::__shared_weak_count::__release_shared[abi:ne180100] shared_ptr.h:186 
0x5555567de177 std::shared_ptr::~shared_ptr[abi:ne180100] shared_ptr.h:648 
0x5555586d54e6 (infinity+0x31814e5) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) ctpl_stl.h:261 
0x5555586d6d86 (infinity+0x3182d85) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) compressed_pair.h:44 
0x5555586d6f76 (infinity+0x3182f75) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) compressed_pair.h:97 
0x5555586d8076 (infinity+0x3184075) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) function.h:182 
0x5555586d67ba (infinity+0x31827b9) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) function.h:297 
0x555555abff97 std::__function::__value_func::~__value_func[abi:ne180100] function.h:396 
0x555555abf9c6 std::function::~function function.h:972 
0x555555ac7604 std::default_delete::operator()[abi:ne180100] const unique_ptr.h:66 
0x555555ac7535 std::unique_ptr::reset[abi:ne180100] unique_ptr.h:266 
0x555555ac71ca std::unique_ptr::~unique_ptr[abi:ne180100] unique_ptr.h:236 
0x555555ac6f7a <lambda>::operator() const ctpl_stl.h:294 
0x555555ac6d96 (infinity+0x572d95) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) invoke.h:344 
0x555555ac6d4e (infinity+0x572d4d) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) thread.h:193 
0x555555ac6983 std::__thread_proxy[abi:ne180100]<…> thread.h:202 
Previous atomic read of size 1 at 0x7220000a5d18 by thread T98:
0x5555558bf403 pthread_cond_wait 
0x5555591f3e76 std::condition_variable::wait 
0x5555586ceacc (infinity+0x317aacb) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) abstract_hnsw.cppm:153 
0x555558596d6d _ZZN8infinityW13abstract_hnsw14HnswIndexInMem10InsertVecsEPKNS_W13segment_entry12SegmentEntryEPNS_W14buffer_manager13BufferManagerEmmbRKNS_W11hnsw_common16HnswInsertConfigEENK3 $_0clIRPNS_W8hnsw_alg7KnnHnswINS_W14vec_store_type17LVQL2VecStoreTypeIfaEEjEEEEDaOT_ abstract_hnsw.cpp:197 
0x555558596906 (infinity+0x3042905) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) invoke.h:344 
0x55555859688f (infinity+0x304288e) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) variant:619 
0x555558596816 (infinity+0x3042815) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) invoke.h:344 
0x55555858dd50 (infinity+0x3039d4f) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) variant:533 
0x55555858d753 (infinity+0x3039752) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) variant:501 
0x55555858d656 (infinity+0x3039655) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) variant:586 
0x55555858d5e3 (infinity+0x30395e2) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) variant:598 
0x55555857c364 (infinity+0x3028363) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) variant:1561 
0x55555857c2e6 (infinity+0x30282e5) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) abstract_hnsw.cpp:181 
0x555556931d26 (infinity+0x13ddd25) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) segment_index_entry.cpp:484 
0x555556a3ee0d (infinity+0x14eae0c) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) table_index_entry.cpp:320 
0x5555569eb389 (infinity+0x1497388) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) table_entry.cpp:424 
0x555555be9138 (infinity+0x695137) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) txn_store.cpp:143 
0x555555b8a99c (infinity+0x63699b) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) txn.cpp:104 
0x555556d67820 (infinity+0x181381f) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) physical_import.cpp:2002 
0x555556d5c266 (infinity+0x1808265) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) physical_import.cpp:573 
0x555556d5b3db (infinity+0x18073da) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) physical_import.cpp:96 
0x55555643b9f7 (infinity+0xee79f6) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) fragment_task.cpp:84 
0x555555b35b30 (infinity+0x5e1b2f) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) task_scheduler.cpp:194 
0x555555b355f4 (infinity+0x5e15f3) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) task_scheduler.cpp:159 
0x5555562d6dd8 (infinity+0xd82dd7) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) query_context.cpp:255 
0x55555629e72b (infinity+0xd4a72a) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) infinity.cpp:835 
0x55555613e77a (infinity+0xbea779) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) infinity_thrift_service.cpp:376 
0x555557af19de infinity_thrift_rpc::InfinityServiceProcessor::process_Import InfinityService.cpp:8761 
0x555557aed4a4 infinity_thrift_rpc::InfinityServiceProcessor::dispatchCall InfinityService.cpp:8356 
0x5555561bdcfa apache::thrift::TDispatchProcessor::process TDispatchProcessor.h:121 
0x5555591a2b7d apache::thrift::server::TConnectedClient::run TConnectedClient.cpp:61 
0x555559174742 apache::thrift::concurrency::ThreadManager::Task::run ThreadManager.cpp:195 
0x55555916ee51 apache::thrift::concurrency::ThreadManager::Worker::run ThreadManager.cpp:310 
0x55555919a49f apache::thrift::concurrency::Thread::threadMain Thread.cpp:28 
0x555559199bdc std::__invoke[abi:ne180100]<…> invoke.h:344 
0x555559199b4f std::__thread_execute[abi:ne180100]<…> thread.h:193 
0x555559199753 std::__thread_proxy[abi:ne180100]<…> thread.h:202 
Thread T9 (tid=563100, running) created by main thread at:
0x5555558be890 pthread_create 
0x555555a2ec4a std::__libcpp_thread_create[abi:ne180100] __threading_support:317 
0x555555ac6723 std::thread::thread<…> thread.h:212 
0x555555ac04ea ctpl::thread_pool::set_thread ctpl_stl.h:304 
0x555555abc0f5 ctpl::thread_pool::resize ctpl_stl.h:171 
0x555555abae9a ctpl::thread_pool::thread_pool ctpl_stl.h:145 
0x555555ab5b1a (infinity+0x561b19) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) infinity_context.cppm:90 
0x5555559493b5 (infinity+0x3f53b4) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) singleton.cppm:22 
0x55555593f8ae main infinity_main.cpp:178 
Thread T98 (tid=563189, running) created by main thread at:
0x5555558be890 pthread_create 
0x555555a2ec4a std::__libcpp_thread_create[abi:ne180100] __threading_support:317 
0x5555591993e3 std::thread::thread<…> thread.h:212 
0x555559198e6d apache::thrift::concurrency::Thread::start Thread.h:130 
0x555559165266 apache::thrift::concurrency::ThreadManager::Impl::addWorker ThreadManager.cpp:361 
0x55555916b3f9 apache::thrift::concurrency::SimpleThreadManager::start ThreadManager.cpp:567 
0x5555561b5404 (infinity+0xc61403) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) thrift_server.cpp:104 
0x55555594257a main::$_0::operator() const infinity_main.cpp:190 
0x555555942476 std::__invoke[abi:ne180100]<…> invoke.h:344 
0x5555559423e6 std::__invoke_void_return_wrapper::__call[abi:ne180100]<…> invoke.h:419 
0x55555594239e std::__function::__alloc_func::operator()[abi:ne180100] function.h:169 
0x555555940dda std::__function::__func::operator() function.h:311 
0x555555a1f382 std::__function::__value_func::operator()[abi:ne180100] const function.h:428 
0x555555a1f2e6 std::function::operator() const function.h:981 
0x555555ab9b47 (infinity+0x565b46) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) infinity_context.cpp:468 
0x55555593f99d main infinity_main.cpp:243 

Case3:

Write of size 8 at 0x722000020b98 by thread T7:
0x55555593e4be operator delete 
0x5555591f4be6 std::promise::~promise 
0x5555567deca6 std::__destroy_at[abi:ne180100]<…> construct_at.h:67 
0x5555567dec72 std::allocator_traits::destroy[abi:ne180100]<…> allocator_traits.h:316 
0x5555567dec1f std::__shared_ptr_emplace::__on_zero_shared_impl[abi:ne180100]<…> shared_ptr.h:284 
0x5555567de7c6 std::__shared_ptr_emplace::__on_zero_shared shared_ptr.h:287 
0x55555594d2ab std::__shared_count::__release_shared[abi:ne180100] shared_ptr.h:157 
0x55555594d23a std::__shared_weak_count::__release_shared[abi:ne180100] shared_ptr.h:186 
0x5555567de177 std::shared_ptr::~shared_ptr[abi:ne180100] shared_ptr.h:648 
0x5555586d0fd6 (infinity+0x317cfd5) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) ctpl_stl.h:261 
0x5555586d2876 (infinity+0x317e875) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) compressed_pair.h:44 
0x5555586d2a66 (infinity+0x317ea65) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) compressed_pair.h:97 
0x5555586d3b66 (infinity+0x317fb65) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) function.h:182 
0x5555586d22aa (infinity+0x317e2a9) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) function.h:297 
0x555555abff97 std::__function::__value_func::~__value_func[abi:ne180100] function.h:396 
0x555555abf9c6 std::function::~function function.h:972 
0x555555ac7604 std::default_delete::operator()[abi:ne180100] const unique_ptr.h:66 
0x555555ac7535 std::unique_ptr::reset[abi:ne180100] unique_ptr.h:266 
0x555555ac71ca std::unique_ptr::~unique_ptr[abi:ne180100] unique_ptr.h:236 
0x555555ac6f7a <lambda>::operator() const ctpl_stl.h:294 
0x555555ac6d96 (infinity+0x572d95) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) invoke.h:344 
0x555555ac6d4e (infinity+0x572d4d) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) thread.h:193 
0x555555ac6983 std::__thread_proxy[abi:ne180100]<…> thread.h:202 
Previous atomic read of size 1 at 0x722000020b98 by thread T16:
0x5555558bf403 pthread_cond_wait 
0x5555591f3e76 std::condition_variable::wait 
0x5555586ce48c (infinity+0x317a48b) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) abstract_hnsw.cppm:153 
0x555558596bf7 _ZZN8infinityW13abstract_hnsw14HnswIndexInMem10InsertVecsEPKNS_W13segment_entry12SegmentEntryEPNS_W14buffer_manager13BufferManagerEmmbRKNS_W11hnsw_common16HnswInsertConfigEENK3 $_0clIRPNS_W8hnsw_alg7KnnHnswINS_W14vec_store_type17LVQL2VecStoreTypeIfaEEjEEEEDaOT_ abstract_hnsw.cpp:194 
0x555558596906 (infinity+0x3042905) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) invoke.h:344 
0x55555859688f (infinity+0x304288e) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) variant:619 
0x555558596816 (infinity+0x3042815) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) invoke.h:344 
0x55555858dd50 (infinity+0x3039d4f) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) variant:533 
0x55555858d753 (infinity+0x3039752) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) variant:501 
0x55555858d656 (infinity+0x3039655) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) variant:586 
0x55555858d5e3 (infinity+0x30395e2) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) variant:598 
0x55555857c364 (infinity+0x3028363) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) variant:1561 
0x55555857c2e6 (infinity+0x30282e5) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) abstract_hnsw.cpp:181 
0x555556931d26 (infinity+0x13ddd25) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) segment_index_entry.cpp:484 
0x555556933402 (infinity+0x13df401) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) segment_index_entry.cpp:570 
0x555556a3f335 (infinity+0x14eb334) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) table_index_entry.cpp:349 
0x555555b8e3aa (infinity+0x63a3a9) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) txn.cpp:358 
0x5555589f0f7e (infinity+0x349cf7d) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) physical_create_index_prepare.cpp:76 
0x55555643b9f7 (infinity+0xee79f6) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) fragment_task.cpp:84 
0x555555b34e33 (infinity+0x5e0e32) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) task_scheduler.cpp:262 
0x555555b4ea0c (infinity+0x5faa0b) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) invoke.h:312 
0x555555b4e8d1 (infinity+0x5fa8d0) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) thread.h:193 
0x555555b4e363 (infinity+0x5fa362) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) thread.h:202 
Thread T7 (tid=563097, running) created by main thread at:
0x5555558be890 pthread_create 
0x555555a2ec4a std::__libcpp_thread_create[abi:ne180100] __threading_support:317 
0x555555ac6723 std::thread::thread<…> thread.h:212 
0x555555ac04ea ctpl::thread_pool::set_thread ctpl_stl.h:304 
0x555555abc0f5 ctpl::thread_pool::resize ctpl_stl.h:171 
0x555555abae9a ctpl::thread_pool::thread_pool ctpl_stl.h:145 
0x555555ab5b1a (infinity+0x561b19) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) infinity_context.cppm:90 
0x5555559493b5 (infinity+0x3f53b4) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) singleton.cppm:22 
0x55555593f8ae main infinity_main.cpp:178 
Thread T16 (tid=563107, running) created by main thread at:
0x5555558be890 pthread_create 
0x555555a2ec4a std::__libcpp_thread_create[abi:ne180100] __threading_support:317 
0x555555b4e0a8 (infinity+0x5fa0a7) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) thread.h:212 
0x555555b4df30 (infinity+0x5f9f2f) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) unique_ptr.h:597 
0x555555b38d86 (infinity+0x5e4d85) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) stl.cppm:549 
0x555555b34838 (infinity+0x5e0837) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) task_scheduler.cpp:87 
0x555555b343bd (infinity+0x5e03bc) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) task_scheduler.cpp:54 
0x555555ac918d (infinity+0x57518c) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) unique_ptr.h:597 
0x555555abb9e6 (infinity+0x5679e5) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) stl.cppm:549 
0x555555ab7c89 (infinity+0x563c88) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) infinity_context.cpp:202 
0x555555ab6496 (infinity+0x562495) (BuildId: 5ff37ade9bad9fd4d75956ccfbe6c2685daaba3a) infinity_context.cpp:92 
0x55555593f8e7 main infinity_main.cpp:178 
small-turtle-1 commented 1 week ago
==================
WARNING: ThreadSanitizer: data race (pid=210458)
  Write of size 8 at 0x722000004418 by thread T43:
    #0 operator delete(void*) <null> (infinity+0x3ea67d) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #1 std::__1::promise<void>::~promise() <null> (infinity+0x3cafc95) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #2 void std::__1::__destroy_at[abi:ne180100]<std::__1::packaged_task<void (int)>, 0>(std::__1::packaged_task<void (int)>*) /usr/lib/llvm-18/include/c++/v1/__memory/construct_at.h:67:11 (infinity+0x128d2f5) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #3 void std::__1::allocator_traits<std::__1::allocator<std::__1::packaged_task<void (int)>>>::destroy[abi:ne180100]<std::__1::packaged_task<void (int)>, void, void>(std::__1::allocator<std::__1::packaged_task<void (int)>>&, std::__1::packaged_task<void (int)>*) /usr/lib/llvm-18/include/c++/v1/__memory/allocator_traits.h:316:5 (infinity+0x128d2c1) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #4 void std::__1::__shared_ptr_emplace<std::__1::packaged_task<void (int)>, std::__1::allocator<std::__1::packaged_task<void (int)>>>::__on_zero_shared_impl[abi:ne180100]<std::__1::allocator<std::__1::packaged_task<void (int)>>, 0>() /usr/lib/llvm-18/include/c++/v1/__memory/shared_ptr.h:284:5 (infinity+0x128d26e) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #5 std::__1::__shared_ptr_emplace<std::__1::packaged_task<void (int)>, std::__1::allocator<std::__1::packaged_task<void (int)>>>::__on_zero_shared() /usr/lib/llvm-18/include/c++/v1/__memory/shared_ptr.h:287:78 (infinity+0x128ce15) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #6 std::__1::__shared_count::__release_shared[abi:ne180100]() /usr/lib/llvm-18/include/c++/v1/__memory/shared_ptr.h:157:7 (infinity+0x3f93ea) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #7 std::__1::__shared_weak_count::__release_shared[abi:ne180100]() /usr/lib/llvm-18/include/c++/v1/__memory/shared_ptr.h:186:25 (infinity+0x3f9379) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #8 std::__1::shared_ptr<std::__1::packaged_task<void (int)>>::~shared_ptr[abi:ne180100]() /usr/lib/llvm-18/include/c++/v1/__memory/shared_ptr.h:648:17 (infinity+0x128c7c6) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #9 std::__1::future<decltype(fp(0))> ctpl::thread_pool::push<void infinity::HnswIndexInMem@abstract_hnsw::InsertVecs<infinity::MemIndexInserterIter@block_column_iter<float>, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*>(infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*&, infinity::MemIndexInserterIter@block_column_iter<float>&&, infinity::HnswInsertConfig@hnsw_common const&, unsigned long&)::'lambda'(int)>(infinity::MemIndexInserterIter@block_column_iter<float>&&)::'lambda'(int)::~() /home/huikong/Code/work/infinity2/third_party/ctpl/ctpl_stl.h:261:55 (infinity+0x30753b5) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #10 std::__1::__compressed_pair_elem<std::__1::future<decltype(fp(0))> ctpl::thread_pool::push<void infinity::HnswIndexInMem@abstract_hnsw::InsertVecs<infinity::MemIndexInserterIter@block_column_iter<float>, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*>(infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*&, infinity::MemIndexInserterIter@block_column_iter<float>&&, infinity::HnswInsertConfig@hnsw_common const&, unsigned long&)::'lambda'(int)>(infinity::MemIndexInserterIter@block_column_iter<float>&&)::'lambda'(int), 0, false>::~__compressed_pair_elem() /usr/lib/llvm-18/include/c++/v1/__memory/compressed_pair.h:44:8 (infinity+0x3076c55) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #11 std::__1::__compressed_pair<std::__1::future<decltype(fp(0))> ctpl::thread_pool::push<void infinity::HnswIndexInMem@abstract_hnsw::InsertVecs<infinity::MemIndexInserterIter@block_column_iter<float>, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*>(infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*&, infinity::MemIndexInserterIter@block_column_iter<float>&&, infinity::HnswInsertConfig@hnsw_common const&, unsigned long&)::'lambda'(int)>(infinity::MemIndexInserterIter@block_column_iter<float>&&)::'lambda'(int), std::__1::allocator<std::__1::future<decltype(fp(0))> ctpl::thread_pool::push<void infinity::HnswIndexInMem@abstract_hnsw::InsertVecs<infinity::MemIndexInserterIter@block_column_iter<float>, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*>(infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*&, infinity::MemIndexInserterIter@block_column_iter<float>&&, infinity::HnswInsertConfig@hnsw_common const&, unsigned long&)::'lambda'(int)>(infinity::MemIndexInserterIter@block_column_iter<float>&&)::'lambda'(int)>>::~__compressed_pair() /usr/lib/llvm-18/include/c++/v1/__memory/compressed_pair.h:97:7 (infinity+0x3076e45) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #12 std::__1::__function::__alloc_func<std::__1::future<decltype(fp(0))> ctpl::thread_pool::push<void infinity::HnswIndexInMem@abstract_hnsw::InsertVecs<infinity::MemIndexInserterIter@block_column_iter<float>, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*>(infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*&, infinity::MemIndexInserterIter@block_column_iter<float>&&, infinity::HnswInsertConfig@hnsw_common const&, unsigned long&)::'lambda'(int)>(infinity::MemIndexInserterIter@block_column_iter<float>&&)::'lambda'(int), std::__1::allocator<std::__1::future<decltype(fp(0))> ctpl::thread_pool::push<void infinity::HnswIndexInMem@abstract_hnsw::InsertVecs<infinity::MemIndexInserterIter@block_column_iter<float>, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*>(infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*&, infinity::MemIndexInserterIter@block_column_iter<float>&&, infinity::HnswInsertConfig@hnsw_common const&, unsigned long&)::'lambda'(int)>(infinity::MemIndexInserterIter@block_column_iter<float>&&)::'lambda'(int)>, void (int)>::destroy[abi:ne180100]() /usr/lib/llvm-18/include/c++/v1/__functional/function.h:182:58 (infinity+0x3077f45) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #13 std::__1::__function::__func<std::__1::future<decltype(fp(0))> ctpl::thread_pool::push<void infinity::HnswIndexInMem@abstract_hnsw::InsertVecs<infinity::MemIndexInserterIter@block_column_iter<float>, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*>(infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*&, infinity::MemIndexInserterIter@block_column_iter<float>&&, infinity::HnswInsertConfig@hnsw_common const&, unsigned long&)::'lambda'(int)>(infinity::MemIndexInserterIter@block_column_iter<float>&&)::'lambda'(int), std::__1::allocator<std::__1::future<decltype(fp(0))> ctpl::thread_pool::push<void infinity::HnswIndexInMem@abstract_hnsw::InsertVecs<infinity::MemIndexInserterIter@block_column_iter<float>, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*>(infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*&, infinity::MemIndexInserterIter@block_column_iter<float>&&, infinity::HnswInsertConfig@hnsw_common const&, unsigned long&)::'lambda'(int)>(infinity::MemIndexInserterIter@block_column_iter<float>&&)::'lambda'(int)>, void (int)>::destroy() /usr/lib/llvm-18/include/c++/v1/__functional/function.h:297:8 (infinity+0x3076689) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #14 std::__1::__function::__value_func<void (int)>::~__value_func[abi:ne180100]() /usr/lib/llvm-18/include/c++/v1/__functional/function.h:396:13 (infinity+0x55dd86) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #15 std::__1::function<void (int)>::~function() /usr/lib/llvm-18/include/c++/v1/__functional/function.h:972:43 (infinity+0x55d7b5) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #16 std::__1::default_delete<std::__1::function<void (int)>>::operator()[abi:ne180100](std::__1::function<void (int)>*) const /usr/lib/llvm-18/include/c++/v1/__memory/unique_ptr.h:66:5 (infinity+0x5653f3) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #17 std::__1::unique_ptr<std::__1::function<void (int)>, std::__1::default_delete<std::__1::function<void (int)>>>::reset[abi:ne180100](std::__1::function<void (int)>*) /usr/lib/llvm-18/include/c++/v1/__memory/unique_ptr.h:266:7 (infinity+0x565324) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #18 std::__1::unique_ptr<std::__1::function<void (int)>, std::__1::default_delete<std::__1::function<void (int)>>>::~unique_ptr[abi:ne180100]() /usr/lib/llvm-18/include/c++/v1/__memory/unique_ptr.h:236:71 (infinity+0x564fb9) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #19 ctpl::thread_pool::set_thread(int)::'lambda'()::operator()() const /home/huikong/Code/work/infinity2/third_party/ctpl/ctpl_stl.h:294:21 (infinity+0x564d69) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #20 decltype(std::declval<ctpl::thread_pool::set_thread(int)::'lambda'()>()()) std::__1::__invoke[abi:ne180100]<ctpl::thread_pool::set_thread(int)::'lambda'()>(ctpl::thread_pool::set_thread(int)::'lambda'()&&) /usr/lib/llvm-18/include/c++/v1/__type_traits/invoke.h:344:25 (infinity+0x564b85) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #21 void std::__1::__thread_execute[abi:ne180100]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, ctpl::thread_pool::set_thread(int)::'lambda'()>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, ctpl::thread_pool::set_thread(int)::'lambda'()>&, std::__1::__tuple_indices<...>) /usr/lib/llvm-18/include/c++/v1/__thread/thread.h:193:3 (infinity+0x564b3d) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #22 void* std::__1::__thread_proxy[abi:ne180100]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, ctpl::thread_pool::set_thread(int)::'lambda'()>>(void*) /usr/lib/llvm-18/include/c++/v1/__thread/thread.h:202:3 (infinity+0x564772) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)

  Previous atomic read of size 1 at 0x722000004418 by thread T11 (mutexes: write M0):
    #0 pthread_cond_wait <null> (infinity+0x36b5c2) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #1 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) <null> (infinity+0x3caef25) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #2 _ZZN8infinityW13abstract_hnsw14HnswIndexInMem10InsertVecsEmPNS_W18block_column_entry16BlockColumnEntryEPNS_W14buffer_manager13BufferManagerEmmRKNS_W11hnsw_common16HnswInsertConfigEENK3$_0clIRPNS_W8hnsw_alg7KnnHnswINS_W14vec_store_type19PlainL2VecStoreTypeIfEEjEEEEDaOT_ /home/huikong/Code/work/infinity2/src/storage/knn_index/knn_hnsw/abstract_hnsw.cpp:156:25 (infinity+0x30435ba) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #3 decltype(std::declval<infinity::HnswIndexInMem@abstract_hnsw::InsertVecs(unsigned long, infinity::BlockColumnEntry@block_column_entry*, infinity::BufferManager@buffer_manager*, unsigned long, unsigned long, infinity::HnswInsertConfig@hnsw_common const&)::$_0>()(std::declval<infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*&>())) std::__1::__invoke[abi:ne180100]<infinity::HnswIndexInMem@abstract_hnsw::InsertVecs(unsigned long, infinity::BlockColumnEntry@block_column_entry*, infinity::BufferManager@buffer_manager*, unsigned long, unsigned long, infinity::HnswInsertConfig@hnsw_common const&)::$_0, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*&>(infinity::HnswIndexInMem@abstract_hnsw::InsertVecs(unsigned long, infinity::BlockColumnEntry@block_column_entry*, infinity::BufferManager@buffer_manager*, unsigned long, unsigned long, infinity::HnswInsertConfig@hnsw_common const&)::$_0&&, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*&) /usr/lib/llvm-18/include/c++/v1/__type_traits/invoke.h:344:25 (infinity+0x3043325) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #4 decltype(auto) std::__1::__variant_detail::__visitation::__variant::__value_visitor<infinity::HnswIndexInMem@abstract_hnsw::InsertVecs(unsigned long, infinity::BlockColumnEntry@block_column_entry*, infinity::BufferManager@buffer_manager*, unsigned long, unsigned long, infinity::HnswInsertConfig@hnsw_common const&)::$_0>::operator()[abi:ne180100]<std::__1::__variant_detail::__alt<2ul, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*>&>(std::__1::__variant_detail::__alt<2ul, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*>&) const /usr/lib/llvm-18/include/c++/v1/variant:619:14 (infinity+0x30432ae) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #5 decltype(std::declval<std::__1::__variant_detail::__visitation::__variant::__value_visitor<infinity::HnswIndexInMem@abstract_hnsw::InsertVecs(unsigned long, infinity::BlockColumnEntry@block_column_entry*, infinity::BufferManager@buffer_manager*, unsigned long, unsigned long, infinity::HnswInsertConfig@hnsw_common const&)::$_0>>()(std::declval<std::__1::__variant_detail::__alt<2ul, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*>&>())) std::__1::__invoke[abi:ne180100]<std::__1::__variant_detail::__visitation::__variant::__value_visitor<infinity::HnswIndexInMem@abstract_hnsw::InsertVecs(unsigned long, infinity::BlockColumnEntry@block_column_entry*, infinity::BufferManager@buffer_manager*, unsigned long, unsigned long, infinity::HnswInsertConfig@hnsw_common const&)::$_0>, std::__1::__variant_detail::__alt<2ul, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*>&>(std::__1::__variant_detail::__visitation::__variant::__value_visitor<infinity::HnswIndexInMem@abstract_hnsw::InsertVecs(unsigned long, infinity::BlockColumnEntry@block_column_entry*, infinity::BufferManager@buffer_manager*, unsigned long, unsigned long, infinity::HnswInsertConfig@hnsw_common const&)::$_0>&&, std::__1::__variant_detail::__alt<2ul, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*>&) /usr/lib/llvm-18/include/c++/v1/__type_traits/invoke.h:344:25 (infinity+0x3043235) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #6 decltype(auto) std::__1::__variant_detail::__visitation::__base::__dispatcher<2ul>::__dispatch[abi:ne180100]<std::__1::__variant_detail::__visitation::__variant::__value_visitor<infinity::HnswIndexInMem@abstract_hnsw::InsertVecs(unsigned long, infinity::BlockColumnEntry@block_column_entry*, infinity::BufferManager@buffer_manager*, unsigned long, unsigned long, infinity::HnswInsertConfig@hnsw_common const&)::$_0>&&, std::__1::__variant_detail::__base<(std::__1::__variant_detail::_Trait)0, infinity::KnnHnsw@hnsw_alg<infinity::PlainCosVecStoreType@vec_store_type<float>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainIPVecStoreType@vec_store_type<float>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainCosVecStoreType@vec_store_type<unsigned char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainIPVecStoreType@vec_store_type<unsigned char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<unsigned char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainCosVecStoreType@vec_store_type<signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainIPVecStoreType@vec_store_type<signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::LVQCosVecStoreType@vec_store_type<float, signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::LVQIPVecStoreType@vec_store_type<float, signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::LVQL2VecStoreType@vec_store_type<float, signed char>, unsigned int>*, std::nullptr_t>&>(std::__1::__variant_detail::__visitation::__variant::__value_visitor<infinity::HnswIndexInMem@abstract_hnsw::InsertVecs(unsigned long, infinity::BlockColumnEntry@block_column_entry*, infinity::BufferManager@buffer_manager*, unsigned long, unsigned long, infinity::HnswInsertConfig@hnsw_common const&)::$_0>&&, std::__1::__variant_detail::__base<(std::__1::__variant_detail::_Trait)0, infinity::KnnHnsw@hnsw_alg<infinity::PlainCosVecStoreType@vec_store_type<float>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainIPVecStoreType@vec_store_type<float>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainCosVecStoreType@vec_store_type<unsigned char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainIPVecStoreType@vec_store_type<unsigned char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<unsigned char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainCosVecStoreType@vec_store_type<signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainIPVecStoreType@vec_store_type<signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::LVQCosVecStoreType@vec_store_type<float, signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::LVQIPVecStoreType@vec_store_type<float, signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::LVQL2VecStoreType@vec_store_type<float, signed char>, unsigned int>*, std::nullptr_t>&) /usr/lib/llvm-18/include/c++/v1/variant:533:14 (infinity+0x3041acf) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #7 decltype(auto) std::__1::__variant_detail::__visitation::__base::__visit_alt[abi:ne180100]<std::__1::__variant_detail::__visitation::__variant::__value_visitor<infinity::HnswIndexInMem@abstract_hnsw::InsertVecs(unsigned long, infinity::BlockColumnEntry@block_column_entry*, infinity::BufferManager@buffer_manager*, unsigned long, unsigned long, infinity::HnswInsertConfig@hnsw_common const&)::$_0>, std::__1::__variant_detail::__impl<infinity::KnnHnsw@hnsw_alg<infinity::PlainCosVecStoreType@vec_store_type<float>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainIPVecStoreType@vec_store_type<float>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainCosVecStoreType@vec_store_type<unsigned char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainIPVecStoreType@vec_store_type<unsigned char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<unsigned char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainCosVecStoreType@vec_store_type<signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainIPVecStoreType@vec_store_type<signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::LVQCosVecStoreType@vec_store_type<float, signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::LVQIPVecStoreType@vec_store_type<float, signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::LVQL2VecStoreType@vec_store_type<float, signed char>, unsigned int>*, std::nullptr_t>&>(std::__1::__variant_detail::__visitation::__variant::__value_visitor<infinity::HnswIndexInMem@abstract_hnsw::InsertVecs(unsigned long, infinity::BlockColumnEntry@block_column_entry*, infinity::BufferManager@buffer_manager*, unsigned long, unsigned long, infinity::HnswInsertConfig@hnsw_common const&)::$_0>&&, std::__1::__variant_detail::__impl<infinity::KnnHnsw@hnsw_alg<infinity::PlainCosVecStoreType@vec_store_type<float>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainIPVecStoreType@vec_store_type<float>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainCosVecStoreType@vec_store_type<unsigned char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainIPVecStoreType@vec_store_type<unsigned char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<unsigned char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainCosVecStoreType@vec_store_type<signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainIPVecStoreType@vec_store_type<signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::LVQCosVecStoreType@vec_store_type<float, signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::LVQIPVecStoreType@vec_store_type<float, signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::LVQL2VecStoreType@vec_store_type<float, signed char>, unsigned int>*, std::nullptr_t>&) /usr/lib/llvm-18/include/c++/v1/variant:501:12 (infinity+0x3041952) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #8 decltype(auto) std::__1::__variant_detail::__visitation::__variant::__visit_alt[abi:ne180100]<std::__1::__variant_detail::__visitation::__variant::__value_visitor<infinity::HnswIndexInMem@abstract_hnsw::InsertVecs(unsigned long, infinity::BlockColumnEntry@block_column_entry*, infinity::BufferManager@buffer_manager*, unsigned long, unsigned long, infinity::HnswInsertConfig@hnsw_common const&)::$_0>, std::__1::variant<infinity::KnnHnsw@hnsw_alg<infinity::PlainCosVecStoreType@vec_store_type<float>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainIPVecStoreType@vec_store_type<float>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainCosVecStoreType@vec_store_type<unsigned char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainIPVecStoreType@vec_store_type<unsigned char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<unsigned char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainCosVecStoreType@vec_store_type<signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainIPVecStoreType@vec_store_type<signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::LVQCosVecStoreType@vec_store_type<float, signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::LVQIPVecStoreType@vec_store_type<float, signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::LVQL2VecStoreType@vec_store_type<float, signed char>, unsigned int>*, std::nullptr_t>&>(std::__1::__variant_detail::__visitation::__variant::__value_visitor<infinity::HnswIndexInMem@abstract_hnsw::InsertVecs(unsigned long, infinity::BlockColumnEntry@block_column_entry*, infinity::BufferManager@buffer_manager*, unsigned long, unsigned long, infinity::HnswInsertConfig@hnsw_common const&)::$_0>&&, std::__1::variant<infinity::KnnHnsw@hnsw_alg<infinity::PlainCosVecStoreType@vec_store_type<float>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainIPVecStoreType@vec_store_type<float>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainCosVecStoreType@vec_store_type<unsigned char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainIPVecStoreType@vec_store_type<unsigned char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<unsigned char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainCosVecStoreType@vec_store_type<signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainIPVecStoreType@vec_store_type<signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::LVQCosVecStoreType@vec_store_type<float, signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::LVQIPVecStoreType@vec_store_type<float, signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::LVQL2VecStoreType@vec_store_type<float, signed char>, unsigned int>*, std::nullptr_t>&) /usr/lib/llvm-18/include/c++/v1/variant:586:12 (infinity+0x3041855) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #9 decltype(auto) std::__1::__variant_detail::__visitation::__variant::__visit_value[abi:ne180100]<infinity::HnswIndexInMem@abstract_hnsw::InsertVecs(unsigned long, infinity::BlockColumnEntry@block_column_entry*, infinity::BufferManager@buffer_manager*, unsigned long, unsigned long, infinity::HnswInsertConfig@hnsw_common const&)::$_0, std::__1::variant<infinity::KnnHnsw@hnsw_alg<infinity::PlainCosVecStoreType@vec_store_type<float>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainIPVecStoreType@vec_store_type<float>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainCosVecStoreType@vec_store_type<unsigned char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainIPVecStoreType@vec_store_type<unsigned char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<unsigned char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainCosVecStoreType@vec_store_type<signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainIPVecStoreType@vec_store_type<signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::LVQCosVecStoreType@vec_store_type<float, signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::LVQIPVecStoreType@vec_store_type<float, signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::LVQL2VecStoreType@vec_store_type<float, signed char>, unsigned int>*, std::nullptr_t>&>(infinity::HnswIndexInMem@abstract_hnsw::InsertVecs(unsigned long, infinity::BlockColumnEntry@block_column_entry*, infinity::BufferManager@buffer_manager*, unsigned long, unsigned long, infinity::HnswInsertConfig@hnsw_common const&)::$_0&&, std::__1::variant<infinity::KnnHnsw@hnsw_alg<infinity::PlainCosVecStoreType@vec_store_type<float>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainIPVecStoreType@vec_store_type<float>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainCosVecStoreType@vec_store_type<unsigned char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainIPVecStoreType@vec_store_type<unsigned char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<unsigned char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainCosVecStoreType@vec_store_type<signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainIPVecStoreType@vec_store_type<signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::LVQCosVecStoreType@vec_store_type<float, signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::LVQIPVecStoreType@vec_store_type<float, signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::LVQL2VecStoreType@vec_store_type<float, signed char>, unsigned int>*, std::nullptr_t>&) /usr/lib/llvm-18/include/c++/v1/variant:598:12 (infinity+0x30417e2) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #10 decltype(auto) std::__1::visit[abi:ne180100]<infinity::HnswIndexInMem@abstract_hnsw::InsertVecs(unsigned long, infinity::BlockColumnEntry@block_column_entry*, infinity::BufferManager@buffer_manager*, unsigned long, unsigned long, infinity::HnswInsertConfig@hnsw_common const&)::$_0, std::__1::variant<infinity::KnnHnsw@hnsw_alg<infinity::PlainCosVecStoreType@vec_store_type<float>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainIPVecStoreType@vec_store_type<float>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainCosVecStoreType@vec_store_type<unsigned char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainIPVecStoreType@vec_store_type<unsigned char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<unsigned char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainCosVecStoreType@vec_store_type<signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainIPVecStoreType@vec_store_type<signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::LVQCosVecStoreType@vec_store_type<float, signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::LVQIPVecStoreType@vec_store_type<float, signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::LVQL2VecStoreType@vec_store_type<float, signed char>, unsigned int>*, std::nullptr_t>&, void>(infinity::HnswIndexInMem@abstract_hnsw::InsertVecs(unsigned long, infinity::BlockColumnEntry@block_column_entry*, infinity::BufferManager@buffer_manager*, unsigned long, unsigned long, infinity::HnswInsertConfig@hnsw_common const&)::$_0&&, std::__1::variant<infinity::KnnHnsw@hnsw_alg<infinity::PlainCosVecStoreType@vec_store_type<float>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainIPVecStoreType@vec_store_type<float>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<float>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainCosVecStoreType@vec_store_type<unsigned char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainIPVecStoreType@vec_store_type<unsigned char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<unsigned char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainCosVecStoreType@vec_store_type<signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainIPVecStoreType@vec_store_type<signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::PlainL2VecStoreType@vec_store_type<signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::LVQCosVecStoreType@vec_store_type<float, signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::LVQIPVecStoreType@vec_store_type<float, signed char>, unsigned int>*, infinity::KnnHnsw@hnsw_alg<infinity::LVQL2VecStoreType@vec_store_type<float, signed char>, unsigned int>*, std::nullptr_t>&) /usr/lib/llvm-18/include/c++/v1/variant:1561:10 (infinity+0x30377d3) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #11 infinity::HnswIndexInMem@abstract_hnsw::InsertVecs(unsigned long, infinity::BlockColumnEntry@block_column_entry*, infinity::BufferManager@buffer_manager*, unsigned long, unsigned long, infinity::HnswInsertConfig@hnsw_common const&) /home/huikong/Code/work/infinity2/src/storage/knn_index/knn_hnsw/abstract_hnsw.cpp:146:5 (infinity+0x3037755) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #12 infinity::SegmentIndexEntry@segment_index_entry::MemIndexInsert(std::__1::shared_ptr<infinity::BlockEntry@block_entry>, unsigned int, unsigned int, unsigned long, infinity::BufferManager@buffer_manager*) /home/huikong/Code/work/infinity2/src/storage/meta/entry/segment_index_entry.cpp:234:33 (infinity+0x13dd097) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #13 infinity::TableEntry@table_entry::MemIndexInsertInner(infinity::TableIndexEntry@table_index_entry*, infinity::Txn@txn*, unsigned int, std::__1::vector<infinity::AppendRange@data_access_state, std::__1::allocator<infinity::AppendRange@data_access_state>>&) /home/huikong/Code/work/infinity2/src/storage/meta/entry/table_entry.cpp:767:30 (infinity+0x149f4dd) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #14 infinity::TableEntry@table_entry::MemIndexInsert(infinity::Txn@txn*, std::__1::vector<infinity::AppendRange@data_access_state, std::__1::allocator<infinity::AppendRange@data_access_state>>&) /home/huikong/Code/work/infinity2/src/storage/meta/entry/table_entry.cpp:723:21 (infinity+0x149b8c4) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #15 infinity::TableEntry@table_entry::AppendData(unsigned long, void*, unsigned long, infinity::BufferManager@buffer_manager*, bool) /home/huikong/Code/work/infinity2/src/storage/meta/entry/table_entry.cpp:497:9 (infinity+0x149b135) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #16 infinity::Catalog@catalog::Append(infinity::TableEntry@table_entry*, unsigned long, void*, unsigned long, infinity::BufferManager@buffer_manager*, bool) /home/huikong/Code/work/infinity2/src/storage/meta/catalog.cpp:401:25 (infinity+0x12f828c) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #17 infinity::TxnTableStore@txn_store::PrepareCommit(unsigned long, unsigned long, infinity::BufferManager@buffer_manager*) /home/huikong/Code/work/infinity2/src/storage/txn/txn_store.cpp:414:5 (infinity+0x68bccd) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #18 infinity::TxnStore@txn_store::PrepareCommit(unsigned long, unsigned long, infinity::BufferManager@buffer_manager*) /home/huikong/Code/work/infinity2/src/storage/txn/txn_store.cpp:662:22 (infinity+0x68f6eb) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #19 infinity::Txn@txn::CommitBottom() /home/huikong/Code/work/infinity2/src/storage/txn/txn.cpp:611:16 (infinity+0x62f569) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #20 infinity::WalManager@wal_manager::Flush() /home/huikong/Code/work/infinity2/src/storage/wal/wal_manager.cpp:372:22 (infinity+0x784c99) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #21 infinity::WalManager@wal_manager::Start()::$_0::operator()() const /home/huikong/Code/work/infinity2/src/storage/wal/wal_manager.cpp:121:37 (infinity+0x7a81d5) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #22 decltype(std::declval<infinity::WalManager@wal_manager::Start()::$_0>()()) std::__1::__invoke[abi:ne180100]<infinity::WalManager@wal_manager::Start()::$_0>(infinity::WalManager@wal_manager::Start()::$_0&&) /usr/lib/llvm-18/include/c++/v1/__type_traits/invoke.h:344:25 (infinity+0x7a8135) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #23 void std::__1::__thread_execute[abi:ne180100]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, infinity::WalManager@wal_manager::Start()::$_0>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, infinity::WalManager@wal_manager::Start()::$_0>&, std::__1::__tuple_indices<...>) /usr/lib/llvm-18/include/c++/v1/__thread/thread.h:193:3 (infinity+0x7a80ed) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #24 void* std::__1::__thread_proxy[abi:ne180100]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, infinity::WalManager@wal_manager::Start()::$_0>>(void*) /usr/lib/llvm-18/include/c++/v1/__thread/thread.h:202:3 (infinity+0x7a7d82) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)

  Mutex M0 (0x724c0004e2a8) created at:
    #0 pthread_mutex_lock <null> (infinity+0x36c57e) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #1 std::__1::mutex::lock() <null> (infinity+0x3cb00ec) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #2 infinity::SegmentIndexEntry@segment_index_entry::MemIndexInsert(std::__1::shared_ptr<infinity::BlockEntry@block_entry>, unsigned int, unsigned int, unsigned long, infinity::BufferManager@buffer_manager*) /home/huikong/Code/work/infinity2/src/storage/meta/entry/segment_index_entry.cpp:201:21 (infinity+0x13dc390) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #3 infinity::TableEntry@table_entry::MemIndexInsertInner(infinity::TableIndexEntry@table_index_entry*, infinity::Txn@txn*, unsigned int, std::__1::vector<infinity::AppendRange@data_access_state, std::__1::allocator<infinity::AppendRange@data_access_state>>&) /home/huikong/Code/work/infinity2/src/storage/meta/entry/table_entry.cpp:767:30 (infinity+0x149f4dd) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #4 infinity::TableEntry@table_entry::MemIndexInsert(infinity::Txn@txn*, std::__1::vector<infinity::AppendRange@data_access_state, std::__1::allocator<infinity::AppendRange@data_access_state>>&) /home/huikong/Code/work/infinity2/src/storage/meta/entry/table_entry.cpp:723:21 (infinity+0x149b8c4) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #5 infinity::TableEntry@table_entry::AppendData(unsigned long, void*, unsigned long, infinity::BufferManager@buffer_manager*, bool) /home/huikong/Code/work/infinity2/src/storage/meta/entry/table_entry.cpp:497:9 (infinity+0x149b135) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #6 infinity::Catalog@catalog::Append(infinity::TableEntry@table_entry*, unsigned long, void*, unsigned long, infinity::BufferManager@buffer_manager*, bool) /home/huikong/Code/work/infinity2/src/storage/meta/catalog.cpp:401:25 (infinity+0x12f828c) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #7 infinity::TxnTableStore@txn_store::PrepareCommit(unsigned long, unsigned long, infinity::BufferManager@buffer_manager*) /home/huikong/Code/work/infinity2/src/storage/txn/txn_store.cpp:414:5 (infinity+0x68bccd) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #8 infinity::TxnStore@txn_store::PrepareCommit(unsigned long, unsigned long, infinity::BufferManager@buffer_manager*) /home/huikong/Code/work/infinity2/src/storage/txn/txn_store.cpp:662:22 (infinity+0x68f6eb) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #9 infinity::Txn@txn::CommitBottom() /home/huikong/Code/work/infinity2/src/storage/txn/txn.cpp:611:16 (infinity+0x62f569) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #10 infinity::WalManager@wal_manager::Flush() /home/huikong/Code/work/infinity2/src/storage/wal/wal_manager.cpp:372:22 (infinity+0x784c99) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #11 infinity::WalManager@wal_manager::Start()::$_0::operator()() const /home/huikong/Code/work/infinity2/src/storage/wal/wal_manager.cpp:121:37 (infinity+0x7a81d5) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #12 decltype(std::declval<infinity::WalManager@wal_manager::Start()::$_0>()()) std::__1::__invoke[abi:ne180100]<infinity::WalManager@wal_manager::Start()::$_0>(infinity::WalManager@wal_manager::Start()::$_0&&) /usr/lib/llvm-18/include/c++/v1/__type_traits/invoke.h:344:25 (infinity+0x7a8135) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #13 void std::__1::__thread_execute[abi:ne180100]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, infinity::WalManager@wal_manager::Start()::$_0>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, infinity::WalManager@wal_manager::Start()::$_0>&, std::__1::__tuple_indices<...>) /usr/lib/llvm-18/include/c++/v1/__thread/thread.h:193:3 (infinity+0x7a80ed) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #14 void* std::__1::__thread_proxy[abi:ne180100]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, infinity::WalManager@wal_manager::Start()::$_0>>(void*) /usr/lib/llvm-18/include/c++/v1/__thread/thread.h:202:3 (infinity+0x7a7d82) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)

  Thread T43 (tid=210518, running) created by main thread at:
    #0 pthread_create <null> (infinity+0x36aa4f) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #1 std::__1::__libcpp_thread_create[abi:ne180100](unsigned long*, void* (*)(void*), void*) /usr/lib/llvm-18/include/c++/v1/__threading_support:317:10 (infinity+0x4cfef9) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #2 std::__1::thread::thread<ctpl::thread_pool::set_thread(int)::'lambda'()&, void>(ctpl::thread_pool::set_thread(int)::'lambda'()&) /usr/lib/llvm-18/include/c++/v1/__thread/thread.h:212:14 (infinity+0x564512) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #3 ctpl::thread_pool::set_thread(int) /home/huikong/Code/work/infinity2/third_party/ctpl/ctpl_stl.h:304:40 (infinity+0x55e2d9) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #4 ctpl::thread_pool::resize(int) /home/huikong/Code/work/infinity2/third_party/ctpl/ctpl_stl.h:171:31 (infinity+0x559ee4) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #5 infinity::InfinityContext@infinity_context::SetIndexThreadPool(unsigned long) /home/huikong/Code/work/infinity2/src/main/infinity_context.cpp:449:29 (infinity+0x558002) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #6 infinity::InfinityContext@infinity_context::ChangeRole(infinity::NodeRole, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, unsigned short) /home/huikong/Code/work/infinity2/src/main/infinity_context.cpp:207:13 (infinity+0x555b14) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #7 infinity::InfinityContext@infinity_context::Init(std::__1::shared_ptr<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>> const&, bool, infinity::DefaultConfig@config*) /home/huikong/Code/work/infinity2/src/main/infinity_context.cpp:92:39 (infinity+0x5544d5) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #8 main /home/huikong/Code/work/infinity2/src/bin/infinity_main.cpp:178:33 (infinity+0x3ebaa6) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)

  Thread T11 (tid=210481, running) created by main thread at:
    #0 pthread_create <null> (infinity+0x36aa4f) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #1 std::__1::__libcpp_thread_create[abi:ne180100](unsigned long*, void* (*)(void*), void*) /usr/lib/llvm-18/include/c++/v1/__threading_support:317:10 (infinity+0x4cfef9) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #2 std::__1::thread::thread<infinity::WalManager@wal_manager::Start()::$_0, void>(infinity::WalManager@wal_manager::Start()::$_0&&) /usr/lib/llvm-18/include/c++/v1/__thread/thread.h:212:14 (infinity+0x781302) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #3 infinity::WalManager@wal_manager::Start() /home/huikong/Code/work/infinity2/src/storage/wal/wal_manager.cpp:121:21 (infinity+0x78114b) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #4 infinity::Storage@storage::SetStorageMode(infinity::StorageMode@wal_manager) /home/huikong/Code/work/infinity2/src/storage/storage.cpp:234:23 (infinity+0x616fdf) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #5 infinity::InfinityContext@infinity_context::ChangeRole(infinity::NodeRole, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, unsigned short) /home/huikong/Code/work/infinity2/src/main/infinity_context.cpp:130:59 (infinity+0x555052) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #6 infinity::InfinityContext@infinity_context::Init(std::__1::shared_ptr<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>> const&, bool, infinity::DefaultConfig@config*) /home/huikong/Code/work/infinity2/src/main/infinity_context.cpp:92:39 (infinity+0x5544d5) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)
    #7 main /home/huikong/Code/work/infinity2/src/bin/infinity_main.cpp:178:33 (infinity+0x3ebaa6) (BuildId: db6082e0c937d766a608c493a49d106482ff760d)

SUMMARY: ThreadSanitizer: data race (/home/huikong/Code/work/infinity2/build/Debug/src/infinity+0x3ea67d) (BuildId: db6082e0c937d766a608c493a49d106482ff760d) in operator delete(void*)
==================
small-turtle-1 commented 4 days ago

2221