Repository navigation
Closed
Description
Describe the bug
Probably related to #88752 cc @Avogar
How to reproduce
Trying to reproduce it based on the fuzzer logs
Error message and/or stacktrace
2025.11.06 18:01:12.864215 [ 2182 ] {881ba2df-1bf9-4076-86ef-0c8986442fbc} <Fatal> : Logical error: 'Bad cast from type DB::ColumnReplicated to DB::ColumnMap'.
2025.11.06 18:01:12.880875 [ 2182 ] {881ba2df-1bf9-4076-86ef-0c8986442fbc} <Fatal> : Stack trace (when copying this message, always include the lines below):
2025.11.06 18:06:14.046679 [ 626 ] {} <Fatal> BaseDaemon: ########## Short fault info ############
2025.11.06 18:06:14.046692 [ 626 ] {} <Fatal> BaseDaemon: (version 25.11.1.1531, build id: 37C620532CE1DF7C64CCEFCB9410A4D26DE895DD, git hash: 38e9df26e144c47781729c14edc0c6706364be5b, architecture: x86_64) (from thread 2182) Received signal 6
2025.11.06 18:06:14.046699 [ 626 ] {} <Fatal> BaseDaemon: Signal description: Aborted
2025.11.06 18:06:14.046701 [ 626 ] {} <Fatal> BaseDaemon:
2025.11.06 18:06:14.046724 [ 626 ] {} <Fatal> BaseDaemon: Stack trace: 0x00007f42b68d89fd 0x00007f42b6884476 0x00007f42b686a7f3 0x0000558bf4e7b5d9 0x0000558bf4e7c070 0x0000558bf4e7c3b9 0x0000558bed4130ce 0x0000558bed412ad1 0x0000558bed410e36 0x0000558bf8b4a55b 0x0000558bfa88539c 0x0000558bfeeffbc5 0x0000558bfed9c90d 0x0000558bfea31210 0x0000558bfea22f98 0x0000558bfea235a9 0x0000558bfea24643 0x0000558bf4fbf753 0x0000558bf4fc5e26 0x0000558bf4fbcbe6 0x0000558bf4fc3600 0x00007f42b68d6ac3 0x00007f42b69688c0
2025.11.06 18:06:14.046734 [ 626 ] {} <Fatal> BaseDaemon: ########################################
2025.11.06 18:06:14.046830 [ 626 ] {} <Fatal> BaseDaemon: (version 25.11.1.1531, build id: 37C620532CE1DF7C64CCEFCB9410A4D26DE895DD, git hash: 38e9df26e144c47781729c14edc0c6706364be5b) (from thread 2182) (query_id: 881ba2df-1bf9-4076-86ef-0c8986442fbc) (query: SELECT DISTINCT firstNonDefault(`__table3`.`dummy`, `__table4`.`dummy`) AS `dummy`, `__table4`.`isNotNull(map(assumeNotNull(isNull(3)), NULL))` AS `isNotNull(map(assumeNotNull(isNull(3)), NULL))`, `__table4`.`isNotDistinctFrom(3, isZeroOrNull(isNotNull(3)))` AS `isNotDistinctFrom(3, isZeroOrNull(isNotNull(3)))` FROM `system`.`one` AS `__table3` ALL FULL OUTER JOIN (SELECT DISTINCT `__table5`.`dummy` AS `dummy`, `__table5`.`isNotNull(map(assumeNotNull(isNull(3)), NULL))` AS `isNotNull(map(assumeNotNull(isNull(3)), NULL))`, _CAST(0, 'UInt8') AS `isNotDistinctFrom(3, isZeroOrNull(isNotNull(3)))` FROM (SELECT `__table6`.`dummy` AS `dummy`, _CAST(1, 'UInt8') AS `isNotNull(map(assumeNotNull(isNull(3)), NULL))` FROM remote('127.0.0.3') AS `__table6`) AS `__table5`) AS `__table4` USING (`dummy`) LEFT ARRAY JOIN [equals(materialize(3), _CAST(1, 'UInt8'))] AS `__array_join_exp_2` LEFT ARRAY JOIN map(_CAST(0, 'UInt8'), materialize(2), _CAST(0, 'UInt8'), _CAST('1', 'UInt128')) AS `__array_join_exp_1` GROUP BY materialize(1), `__table4`.`isNotNull(map(assumeNotNull(isNull(3)), NULL))`, firstNonDefault(`__table3`.`dummy`, `__table4`.`dummy`), `__table4`.`isNotDistinctFrom(3, isZeroOrNull(isNotNull(3)))`, `__table4`.`isNotNull(map(assumeNotNull(isNull(3)), NULL))` WITH CUBE) Received signal Aborted (6)
2025.11.06 18:06:14.046866 [ 626 ] {} <Fatal> BaseDaemon:
2025.11.06 18:06:14.046899 [ 626 ] {} <Fatal> BaseDaemon: Stack trace: 0x00007f42b68d89fd 0x00007f42b6884476 0x00007f42b686a7f3 0x0000558bf4e7b5d9 0x0000558bf4e7c070 0x0000558bf4e7c3b9 0x0000558bed4130ce 0x0000558bed412ad1 0x0000558bed410e36 0x0000558bf8b4a55b 0x0000558bfa88539c 0x0000558bfeeffbc5 0x0000558bfed9c90d 0x0000558bfea31210 0x0000558bfea22f98 0x0000558bfea235a9 0x0000558bfea24643 0x0000558bf4fbf753 0x0000558bf4fc5e26 0x0000558bf4fbcbe6 0x0000558bf4fc3600 0x00007f42b68d6ac3 0x00007f42b69688c0
2025.11.06 18:06:14.046964 [ 626 ] {} <Fatal> BaseDaemon: 3. pthread_kill@@GLIBC_2.34 @ 0x00000000000969fd
2025.11.06 18:06:14.047008 [ 626 ] {} <Fatal> BaseDaemon: 4. raise @ 0x0000000000042476
2025.11.06 18:06:14.047051 [ 626 ] {} <Fatal> BaseDaemon: 5. __lgamma_r_finite@GLIBC_2.15 @ 0x00000000000287f3
2025.11.06 18:06:14.071858 [ 626 ] {} <Fatal> BaseDaemon: 6. /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/src/Common/Exception.cpp:52: DB::abortOnFailedAssertion(String const&, void* const*, unsigned long, unsigned long) @ 0x0000000014fba5d9
2025.11.06 18:06:14.088379 [ 626 ] {} <Fatal> BaseDaemon: 7. /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/src/Common/Exception.cpp:85: DB::handle_error_code(String const&, std::basic_string_view<char, std::char_traits<char>>, int, bool, std::vector<void*, std::allocator<void*>> const&) @ 0x0000000014fbb070
2025.11.06 18:06:14.104461 [ 626 ] {} <Fatal> BaseDaemon: 8. /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/src/Common/Exception.cpp:136: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x0000000014fbb3b9
2025.11.06 18:06:14.121216 [ 626 ] {} <Fatal> BaseDaemon: 9. /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/src/Common/Exception.h:123: DB::Exception::Exception(String&&, int, String, bool) @ 0x000000000d5520ce
2025.11.06 18:06:14.136745 [ 626 ] {} <Fatal> BaseDaemon: 10. /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/src/Common/Exception.h:58: DB::Exception::Exception(PreformattedMessage&&, int) @ 0x000000000d551ad1
2025.11.06 18:06:14.147241 [ 626 ] {} <Fatal> BaseDaemon: 11. /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/src/Common/Exception.h:141: DB::Exception::Exception<String, String>(int, FormatStringHelperImpl<std::type_identity<String>::type, std::type_identity<String>::type>, String&&, String&&) @ 0x000000000d54fe36
2025.11.06 18:06:14.446938 [ 626 ] {} <Fatal> BaseDaemon: 12. /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/src/Common/typeid_cast.h:31: T typeid_cast<DB::ColumnMap const&, DB::IColumn const>(DB::IColumn const&) @ 0x0000000018c8955b
2025.11.06 18:06:14.458888 [ 626 ] {} <Fatal> BaseDaemon: 13. /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/src/Interpreters/ArrayJoinAction.cpp:271: DB::ArrayJoinResultIterator::next() @ 0x000000001a9c439c
2025.11.06 18:06:14.465989 [ 626 ] {} <Fatal> BaseDaemon: 14. /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/src/Processors/Transforms/ArrayJoinTransform.cpp:57: DB::ArrayJoinTransform::generate() @ 0x000000001f03ebc5
2025.11.06 18:06:14.472861 [ 626 ] {} <Fatal> BaseDaemon: 15. /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/src/Processors/IInflatingTransform.cpp:78: DB::IInflatingTransform::work() @ 0x000000001eedb90d
2025.11.06 18:06:14.476849 [ 626 ] {} <Fatal> BaseDaemon: 16.0. inlined from /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/src/Processors/Executors/ExecutionThreadContext.cpp:53: DB::executeJob(DB::ExecutingGraph::Node*, DB::ReadProgressCallback*)
2025.11.06 18:06:14.476871 [ 626 ] {} <Fatal> BaseDaemon: 16. /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/src/Processors/Executors/ExecutionThreadContext.cpp:102: DB::ExecutionThreadContext::executeTask() @ 0x000000001eb70210
2025.11.06 18:06:14.491146 [ 626 ] {} <Fatal> BaseDaemon: 17. /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/src/Processors/Executors/PipelineExecutor.cpp:351: DB::PipelineExecutor::executeStepImpl(unsigned long, DB::IAcquiredSlot*, std::atomic<bool>*) @ 0x000000001eb61f98
2025.11.06 18:06:14.505968 [ 626 ] {} <Fatal> BaseDaemon: 18. /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/src/Processors/Executors/PipelineExecutor.cpp:279: DB::PipelineExecutor::executeSingleThread(unsigned long, DB::IAcquiredSlot*) @ 0x000000001eb625a9
2025.11.06 18:06:14.522867 [ 626 ] {} <Fatal> BaseDaemon: 19.0. inlined from /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/src/Processors/Executors/PipelineExecutor.cpp:565: operator()
2025.11.06 18:06:14.522913 [ 626 ] {} <Fatal> BaseDaemon: 19.1. inlined from /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/contrib/llvm-project/libcxx/include/__type_traits/invoke.h:149: decltype(std::declval<DB::PipelineExecutor::spawnThreads(std::shared_ptr<DB::IAcquiredSlot>)::$_0&>()()) std::__invoke[abi:se190107]<DB::PipelineExecutor::spawnThreads(std::shared_ptr<DB::IAcquiredSlot>)::$_0&>(DB::PipelineExecutor::spawnThreads(std::shared_ptr<DB::IAcquiredSlot>)::$_0&)
2025.11.06 18:06:14.522931 [ 626 ] {} <Fatal> BaseDaemon: 19.2. inlined from /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/contrib/llvm-project/libcxx/include/__type_traits/invoke.h:224: void std::__invoke_void_return_wrapper<void, true>::__call[abi:se190107]<DB::PipelineExecutor::spawnThreads(std::shared_ptr<DB::IAcquiredSlot>)::$_0&>(DB::PipelineExecutor::spawnThreads(std::shared_ptr<DB::IAcquiredSlot>)::$_0&)
2025.11.06 18:06:14.522939 [ 626 ] {} <Fatal> BaseDaemon: 19.3. inlined from /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/contrib/llvm-project/libcxx/include/__functional/function.h:210: ?
2025.11.06 18:06:14.522950 [ 626 ] {} <Fatal> BaseDaemon: 19. /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/contrib/llvm-project/libcxx/include/__functional/function.h:610: ? @ 0x000000001eb63643
2025.11.06 18:06:14.533088 [ 626 ] {} <Fatal> BaseDaemon: 20.0. inlined from /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/contrib/llvm-project/libcxx/include/__functional/function.h:716: ?
2025.11.06 18:06:14.533112 [ 626 ] {} <Fatal> BaseDaemon: 20.1. inlined from /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/contrib/llvm-project/libcxx/include/__functional/function.h:989: ?
2025.11.06 18:06:14.533132 [ 626 ] {} <Fatal> BaseDaemon: 20. /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/src/Common/ThreadPool.cpp:802: ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::worker() @ 0x00000000150fe753
2025.11.06 18:06:14.543440 [ 626 ] {} <Fatal> BaseDaemon: 21.0. inlined from /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/contrib/llvm-project/libcxx/include/__type_traits/invoke.h:117: decltype(*std::declval<ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*&>().*std::declval<void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*&)()>()()) std::__invoke[abi:se190107]<void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*&)(), ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*&, void>(void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*&)(), ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*&)
2025.11.06 18:06:14.543480 [ 626 ] {} <Fatal> BaseDaemon: 21.1. inlined from /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/contrib/llvm-project/libcxx/include/tuple:1354: decltype(auto) std::__apply_tuple_impl[abi:se190107]<void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*&)(), std::tuple<ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*>&, 0ul>(void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*&)(), std::tuple<ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*>&, std::__tuple_indices<0ul>)
2025.11.06 18:06:14.543495 [ 626 ] {} <Fatal> BaseDaemon: 21.2. inlined from /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/contrib/llvm-project/libcxx/include/tuple:1358: decltype(auto) std::apply[abi:se190107]<void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*&)(), std::tuple<ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*>&>(void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*&)(), std::tuple<ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*>&)
2025.11.06 18:06:14.543506 [ 626 ] {} <Fatal> BaseDaemon: 21. /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/src/Common/ThreadPool.h:312: ThreadFromGlobalPoolImpl<false, true>::ThreadFromGlobalPoolImpl<void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*)(), ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*>(void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*&&)(), ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*&&)::'lambda'()::operator()() @ 0x0000000015104e26
2025.11.06 18:06:14.552060 [ 626 ] {} <Fatal> BaseDaemon: 22.0. inlined from /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/contrib/llvm-project/libcxx/include/__functional/function.h:716: ?
2025.11.06 18:06:14.552072 [ 626 ] {} <Fatal> BaseDaemon: 22.1. inlined from /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/contrib/llvm-project/libcxx/include/__functional/function.h:989: ?
2025.11.06 18:06:14.552083 [ 626 ] {} <Fatal> BaseDaemon: 22. /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/src/Common/ThreadPool.cpp:812: ThreadPoolImpl<std::thread>::ThreadFromThreadPool::worker() @ 0x00000000150fbbe6
2025.11.06 18:06:14.569239 [ 626 ] {} <Fatal> BaseDaemon: 23.0. inlined from /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/contrib/llvm-project/libcxx/include/__type_traits/invoke.h:117: decltype(*std::declval<ThreadPoolImpl<std::thread>::ThreadFromThreadPool*>().*std::declval<void (ThreadPoolImpl<std::thread>::ThreadFromThreadPool::*)()>()()) std::__invoke[abi:se190107]<void (ThreadPoolImpl<std::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::thread>::ThreadFromThreadPool*, void>(void (ThreadPoolImpl<std::thread>::ThreadFromThreadPool::*&&)(), ThreadPoolImpl<std::thread>::ThreadFromThreadPool*&&)
2025.11.06 18:06:14.569281 [ 626 ] {} <Fatal> BaseDaemon: 23.1. inlined from /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/contrib/llvm-project/libcxx/include/__thread/thread.h:192: void std::__thread_execute[abi:se190107]<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, void (ThreadPoolImpl<std::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::thread>::ThreadFromThreadPool*, 2ul>(std::tuple<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, void (ThreadPoolImpl<std::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::thread>::ThreadFromThreadPool*>&, std::__tuple_indices<2ul>)
2025.11.06 18:06:14.569298 [ 626 ] {} <Fatal> BaseDaemon: 23. /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/contrib/llvm-project/libcxx/include/__thread/thread.h:201: void* std::__thread_proxy[abi:se190107]<std::tuple<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, void (ThreadPoolImpl<std::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::thread>::ThreadFromThreadPool*>>(void*) @ 0x0000000015102600
2025.11.06 18:06:14.569332 [ 626 ] {} <Fatal> BaseDaemon: 24. start_thread @ 0x0000000000094ac3
2025.11.06 18:06:14.569350 [ 626 ] {} <Fatal> BaseDaemon: 25. __GI___clone3 @ 0x00000000001268c0
2025.11.06 18:06:14.569364 [ 626 ] {} <Fatal> BaseDaemon: Integrity check of the executable skipped because the reference checksum could not be read.
2025.11.06 18:06:16.376030 [ 626 ] {} <Fatal> BaseDaemon: Changed settings: max_block_size = 100001, receive_timeout = 10., receive_data_timeout_ms = 10000, totals_mode = 'before_having', allow_suspicious_low_cardinality_types = true, allow_suspicious_variant_types = true, group_by_two_level_threshold_bytes = 100000000, enable_memory_bound_merging_of_aggregation_results = false, log_queries = true, table_function_remote_max_addresses = 200, query_plan_join_swap_table = false, joined_subquery_requires_alias = false, max_rows_to_group_by = 100000, group_by_overflow_mode = 'any', max_bytes_before_external_group_by = 1000000, max_bytes_ratio_before_external_group_by = 0., max_execution_time = 3., max_execution_speed = 1, max_memory_usage = 10000000000, allow_introspection_functions = true, mutations_sync = 1, allow_materialized_view_with_bad_select = true, force_optimize_projection = true, allow_dynamic_type_in_join_keys = true, max_parallel_replicas = 2, cluster_for_parallel_replicas = 'test_cluster_one_shard_three_replicas_localhost', parallel_replicas_for_cluster_engines = false, allow_statistics_optimize = true, allow_experimental_statistics = true, allow_experimental_kusto_dialect = true
2025.11.06 18:06:16.384639 [ 626 ] {} <Fatal> BaseDaemon: Code: 210. DB::NetException: Connection reset by peer, while writing to socket ([::ffff:127.0.0.2]:9000 -> [::ffff:127.0.0.1]:35730). (NETWORK_ERROR), Stack trace (when copying this message, always include the lines below):
Activity
Algunenano commentedon Nov 7, 2025
Confirming it reproduces with the query itself, there is no data involved:
With
SETTINGS enable_lazy_columns_replication = 0there is no logical error.