ClickHouse / ClickHouse/ClickHouse
UBsan report MergeTreeData.h in 22.12 branch
- Dominant language
- C++
- Stars
- 49.9k
- Forks
- 9k
- Avg merge
- 21h 32m
- Merged PRs (30d)
- 515
Description
Details
```
../src/Storages/MergeTree/MergeTreeData.h:1199:54: runtime error: member call on address 0x7f2b4c0b1dc0 which does not point to an object of type 'DB::IMergeTreeDataPart'
0x7f2b4c0b1dc0: note: object has a possibly invalid vptr: abs(offset to top) too big
00 00 00 00 20 54 59 04 2b 7f 00 00 d0 08 00 04 2b 7f 00 00 65 72 73 69 6f 6e 3a 20 31 0a 31 20
^~~~~~~~~~~~~~~~~~~~~~~
possibly invalid vptr
#0 0x2e27ca42 in DB::MergeTreeData::modifyPartState(std::__1::shared_ptr const&, DB::MergeTreeDataPartState) build_docker/../src/Storages/MergeTree/MergeTreeData.h:1199:54
#1 0x2e24b5b0 in DB::MergeTreeData::Transaction::commit(std::__1::unique_lock*) build_docker/../src/Storages/MergeTree/MergeTreeData.cpp:5380:9
#2 0x2dd61c96 in DB::StorageReplicatedMergeTree::checkPartChecksumsAndCommit(DB::MergeTreeData::Transaction&, std::__1::shared_ptr const&, std::__1::optional) build_docker/../src/Storages/StorageReplicatedMergeTree.cpp:1462:32
#3 0x2dd85009 in DB::StorageReplicatedMergeTree::fetchPart(std::__1::basic_string, std::__1::allocator> const&, std::__1::shared_ptr const&, std::__1::basic_string, std::__1::allocator> const&, bool, unsigned long, std::__1::shared_ptr, bool, std::__1::basic_string, std::__1::allocator>) build_docker/../src/Storages/StorageReplicatedMergeTree.cpp:4050:30
#4 0x2dd7803b in DB::StorageReplicatedMergeTree::executeFetch(DB::ReplicatedMergeTreeLogEntry&, bool) build_docker/../src/Storages/StorageReplicatedMergeTree.cpp:1769:18
#5 0x2dd662c5 in DB::StorageReplicatedMergeTree::executeLogEntry(DB::ReplicatedMergeTreeLogEntry&) build_docker/../src/Storages/StorageReplicatedMergeTree.cpp:1610:20
#6 0x2de2b620 in DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr)::$_12::operator()(std::__1::shared_ptr&) const build_docker/../src/Storages/StorageReplicatedMergeTree.cpp:3014:20
#7 0x2de2b620 in decltype(std::declval)::$_12&>()(std::declval&>())) std::__1::__invoke[abi:v15000])::$_12&, std::__1::shared_ptr&>(DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr)::$_12&, std::__1::shared_ptr&) build_docker/../contrib/llvm-project/libcxx/include/__functional/invoke.h:394:23
#8 0x2de2b620 in bool std::__1::__invoke_void_return_wrapper::__call)::$_12&, std::__1::shared_ptr&>(DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr)::$_12&, std::__1::shared_ptr&) build_docker/../contrib/llvm-project/libcxx/include/__functional/invoke.h:470:16
#9 0x2de2b620 in std::__1::__function::__default_alloc_func)::$_12, bool (std::__1::shared_ptr&)>::operator()[abi:v15000](std::__1::shared_ptr&) build_docker/../contrib/llvm-project/libcxx/include/__functional/function.h:235:12
#10 0x2de2b620 in bool std::__1::__function::__policy_invoker&)>::__call_impl)::$_12, bool (std::__1::shared_ptr&)>>(std::__1::__function::__policy_storage const*, std::__1::shared_ptr&) build_docker/../contrib/llvm-project/libcxx/include/__functional/function.h:716:16
#11 0x2e4d4823 in std::__1::__function::__policy_func&)>::operator()[abi:v15000](std::__1::shared_ptr&) const build_docker/../contrib/llvm-project/libcxx/include/__functional/function.h:848:16
#12 0x2e4d4823 in std::__1::function&)>::operator()(std::__1::shared_ptr&) const build_docker/../contrib/llvm-project/libcxx/include/__functional/function.h:1187:12
#13 0x2e4d4823 in DB::ReplicatedMergeTreeQueue::processEntry(std::__1::function ()>, std::__1::shared_ptr&, std::__1::function&)>) build_docker/../src/Storages/MergeTree/ReplicatedMergeTreeQueue.cpp:1708:13
#14 0x2dda87bc in DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr) build_docker/../src/Storages/StorageReplicatedMergeTree.cpp:3010:18
#15 0x2de2ca17 in DB::StorageReplicatedMergeTree::scheduleDataProcessingJob(DB::BackgroundJobsAssignee&)::$_13::operator()() build_docker/../src/Storages/StorageReplicatedMergeTree.cpp:3071:24
#16 0x2de2ca17 in decltype(std::declval()()) std::__1::__invoke[abi:v15000](DB::StorageReplicatedMergeTree::scheduleDataProcessingJob(DB::BackgroundJobsAssignee&)::$_13&) build_docker/../contrib/llvm-project/libcxx/include/__functional/invoke.h:394:23
#17 0x2de2ca17 in bool std::__1::__invoke_void_return_wrapper::__call(DB::StorageReplicatedMergeTree::scheduleDataProcessingJob(DB::BackgroundJobsAssignee&)::$_13&) build_docker/../contrib/llvm-project/libcxx/include/__functional/invoke.h:470:16
#18 0x2de2ca17 in std::__1::__function::__default_alloc_func::operator()[abi:v15000]() build_docker/../contrib/llvm-project/libcxx/include/__functional/function.h:235:12
#19 0x2de2ca17 in bool std::__1::__function::__policy_invoker::__call_impl>(std::__1::__function::__policy_storage const*) build_docker/../contrib/llvm-project/libcxx/include/__functional/function.h:716:16
#20 0x2de59667 in std::__1::__function::__policy_func::operator()[abi:v15000]() const build_docker/../contrib/llvm-project/libcxx/include/__functional/function.h:848:16
#21 0x2de59667 in std::__1::function::operator()() const build_docker/../contrib/llvm-project/libcxx/include/__functional/function.h:1187:12
#22 0x2de59667 in DB::ExecutableLambdaAdapter::executeStep() build_docker/../src/Storages/MergeTree/IExecutableTask.h:59:15
#23 0x2e1da383 in DB::MergeTreeBackgroundExecutor::routine(std::__1::shared_ptr) build_docker/../src/Storages/MergeTree/MergeTreeBackgroundExecutor.cpp:137:42
#24 0x2e1db730 in DB::MergeTreeBackgroundExecutor::threadFunction() build_docker/../src/Storages/MergeTree/MergeTreeBackgroundExecutor.cpp:259:13
#25 0x21339eb9 in std::__1::__function::__policy_func::operator()[abi:v15000]() const build_docker/../contrib/llvm-project/libcxx/include/__functional/function.h:848:16
#26 0x21339eb9 in std::__1::function::operator()() const build_docker/../contrib/llvm-project/libcxx/include/__functional/function.h:1187:12
#27 0x21339eb9 in ThreadPoolImpl>::worker(std::__1::__list_iterator, void*>) build_docker/../src/Common/ThreadPool.cpp:294:17
#28 0x2133e06e in void ThreadPoolImpl>::scheduleImpl(std::__1::function, long, std::__1::optional, bool)::'lambda0'()::operator()() const build_docker/../src/Common/ThreadPool.cpp:144:73
#29 0x2133e06e in decltype(std::declval()()) std::__1::__invoke[abi:v15000]>::scheduleImpl(std::__1::function, long, std::__1::optional, bool)::'lambda0'()&>(void&&) build_docker/../contrib/llvm-project/libcxx/include/__functional/invoke.h:394:23
#30 0x2133e06e in decltype(auto) std::__1::__apply_tuple_impl[abi:v15000]>::scheduleImpl(std::__1::function, long, std::__1::optional, bool)::'lambda0'()&, std::__1::tuple<>&>(void&&, std::__1::tuple<>&, std::__1::__tuple_indices<>) build_docker/../contrib/llvm-project/libcxx/include/tuple:1789:1
#31 0x2133e06e in decltype(auto) std::__1::apply[abi:v15000]>::scheduleImpl(std::__1::function, long, std::__1::optional, bool)::'lambda0'()&, std::__1::tuple<>&>(void&&, std::__1::tuple<>&) build_docker/../contrib/llvm-project/libcxx/include/tuple:1798:1
#32 0x2133e06e in ThreadFromGlobalPoolImpl::ThreadFromGlobalPoolImpl>::scheduleImpl(std::__1::function, long, std::__1::optional, bool)::'lambda0'()>(void&&)::'lambda'()::operator()() build_docker/../src/Common/ThreadPool.h:196:13
#33 0x21337fb9 in std::__1::__function::__policy_func::operator()[abi:v15000]() const build_docker/../contrib/llvm-project/libcxx/include/__functional/function.h:848:16
#34 0x21337fb9 in std::__1::function::operator()() const build_docker/../contrib/llvm-project/libcxx/include/__functional/function.h:1187:12
#35 0x21337fb9 in ThreadPoolImpl::worker(std::__1::__list_iterator) build_docker/../src/Common/ThreadPool.cpp:294:17
#36 0x2133bae3 in void ThreadPoolImpl::scheduleImpl(std::__1::function, long, std::__1::optional, bool)::'lambda0'()::operator()() const build_docker/../src/Common/ThreadPool.cpp:144:73
#37 0x2133bae3 in decltype(std::declval()()) std::__1::__invoke[abi:v15000]::scheduleImpl(std::__1::function, long, std::__1::optional, bool)::'lambda0'()>(void&&) build_docker/../contrib/llvm-project/libcxx/include/__functional/invoke.h:394:23
#38 0x2133bae3 in void std::__1::__thread_execute[abi:v15000]>, void ThreadPoolImpl::scheduleImpl(std::__1::function, long, std::__1::optional, bool)::'lambda0'()>(std::__1::tuple::scheduleImpl(std::__1::function, long, std::__1::optional, bool)::'lambda0'()>&, std::__1::__tuple_indices<>) build_docker/../contrib/llvm-project/libcxx/include/thread:284:5
#39 0x2133bae3 in void* std::__1::__thread_proxy[abi:v15000]>, void ThreadPoolImpl::scheduleImpl(std::__1::function, long, std::__1::optional, bool)::'lambda0'()>>(void*) build_docker/../contrib/llvm-project/libcxx/include/thread:295:5
#40 0x7f2ca933c608 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x8608) (BuildId: 7b4536f41cdaa5888408e82d0836e33dcf436466)
#41 0x7f2ca9261132 in __clone (/lib/x86_64-linux-gnu/libc.so.6+0x11f132) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../src/Storages/MergeTree/MergeTreeData.h:1199:54 in
```
_Originally posted by in https://github.com/ClickHouse/ClickHouse/issues/44274#issuecomment-1377225751_
Contributor guide
Assessment
This issue has not been assessed yet.