-
Notifications
You must be signed in to change notification settings - Fork 8.3k
ThreadSanitizer: signal-unsafe call inside of a signal handler #76444
Copy link
Copy link
Closed
Labels
testingSpecial issue with list of bugs found by CISpecial issue with list of bugs found by CI
Description
Describe the bug
❯ llvm-addr2line-18 -afiCe ./clickhouse.1 0x7e06b68 0x102ce021 0x7d8c7a5 0xfe742d5 0xfe755fc 0x7e1117d 0x1acc101f 0x1acb329a 0x1ac87795 0x1ad7b95c
0x7e06b68
operator delete(void*, unsigned long)
??:0
0x102ce021
void std::__1::__libcpp_operator_delete[abi:ne190107]<void*, unsigned long>(void*, unsigned long)
./build_docker/./contrib/llvm-project/libcxx/include/new:274
void std::__1::__do_deallocate_handle_size[abi:ne190107]<>(void*, unsigned long)
./build_docker/./contrib/llvm-project/libcxx/include/new:298
std::__1::__libcpp_deallocate[abi:ne190107](void*, unsigned long, unsigned long)
./build_docker/./contrib/llvm-project/libcxx/include/new:311
std::__1::allocator<std::__1::array<void*, 45ul>>::deallocate[abi:ne190107](std::__1::array<void*, 45ul>*, unsigned long)
./build_docker/./contrib/llvm-project/libcxx/include/__memory/allocator.h:132
std::__1::allocator_traits<std::__1::allocator<std::__1::array<void*, 45ul>>>::deallocate[abi:ne190107](std::__1::allocator<std::__1::array<void*, 45ul>>&, std::__1::array<void*, 45ul>*, unsigned long)
./build_docker/./contrib/llvm-project/libcxx/include/__memory/allocator_traits.h:312
std::__1::vector<std::__1::array<void*, 45ul>, std::__1::allocator<std::__1::array<void*, 45ul>>>::__destroy_vector::operator()[abi:ne190107]()
./build_docker/./contrib/llvm-project/libcxx/include/vector:532
std::__1::vector<std::__1::array<void*, 45ul>, std::__1::allocator<std::__1::array<void*, 45ul>>>::~vector[abi:ne190107]()
./build_docker/./contrib/llvm-project/libcxx/include/vector:541
signalHandler(int, siginfo_t*, void*)
./build_docker/./src/Common/SignalHandlers.cpp:116
0x7d8c7a5
__tsan::CallUserSignalHandler(__tsan::ThreadState*, bool, bool, int, __sanitizer::__sanitizer_siginfo*, void*)
crtstuff.c:0
0xfe742d5
DB::abortOnFailedAssertion(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, void* const*, unsigned long, unsigned long)
./build_docker/./src/Common/Exception.cpp:48
0xfe755fc
DB::handle_error_code(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, int, bool, std::__1::vector<void*, std::__1::allocator<void*>> const&)
./build_docker/./src/Common/Exception.cpp:70
DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool)
./build_docker/./src/Common/Exception.cpp:112
0x7e1117d
DB::Exception::Exception(PreformattedMessage&&, int)
??:0
0x1acc101f
DB::Exception::Exception<Coordination::Error const&>(int, FormatStringHelperImpl<std::__1::type_identity<Coordination::Error const&>::type>, Coordination::Error const&)
./build_docker/./src/Common/Exception.h:131
0x1acb329a
DB::ObjectStorageQueueOrderedFileMetadata::tryAcquireBucket(std::__1::filesystem::path const&, unsigned long const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<Poco::Logger>)
./build_docker/./src/Storages/ObjectStorageQueue/ObjectStorageQueueOrderedFileMetadata.cpp:247
0x1ac87795
DB::ObjectStorageQueueMetadata::tryAcquireBucket(unsigned long const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&)
./build_docker/./src/Storages/ObjectStorageQueue/ObjectStorageQueueMetadata.cpp:225
0x1ad7b95c
DB::ObjectStorageQueueSource::FileIterator::getNextKeyFromAcquiredBucket(unsigned long)
./build_docker/./src/Storages/ObjectStorageQueue/ObjectStorageQueueSource.cpp:652
for some reason we construct/destruct vector in the handler:
ClickHouse/src/Common/SignalHandlers.cpp
Line 116 in e2ce4e1
| writeVectorBinary(Exception::enable_job_stack_trace ? Exception::getThreadFramePointers() : std::vector<StackTrace::FramePointers>{}, out); |
How to reproduce
No response
Error message and/or stacktrace
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
testingSpecial issue with list of bugs found by CISpecial issue with list of bugs found by CI