Skip to content

Logical error: 'x <= VAR_UINT_MAX' #48497

@nikitamikhaylov

Description

@nikitamikhaylov

Looks similar to what was fixed here #48412, but stacktrace looks different.

Describe the bug
https://s3.amazonaws.com/clickhouse-test-reports/0/9331c6c260543680715ac7247be7160ff3e28f30/fuzzer_astfuzzerubsan/report.html

2023.04.05 19:57:44.370257 [ 463 ] {92a56583-85ad-4ae9-9ade-5f677f6733c8} <Fatal> : Logical error: 'x <= VAR_UINT_MAX'.
2023.04.05 19:57:44.370549 [ 473 ] {} <Fatal> BaseDaemon: ########################################
2023.04.05 19:57:44.370586 [ 473 ] {} <Fatal> BaseDaemon: (version 23.4.1.1 (official build), build id: 6576470D94A85AED12718D8D942FD56995BA756C) (from thread 463) (query_id: 92a56583-85ad-4ae9-9ade-5f677f6733c8) (query: SELECT avgMerge(x * 257) FROM (SELECT x * 7, 0, avgState(b) AS x FROM mult_aggregation__fuzz_1) GROUP BY x * 9223372036854775807 WITH TOTALS) Received signal Aborted (6)
2023.04.05 19:57:44.370617 [ 473 ] {} <Fatal> BaseDaemon: 
2023.04.05 19:57:44.370667 [ 473 ] {} <Fatal> BaseDaemon: Stack trace: 0x7f12695e700b 0x7f12695c6859 0x2352ab2b 0x2358a443 0x2ff3d74f 0x2ee4f764 0x2ed0f515 0x2eca9202 0x2ecaef85 0x316dc7fa 0x316d7e66 0x312e2ff4 0x312d2ac3 0x312d411f 0x23639f18 0x2363dd64 0x7f126979e609 0x7f12696c3133
2023.04.05 19:57:44.370716 [ 473 ] {} <Fatal> BaseDaemon: 3. gsignal @ 0x7f12695e700b in ?
2023.04.05 19:57:44.370753 [ 473 ] {} <Fatal> BaseDaemon: 4. abort @ 0x7f12695c6859 in ?
2023.04.05 19:57:44.394451 [ 473 ] {} <Fatal> BaseDaemon: 5. ./build_docker/./src/Common/Exception.cpp:48: DB::abortOnFailedAssertion(String const&) @ 0x2352ab2b in /workspace/clickhouse
2023.04.05 19:57:44.398552 [ 473 ] {} <Fatal> BaseDaemon: 6.1. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/string:1499: String::__is_long[abi:v15000]() const
2023.04.05 19:57:44.398573 [ 473 ] {} <Fatal> BaseDaemon: 6.2. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/string:2333: ~basic_string
2023.04.05 19:57:44.398605 [ 473 ] {} <Fatal> BaseDaemon: 6. ./build_docker/./src/IO/VarInt.h:210: DB::writeVarUInt(unsigned long, DB::WriteBuffer&) @ 0x2358a443 in /workspace/clickhouse
2023.04.05 19:57:44.421664 [ 473 ] {} <Fatal> BaseDaemon: 7. ./build_docker/./src/Columns/ColumnAggregateFunction.cpp:532: DB::ColumnAggregateFunction::serializeValueIntoArena(unsigned long, DB::Arena&, char const*&) const @ 0x2ff3d74f in /workspace/clickhouse
2023.04.05 19:57:44.647592 [ 473 ] {} <Fatal> BaseDaemon: 8.1. inlined from ./build_docker/./src/Interpreters/AggregationCommon.h:276: DB::serializeKeysToPoolContiguous(unsigned long, unsigned long, std::vector<DB::IColumn const*, std::allocator<DB::IColumn const*>> const&, DB::Arena&)
2023.04.05 19:57:44.647641 [ 473 ] {} <Fatal> BaseDaemon: 8.2. inlined from ./build_docker/./src/Common/ColumnsHashing.h:708: DB::ColumnsHashing::HashMethodSerialized<PairNoInit<StringRef, char*>, char*>::getKeyHolder(unsigned long, DB::Arena&) const
2023.04.05 19:57:44.647664 [ 473 ] {} <Fatal> BaseDaemon: 8.3. inlined from ./build_docker/./src/Common/ColumnsHashingImpl.h:169: DB::ColumnsHashing::columns_hashing_impl::EmplaceResultImpl<char*> DB::ColumnsHashing::columns_hashing_impl::HashMethodBase<DB::ColumnsHashing::HashMethodSerialized<PairNoInit<StringRef, char*>, char*>, PairNoInit<StringRef, char*>, char*, false, false, false>::emplaceKey<HashMapTable<StringRef, HashMapCellWithSavedHash<StringRef, char*, DefaultHash<StringRef>, HashTableNoState>, DefaultHash<StringRef>, HashTableGrowerWithPrecalculation<8ul>, Allocator<true, true>>>(HashMapTable<StringRef, HashMapCellWithSavedHash<StringRef, char*, DefaultHash<StringRef>, HashTableNoState>, DefaultHash<StringRef>, HashTableGrowerWithPrecalculation<8ul>, Allocator<true, true>>&, unsigned long, DB::Arena&)
2023.04.05 19:57:44.647679 [ 473 ] {} <Fatal> BaseDaemon: 8. ./build_docker/./src/Interpreters/Aggregator.cpp:1199: void DB::Aggregator::executeImplBatch<false, false, false, DB::AggregationMethodSerialized<HashMapTable<StringRef, HashMapCellWithSavedHash<StringRef, char*, DefaultHash<StringRef>, HashTableNoState>, DefaultHash<StringRef>, HashTableGrowerWithPrecalculation<8ul>, Allocator<true, true>>>>(DB::AggregationMethodSerialized<HashMapTable<StringRef, HashMapCellWithSavedHash<StringRef, char*, DefaultHash<StringRef>, HashTableNoState>, DefaultHash<StringRef>, HashTableGrowerWithPrecalculation<8ul>, Allocator<true, true>>>&, DB::AggregationMethodSerialized<HashMapTable<StringRef, HashMapCellWithSavedHash<StringRef, char*, DefaultHash<StringRef>, HashTableNoState>, DefaultHash<StringRef>, HashTableGrowerWithPrecalculation<8ul>, Allocator<true, true>>>::State&, DB::Arena*, unsigned long, unsigned long, DB::Aggregator::AggregateFunctionInstruction*, char*) const @ 0x2ee4f764 in /workspace/clickhouse
2023.04.05 19:57:44.810341 [ 473 ] {} <Fatal> BaseDaemon: 9. ./build_docker/./src/Interpreters/Aggregator.cpp:1085: void DB::Aggregator::executeImpl<DB::AggregationMethodSerialized<HashMapTable<StringRef, HashMapCellWithSavedHash<StringRef, char*, DefaultHash<StringRef>, HashTableNoState>, DefaultHash<StringRef>, HashTableGrowerWithPrecalculation<8ul>, Allocator<true, true>>>>(DB::AggregationMethodSerialized<HashMapTable<StringRef, HashMapCellWithSavedHash<StringRef, char*, DefaultHash<StringRef>, HashTableNoState>, DefaultHash<StringRef>, HashTableGrowerWithPrecalculation<8ul>, Allocator<true, true>>>&, DB::Arena*, unsigned long, unsigned long, std::vector<DB::IColumn const*, std::allocator<DB::IColumn const*>>&, DB::Aggregator::AggregateFunctionInstruction*, bool, char*) const @ 0x2ed0f515 in /workspace/clickhouse
2023.04.05 19:57:44.971048 [ 473 ] {} <Fatal> BaseDaemon: 10. ./build_docker/./src/Interpreters/Aggregator.cpp:0: DB::Aggregator::executeImpl(DB::AggregatedDataVariants&, unsigned long, unsigned long, std::vector<DB::IColumn const*, std::allocator<DB::IColumn const*>>&, DB::Aggregator::AggregateFunctionInstruction*, bool, char*) const @ 0x2eca9202 in /workspace/clickhouse
2023.04.05 19:57:45.259407 [ 473 ] {} <Fatal> BaseDaemon: 11. ./build_docker/./src/Interpreters/Aggregator.cpp:1594: DB::Aggregator::executeOnBlock(std::vector<COW<DB::IColumn>::immutable_ptr<DB::IColumn>, std::allocator<COW<DB::IColumn>::immutable_ptr<DB::IColumn>>>, unsigned long, unsigned long, DB::AggregatedDataVariants&, std::vector<DB::IColumn const*, std::allocator<DB::IColumn const*>>&, std::vector<std::vector<DB::IColumn const*, std::allocator<DB::IColumn const*>>, std::allocator<std::vector<DB::IColumn const*, std::allocator<DB::IColumn const*>>>>&, bool&) const @ 0x2ecaef85 in /workspace/clickhouse
2023.04.05 19:57:45.310488 [ 473 ] {} <Fatal> BaseDaemon: 12. ./build_docker/./src/Processors/Transforms/AggregatingTransform.cpp:0: DB::AggregatingTransform::consume(DB::Chunk) @ 0x316dc7fa in /workspace/clickhouse
2023.04.05 19:57:45.359874 [ 473 ] {} <Fatal> BaseDaemon: 13.1. inlined from ./build_docker/./src/Processors/Chunk.h:32: ~Chunk
2023.04.05 19:57:45.359914 [ 473 ] {} <Fatal> BaseDaemon: 13. ./build_docker/./src/Processors/Transforms/AggregatingTransform.cpp:627: DB::AggregatingTransform::work() @ 0x316d7e66 in /workspace/clickhouse
2023.04.05 19:57:45.368235 [ 473 ] {} <Fatal> BaseDaemon: 14.1. inlined from ./build_docker/./src/Processors/Executors/ExecutionThreadContext.cpp:50: DB::executeJob(DB::ExecutingGraph::Node*, DB::ReadProgressCallback*)
2023.04.05 19:57:45.368265 [ 473 ] {} <Fatal> BaseDaemon: 14. ./build_docker/./src/Processors/Executors/ExecutionThreadContext.cpp:92: DB::ExecutionThreadContext::executeTask() @ 0x312e2ff4 in /workspace/clickhouse
2023.04.05 19:57:45.392265 [ 473 ] {} <Fatal> BaseDaemon: 15. ./build_docker/./src/Processors/Executors/PipelineExecutor.cpp:246: DB::PipelineExecutor::executeStepImpl(unsigned long, std::atomic<bool>*) @ 0x312d2ac3 in /workspace/clickhouse
2023.04.05 19:57:45.418535 [ 473 ] {} <Fatal> BaseDaemon: 16.1. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:833: operator()
2023.04.05 19:57:45.418581 [ 473 ] {} <Fatal> BaseDaemon: 16.2. inlined from ./build_docker/./base/base/../base/scope_guard.h:99: BasicScopeGuard<DB::PipelineExecutor::spawnThreads()::$_0::operator()() const::'lambda'()>::invoke()
2023.04.05 19:57:45.418596 [ 473 ] {} <Fatal> BaseDaemon: 16.3. inlined from ./build_docker/./base/base/../base/scope_guard.h:48: ~BasicScopeGuard
2023.04.05 19:57:45.418609 [ 473 ] {} <Fatal> BaseDaemon: 16.4. inlined from ./build_docker/./src/Processors/Executors/PipelineExecutor.cpp:345: operator()
2023.04.05 19:57:45.418630 [ 473 ] {} <Fatal> BaseDaemon: 16.5. 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::spawnThreads()::$_0&)
2023.04.05 19:57:45.418647 [ 473 ] {} <Fatal> BaseDaemon: 16.6. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/tuple:1789: decltype(auto) std::__apply_tuple_impl[abi:v15000]<DB::PipelineExecutor::spawnThreads()::$_0&, std::tuple<>&>(DB::PipelineExecutor::spawnThreads()::$_0&, std::tuple<>&, std::__tuple_indices<>)
2023.04.05 19:57:45.418663 [ 473 ] {} <Fatal> BaseDaemon: 16.7. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/tuple:1798: decltype(auto) std::apply[abi:v15000]<DB::PipelineExecutor::spawnThreads()::$_0&, std::tuple<>&>(DB::PipelineExecutor::spawnThreads()::$_0&, std::tuple<>&)
2023.04.05 19:57:45.418676 [ 473 ] {} <Fatal> BaseDaemon: 16.8. inlined from ./build_docker/./src/Common/ThreadPool.h:227: operator()
2023.04.05 19:57:45.418694 [ 473 ] {} <Fatal> BaseDaemon: 16.9. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/__functional/invoke.h:394: decltype(std::declval<DB::PipelineExecutor::spawnThreads()::$_0>()()) std::__invoke[abi:v15000]<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&>(DB::PipelineExecutor::spawnThreads()::$_0&&)
2023.04.05 19:57:45.418712 [ 473 ] {} <Fatal> BaseDaemon: 16.10. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/__functional/invoke.h:479: void std::__invoke_void_return_wrapper<void, true>::__call<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&>(ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&)
2023.04.05 19:57:45.418730 [ 473 ] {} <Fatal> BaseDaemon: 16.11. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:235: std::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()>::operator()[abi:v15000]()
2023.04.05 19:57:45.418775 [ 473 ] {} <Fatal> BaseDaemon: 16. ./build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:716: void std::__function::__policy_invoker<void ()>::__call_impl<std::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()>>(std::__function::__policy_storage const*) @ 0x312d411f in /workspace/clickhouse
2023.04.05 19:57:45.434074 [ 473 ] {} <Fatal> BaseDaemon: 17.1. inlined from ./build_docker/./base/base/../base/wide_integer_impl.h:789: 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&)
2023.04.05 19:57:45.434102 [ 473 ] {} <Fatal> BaseDaemon: 17.2. inlined from ./build_docker/./base/base/../base/wide_integer_impl.h:1456: bool wide::operator==<128ul, unsigned int, 128ul, unsigned int>(wide::integer<128ul, unsigned int> const&, wide::integer<128ul, unsigned int> const&)
2023.04.05 19:57:45.434146 [ 473 ] {} <Fatal> BaseDaemon: 17.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
2023.04.05 19:57:45.434184 [ 473 ] {} <Fatal> BaseDaemon: 17.4. inlined from ./build_docker/./src/Common/OpenTelemetryTraceContext.h:65: DB::OpenTelemetry::Span::isTraceEnabled() const
2023.04.05 19:57:45.434218 [ 473 ] {} <Fatal> BaseDaemon: 17. ./build_docker/./src/Common/ThreadPool.cpp:398: ThreadPoolImpl<std::thread>::worker(std::__list_iterator<std::thread, void*>) @ 0x23639f18 in /workspace/clickhouse
2023.04.05 19:57:45.452635 [ 473 ] {} <Fatal> BaseDaemon: 18. ./build_docker/./src/Common/ThreadPool.cpp:0: 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<void ()>, long, std::optional<unsigned long>, bool)::'lambda0'()>>(void*) @ 0x2363dd64 in /workspace/clickhouse
2023.04.05 19:57:45.452662 [ 473 ] {} <Fatal> BaseDaemon: 19. ? @ 0x7f126979e609 in ?
2023.04.05 19:57:45.452700 [ 473 ] {} <Fatal> BaseDaemon: 20. clone @ 0x7f12696c3133 in ?
2023.04.05 19:57:45.791347 [ 473 ] {} <Fatal> BaseDaemon: Integrity check of the executable successfully passed (checksum: F536079FBC0204E2D109B608A819402C)
2023.04.05 19:58:00.387705 [ 139 ] {} <Fatal> Application: Child process was terminated by signal 6.

Metadata

Metadata

Assignees

Labels

fuzzProblem found by one of the fuzzerstestingSpecial issue with list of bugs found by CI

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions