Skip to content
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

Logical error: Read unexpected size. #51592

Closed
qoega opened this issue Jun 29, 2023 · 1 comment
Closed

Logical error: Read unexpected size. #51592

qoega opened this issue Jun 29, 2023 · 1 comment
Assignees
Labels
fuzz Problem found by one of the fuzzers

Comments

@qoega
Copy link
Member

qoega commented Jun 29, 2023

https://s3.amazonaws.com/clickhouse-test-reports/51499/fe6031e480fd4ae3db018a379e67a9d2f1c04480/stress_test__ubsan_.html

[ 3576 ] {05340c1f-f3f3-4507-91d2-f691ea9f34e1} <Fatal> : Logical error: \'Read unexpected size. File size: 25485, file segment path: /var/lib/clickhouse/caches/s3_cache/ad8/ad856c66e493b5c16ad19e0cb95b6a85/0, impl size: 29367, impl path: /var/lib/clickhouse/caches/s3_cache/ad8/ad856c66e493b5c16ad19
 [ 17363 ] {} <Fatal> BaseDaemon: ########################################
 [ 17363 ] {} <Fatal> BaseDaemon: (version 23.6.1.1, build id: 342CC7D31A8CCBB7B8F321BBDC555C8C158821A5, git hash: dd9646c50689f6d12fac7504bbb81be400e3426d) (from thread 3576) (query_id: 05340c1f-f3f3-4507-91d2-f691ea9f34e1) (query: SELECT count() FROM test.view;) Received signal Aborted (6)
 [ 17363 ] {} <Fatal> BaseDaemon: 
 [ 17363 ] {} <Fatal> BaseDaemon: Stack trace: 0x00007fd328cc000b 0x00007fd328c9f859 0x000055c7d8bd7428 0x000055c7d8bd7d8e 0x000055c7e4ac986b 0x000055c7e4ac141e 0x000055c7e4abb00f 0x000055c7cc5662d9 0x000055c7e4aa5a53 0x000055c7e4aa4607 0x000055c7cc5662d9 0x000055c7cc566115 0x000055c7cc959df4 0x0000
 [ 17363 ] {} <Fatal> BaseDaemon: 3. gsignal @ 0x00007fd328cc000b in ?
 [ 17363 ] {} <Fatal> BaseDaemon: 4. abort @ 0x00007fd328c9f859 in ?
 [ 17363 ] {} <Fatal> BaseDaemon: 5. ./build_docker/./src/Common/Exception.cpp:49: DB::abortOnFailedAssertion(String const&) @ 0x0000000037834428 in /usr/bin/clickhouse
 [ 17363 ] {} <Fatal> BaseDaemon: 6. ./build_docker/./src/Common/Exception.cpp:93: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x0000000037834d8e in /usr/bin/clickhouse
 [ 17363 ] {} <Fatal> BaseDaemon: 7.1. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/string:1499: String::__is_long[abi:v15000]() const
 [ 17363 ] {} <Fatal> BaseDaemon: 7.2. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/string:2333: ~basic_string
 [ 17363 ] {} <Fatal> BaseDaemon: 7.3. inlined from ./build_docker/./src/Common/Exception.h:42: ~MessageMasked
 [ 17363 ] {} <Fatal> BaseDaemon: 7.4. inlined from ./build_docker/./src/Common/Exception.h:54: Exception
 [ 17363 ] {} <Fatal> BaseDaemon: 7. ./build_docker/./src/Common/Exception.h:81: DB::Exception::Exception<unsigned long, String&, unsigned long, String, String>(int, FormatStringHelperImpl<std::type_identity<unsigned long>::type, std::type_identity<String&>::type, std::type_identity<unsigned long>::
 [ 17363 ] {} <Fatal> BaseDaemon: 8. ./build_docker/./src/Disks/IO/CachedOnDiskReadBufferFromFile.cpp:0: DB::CachedOnDiskReadBufferFromFile::nextImplStep() @ 0x000000004371e41e in /usr/bin/clickhouse
 [ 17363 ] {} <Fatal> BaseDaemon: 9. ./build_docker/./src/Disks/IO/CachedOnDiskReadBufferFromFile.cpp:784: DB::CachedOnDiskReadBufferFromFile::nextImpl() @ 0x000000004371800f in /usr/bin/clickhouse
 [ 17363 ] {} <Fatal> BaseDaemon: 10. DB::ReadBuffer::next() @ 0x000000002b1c32d9 in /usr/bin/clickhouse
 [ 17363 ] {} <Fatal> BaseDaemon: 11. ./build_docker/./src/Disks/IO/ReadBufferFromRemoteFSGather.cpp:0: DB::ReadBufferFromRemoteFSGather::readImpl() @ 0x0000000043702a53 in /usr/bin/clickhouse
 [ 17363 ] {} <Fatal> BaseDaemon: 12. ./build_docker/./src/Disks/IO/ReadBufferFromRemoteFSGather.cpp:157: DB::ReadBufferFromRemoteFSGather::nextImpl() @ 0x0000000043701607 in /usr/bin/clickhouse
 [ 17363 ] {} <Fatal> BaseDaemon: 13. DB::ReadBuffer::next() @ 0x000000002b1c32d9 in /usr/bin/clickhouse
 [ 17363 ] {} <Fatal> BaseDaemon: 14. DB::ReadBuffer::read(char*, unsigned long) @ 0x000000002b1c3115 in /usr/bin/clickhouse
 [ 17363 ] {} <Fatal> BaseDaemon: 15. DB::ReadBuffer::readStrict(char*, unsigned long) @ 0x000000002b5b6df4 in /usr/bin/clickhouse
 [ 17363 ] {} <Fatal> BaseDaemon: 16. ./build_docker/./src/Compression/CompressedReadBufferBase.cpp:0: DB::CompressedReadBufferBase::readCompressedData(unsigned long&, unsigned long&, bool) @ 0x0000000043e624a8 in /usr/bin/clickhouse
 [ 17363 ] {} <Fatal> BaseDaemon: 17. ./build_docker/./src/Compression/CompressedReadBufferFromFile.cpp:122: DB::CompressedReadBufferFromFile::readBig(char*, unsigned long) @ 0x0000000043e67cb8 in /usr/bin/clickhouse
 [ 17363 ] {} <Fatal> BaseDaemon: 18. ./build_docker/./src/DataTypes/Serializations/SerializationNumber.cpp:154: DB::SerializationNumber<unsigned int>::deserializeBinaryBulk(DB::IColumn&, DB::ReadBuffer&, unsigned long, double) const @ 0x00000000441dd8dd in /usr/bin/clickhouse
 [ 17363 ] {} <Fatal> BaseDaemon: 19.1. inlined from ./build_docker/./contrib/boost/boost/smart_ptr/intrusive_ptr.hpp:140: intrusive_ptr<DB::IColumn>
 [ 17363 ] {} <Fatal> BaseDaemon: 19.2. inlined from ./build_docker/./src/Common/COW.h:144: immutable_ptr<DB::IColumn>
 [ 17363 ] {} <Fatal> BaseDaemon: 19. ./build_docker/./src/DataTypes/Serializations/ISerialization.cpp:133: DB::ISerialization::deserializeBinaryBulkWithMultipleStreams(COW<DB::IColumn>::immutable_ptr<DB::IColumn>&, unsigned long, DB::ISerialization::DeserializeBinaryBulkSettings&, std::shared_ptr<D
 [ 17363 ] {} <Fatal> BaseDaemon: 20. ./build_docker/./src/Storages/MergeTree/MergeTreeReaderWide.cpp:0: DB::MergeTreeReaderWide::readData(DB::NameAndTypePair const&, std::shared_ptr<DB::ISerialization const> const&, COW<DB::IColumn>::immutable_ptr<DB::IColumn>&, unsigned long, bool, unsigned long, 
 [ 17363 ] {} <Fatal> BaseDaemon: 21. ./build_docker/./src/Storages/MergeTree/MergeTreeReaderWide.cpp:159: DB::MergeTreeReaderWide::readRows(unsigned long, unsigned long, bool, unsigned long, std::vector<COW<DB::IColumn>::immutable_ptr<DB::IColumn>, std::allocator<COW<DB::IColumn>::immutable_ptr<DB:
 [ 17363 ] {} <Fatal> BaseDaemon: 22. ./build_docker/./src/Storages/MergeTree/MergeTreeRangeReader.cpp:107: DB::MergeTreeRangeReader::DelayedStream::readRows(std::vector<COW<DB::IColumn>::immutable_ptr<DB::IColumn>, std::allocator<COW<DB::IColumn>::immutable_ptr<DB::IColumn>>>&, unsigned long) @ 0x0
 [ 17363 ] {} <Fatal> BaseDaemon: 23. ./build_docker/./src/Storages/MergeTree/MergeTreeRangeReader.cpp:179: DB::MergeTreeRangeReader::DelayedStream::finalize(std::vector<COW<DB::IColumn>::immutable_ptr<DB::IColumn>, std::allocator<COW<DB::IColumn>::immutable_ptr<DB::IColumn>>>&) @ 0x0000000046f41433
 [ 17363 ] {} <Fatal> BaseDaemon: 24.1. inlined from ./build_docker/./src/Storages/MergeTree/MergeTreeRangeReader.h:136: DB::MergeTreeRangeReader::DelayedStream::isFinished() const
 [ 17363 ] {} <Fatal> BaseDaemon: 24.2. inlined from ./build_docker/./src/Storages/MergeTree/MergeTreeRangeReader.cpp:293: DB::MergeTreeRangeReader::Stream::finalize(std::vector<COW<DB::IColumn>::immutable_ptr<DB::IColumn>, std::allocator<COW<DB::IColumn>::immutable_ptr<DB::IColumn>>>&)
 [ 17363 ] {} <Fatal> BaseDaemon: 24. ./build_docker/./src/Storages/MergeTree/MergeTreeRangeReader.cpp:1147: DB::MergeTreeRangeReader::startReadingChain(unsigned long, DB::MarkRanges&) @ 0x0000000046f4f5eb in /usr/bin/clickhouse
 [ 17363 ] {} <Fatal> BaseDaemon: 25. ./build_docker/./src/Storages/MergeTree/MergeTreeRangeReader.cpp:0: DB::MergeTreeRangeReader::read(unsigned long, DB::MarkRanges&) @ 0x0000000046f4ca34 in /usr/bin/clickhouse
 [ 17363 ] {} <Fatal> BaseDaemon: 26. ./build_docker/./src/Storages/MergeTree/MergeTreeBaseSelectProcessor.cpp:408: DB::IMergeTreeSelectAlgorithm::readFromPartImpl() @ 0x0000000046f3ac08 in /usr/bin/clickhouse
 [ 17363 ] {} <Fatal> BaseDaemon: 27. ./build_docker/./src/Storages/MergeTree/MergeTreeBaseSelectProcessor.cpp:451: DB::IMergeTreeSelectAlgorithm::readFromPart() @ 0x0000000046f3b877 in /usr/bin/clickhouse
 [ 17363 ] {} <Fatal> BaseDaemon: 28. ./build_docker/./src/Storages/MergeTree/MergeTreeBaseSelectProcessor.cpp:168: DB::IMergeTreeSelectAlgorithm::read() @ 0x0000000046f36a61 in /usr/bin/clickhouse
 [ 17363 ] {} <Fatal> BaseDaemon: 29. ./build_docker/./src/Storages/MergeTree/MergeTreeSource.cpp:0: DB::MergeTreeSource::tryGenerate() @ 0x0000000047e48cea in /usr/bin/clickhouse
 [ 17363 ] {} <Fatal> BaseDaemon: 30.1. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/optional:344: std::__optional_storage_base<DB::Chunk, false>::has_value[abi:v15000]() const
 [ 17363 ] {} <Fatal> BaseDaemon: 30.2. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/optional:998: std::optional<DB::Chunk>::operator bool[abi:v15000]() const
 [ 17363 ] {} <Fatal> BaseDaemon: 30. ./build_docker/./src/Processors/ISource.cpp:94: DB::ISource::work() @ 0x00000000474dfb36 in /usr/bin/clickhouse
 [ 17363 ] {} <Fatal> BaseDaemon: 31.1. inlined from ./build_docker/./src/Processors/Executors/ExecutionThreadContext.cpp:50: DB::executeJob(DB::ExecutingGraph::Node*, DB::ReadProgressCallback*)
 [ 17363 ] {} <Fatal> BaseDaemon: 31. ./build_docker/./src/Processors/Executors/ExecutionThreadContext.cpp:92: DB::ExecutionThreadContext::executeTask() @ 0x000000004750a290 in /usr/bin/clickhouse
 [ 17363 ] {} <Fatal> BaseDaemon: 32. ./build_docker/./src/Processors/Executors/PipelineExecutor.cpp:255: DB::PipelineExecutor::executeStepImpl(unsigned long, std::atomic<bool>*) @ 0x00000000474f94db in /usr/bin/clickhouse
 [ 17363 ] {} <Fatal> BaseDaemon: 33.1. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:833: std::shared_ptr<DB::ThreadGroup>::operator bool[abi:v15000]() const
 [ 17363 ] {} <Fatal> BaseDaemon: 33.2. inlined from ./build_docker/./src/Processors/Executors/PipelineExecutor.cpp:332: operator()
 [ 17363 ] {} <Fatal> BaseDaemon: 33.3. inlined from ./build_docker/./base/base/../base/scope_guard.h:99: BasicScopeGuard<DB::PipelineExecutor::spawnThreads()::$_0::operator()() const::\'lambda\'()>::invoke()
 [ 17363 ] {} <Fatal> BaseDaemon: 33.4. inlined from ./build_docker/./base/base/../base/scope_guard.h:48: ~BasicScopeGuard
 [ 17363 ] {} <Fatal> BaseDaemon: 33.5. inlined from ./build_docker/./src/Processors/Executors/PipelineExecutor.cpp:351: operator()
 [ 17363 ] {} <Fatal> BaseDaemon: 33.6. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/__functional/invoke.h:394: decltype(std::declval<DB::PipelineExecutor::spawnThreads()::$_0&>()()) std::__invoke[abi:v15000]<DB::PipelineExecutor::spawnThreads()::$_0&>(DB::PipelineExecutor::spaw
 [ 17363 ] {} <Fatal> BaseDaemon: 33.7. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/__functional/invoke.h:479: void std::__invoke_void_return_wrapper<void, true>::__call<DB::PipelineExecutor::spawnThreads()::$_0&>(DB::PipelineExecutor::spawnThreads()::$_0&)
 [ 17363 ] {} <Fatal> BaseDaemon: 33.8. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:235: std::__function::__default_alloc_func<DB::PipelineExecutor::spawnThreads()::$_0, void ()>::operator()[abi:v15000]()
 [ 17363 ] {} <Fatal> BaseDaemon: 33. ./build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:716: void std::__function::__policy_invoker<void ()>::__call_impl<std::__function::__default_alloc_func<DB::PipelineExecutor::spawnThreads()::$_0, void ()>>(std::__function::__policy_st
 [ 17363 ] {} <Fatal> BaseDaemon: 34.1. inlined from ./build_docker/./base/base/../base/wide_integer_impl.h:796: bool wide::integer<128ul, unsigned int>::_impl::operator_eq<wide::integer<128ul, unsigned int>>(wide::integer<128ul, unsigned int> const&, wide::integer<128ul, unsigned int> const&)
 [ 17363 ] {} <Fatal> BaseDaemon: 34.2. inlined from ./build_docker/./base/base/../base/wide_integer_impl.h:1463: bool wide::operator==<128ul, unsigned int, 128ul, unsigned int>(wide::integer<128ul, unsigned int> const&, wide::integer<128ul, unsigned int> const&)
 [ 17363 ] {} <Fatal> BaseDaemon: 34.3. inlined from ./build_docker/./base/base/../base/strong_typedef.h:42: StrongTypedef<wide::integer<128ul, unsigned int>, DB::UUIDTag>::operator==(StrongTypedef<wide::integer<128ul, unsigned int>, DB::UUIDTag> const&) const
 [ 17363 ] {} <Fatal> BaseDaemon: 34.4. inlined from ./build_docker/./src/Common/OpenTelemetryTraceContext.h:65: DB::OpenTelemetry::Span::isTraceEnabled() const
 [ 17363 ] {} <Fatal> BaseDaemon: 34. ./build_docker/./src/Common/ThreadPool.cpp:418: ThreadPoolImpl<ThreadFromGlobalPoolImpl<false>>::worker(std::__list_iterator<ThreadFromGlobalPoolImpl<false>, void*>) @ 0x0000000037985480 in /usr/bin/clickhouse
 [ 17363 ] {} <Fatal> BaseDaemon: 35. ./build_docker/./src/Common/ThreadPool.cpp:0: ThreadFromGlobalPoolImpl<false>::ThreadFromGlobalPoolImpl<void ThreadPoolImpl<ThreadFromGlobalPoolImpl<false>>::scheduleImpl<void>(std::function<void ()>, Priority, std::optional<unsigned long>, bool)::\'lambda0\'()>(v
 [ 17363 ] {} <Fatal> BaseDaemon: 36.1. inlined from ./build_docker/./base/base/../base/wide_integer_impl.h:796: bool wide::integer<128ul, unsigned int>::_impl::operator_eq<wide::integer<128ul, unsigned int>>(wide::integer<128ul, unsigned int> const&, wide::integer<128ul, unsigned int> const&)
 [ 17363 ] {} <Fatal> BaseDaemon: 36.2. inlined from ./build_docker/./base/base/../base/wide_integer_impl.h:1463: bool wide::operator==<128ul, unsigned int, 128ul, unsigned int>(wide::integer<128ul, unsigned int> const&, wide::integer<128ul, unsigned int> const&)
 [ 17363 ] {} <Fatal> BaseDaemon: 36.3. inlined from ./build_docker/./base/base/../base/strong_typedef.h:42: StrongTypedef<wide::integer<128ul, unsigned int>, DB::UUIDTag>::operator==(StrongTypedef<wide::integer<128ul, unsigned int>, DB::UUIDTag> const&) const
 [ 17363 ] {} <Fatal> BaseDaemon: 36.4. inlined from ./build_docker/./src/Common/OpenTelemetryTraceContext.h:65: DB::OpenTelemetry::Span::isTraceEnabled() const
 [ 17363 ] {} <Fatal> BaseDaemon: 36. ./build_docker/./src/Common/ThreadPool.cpp:418: ThreadPoolImpl<std::thread>::worker(std::__list_iterator<std::thread, void*>) @ 0x0000000037982340 in /usr/bin/clickhouse
 [ 17363 ] {} <Fatal> BaseDaemon: 37.1. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:302: std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>::reset[abi:v15000](std::__thread_struct*)
 [ 17363 ] {} <Fatal> BaseDaemon: 37.2. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:259: ~unique_ptr
 [ 17363 ] {} <Fatal> BaseDaemon: 37.3. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/tuple:265: ~__tuple_leaf
 [ 17363 ] {} <Fatal> BaseDaemon: 37.4. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/tuple:538: ~tuple
 [ 17363 ] {} <Fatal> BaseDaemon: 37.5. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:48: std::default_delete<std::tuple<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, void ThreadPoolImpl<std::thread>::scheduleImpl<void>(st
 [ 17363 ] {} <Fatal> BaseDaemon: 37.6. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:305: std::unique_ptr<std::tuple<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, void ThreadPoolImpl<std::thread>::scheduleImpl<void>(std::
 [ 17363 ] {} <Fatal> BaseDaemon: 37.7. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:259: ~unique_ptr
 [ 17363 ] {} <Fatal> BaseDaemon: 37. ./build_docker/./contrib/llvm-project/libcxx/include/thread:297: void* std::__thread_proxy[abi:v15000]<std::tuple<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, void ThreadPoolImpl<std::thread>::scheduleImpl<void>(std::function
 [ 17363 ] {} <Fatal> BaseDaemon: 38. ? @ 0x00007fd328e77609 in ?
 [ 17363 ] {} <Fatal> BaseDaemon: 39. __clone @ 0x00007fd328d9c133 in ?
 [ 17363 ] {} <Fatal> BaseDaemon: Integrity check of the executable skipped because the reference checksum could not be read.
 [ 17363 ] {} <Fatal> BaseDaemon: This ClickHouse version is not official and should be upgraded to the official build.
 [ 17363 ] {} <Fatal> BaseDaemon: Changed settings: min_compress_block_size = 906710, max_compress_block_size = 406017, max_block_size = 80055, max_insert_threads = 3, max_threads = 48, max_read_buffer_size = 760492, connect_timeout_with_failover_ms = 2000, connect_timeout_with_failover_secure_ms = 
 [ 1670 ] {} <Fatal> Application: Child process was terminated by signal 6.
@qoega qoega added the fuzz Problem found by one of the fuzzers label Jun 29, 2023
This was referenced Jun 29, 2023
@kssenii
Copy link
Member

kssenii commented Jun 29, 2023

Duplicate of #50468

@kssenii kssenii marked this as a duplicate of #50468 Jun 29, 2023
@kssenii kssenii closed this as completed Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fuzz Problem found by one of the fuzzers
Projects
None yet
Development

No branches or pull requests

2 participants