-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Logical error: Invalid number of columns in chunk pushed to OutputPort with full_sorting_merge #86957
Copy link
Copy link
Closed
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasefuzzProblem found by one of the fuzzersProblem found by one of the fuzzers
Description
Describe what's wrong
Does it reproduce on the most recent release?
Yes
How to reproduce
Error message and/or stacktrace
2025.09.09 23:15:49.957955 [ 634 ] {bb0b7f48-4345-4aba-abfc-0fc25ac67f9d} <Debug> executeQuery: (from [::ffff:127.0.0.1]:54492) (query 26, line 98) SELECT * FROM (SELECT number, number, number, number, number FROM numbers(5)) AS t1 GLOBAL ASOF INNER JOIN (SELECT DISTINCT number, number, number FROM numbers(3, 8)) AS t2 USING (number) ORDER BY number DESC (stage: Complete)
2025.09.09 23:15:49.958299 [ 634 ] {bb0b7f48-4345-4aba-abfc-0fc25ac67f9d} <Trace> Planner: Query to stage Complete
2025.09.09 23:15:49.958337 [ 634 ] {bb0b7f48-4345-4aba-abfc-0fc25ac67f9d} <Trace> Planner: Query to stage Complete
2025.09.09 23:15:49.958424 [ 634 ] {bb0b7f48-4345-4aba-abfc-0fc25ac67f9d} <Trace> Planner: Query from stage FetchColumns to stage Complete
2025.09.09 23:15:49.958478 [ 634 ] {bb0b7f48-4345-4aba-abfc-0fc25ac67f9d} <Trace> Planner: Query to stage Complete
2025.09.09 23:15:49.958528 [ 634 ] {bb0b7f48-4345-4aba-abfc-0fc25ac67f9d} <Trace> Planner: Query from stage FetchColumns to stage Complete
2025.09.09 23:15:49.958593 [ 634 ] {bb0b7f48-4345-4aba-abfc-0fc25ac67f9d} <Trace> SortingStep: Adjusting memory limit before external sort with 22.95 GiB (ratio: 0.5, available system memory: 45.90 GiB)
2025.09.09 23:15:49.958608 [ 634 ] {bb0b7f48-4345-4aba-abfc-0fc25ac67f9d} <Trace> Planner: Query from stage FetchColumns to stage Complete
2025.09.09 23:15:49.958640 [ 634 ] {bb0b7f48-4345-4aba-abfc-0fc25ac67f9d} <Trace> SortingStep: Adjusting memory limit before external sort with 22.95 GiB (ratio: 0.5, available system memory: 45.90 GiB)
2025.09.09 23:15:49.958763 [ 634 ] {bb0b7f48-4345-4aba-abfc-0fc25ac67f9d} <Trace> FullSortingMergeJoin: Will use full sorting merge join
2025.09.09 23:15:49.959557 [ 1355 ] {bb0b7f48-4345-4aba-abfc-0fc25ac67f9d} <Fatal> : Logical error: 'Invalid number of columns in chunk pushed to OutputPort. Expected 7, found 8
Header: __table1.number UInt64 UInt64(size = 0), __table1.number UInt64 UInt64(size = 0), __table1.number UInt64 UInt64(size = 0), __table1.number UInt64 UInt64(size = 0), __table1.number UInt64 UInt64(size = 0), __table3.number UInt64 UInt64(size = 0), __table3.number UInt64 UInt64(size = 0)
Chunk: UInt64(size = 2) UInt64(size = 2) UInt64(size = 2) UInt64(size = 2) UInt64(size = 2) UInt64(size = 2) UInt64(size = 2) UInt64(size = 2)
'.
2025.09.09 23:15:49.974105 [ 1355 ] {bb0b7f48-4345-4aba-abfc-0fc25ac67f9d} <Fatal> : Stack trace (when copying this message, always include the lines below):
2025.09.09 23:21:36.416219 [ 1148 ] {BgSchPool::4039c3c3-1d98-4f73-84b5-2b2c9c7c7f4f} <Debug> CancellationChecker: Cancelling the task because of the timeout: 10000 ms, query_id: bb0b7f48-4345-4aba-abfc-0fc25ac67f9d
2025.09.09 23:21:36.418375 [ 627 ] {} <Fatal> BaseDaemon: ########## Short fault info ############
2025.09.09 23:21:36.418384 [ 627 ] {} <Fatal> BaseDaemon: (version 25.9.1.1, build id: 60E50CFBCDFC5B4E8F12C89C47F4BFE9C430D27D, git hash: 2135c1b701360e28a862eb743cc993dab272e58a, architecture: x86_64) (from thread 1355) Received signal 6
2025.09.09 23:21:36.418387 [ 627 ] {} <Fatal> BaseDaemon: Signal description: Aborted
2025.09.09 23:21:36.418389 [ 627 ] {} <Fatal> BaseDaemon:
2025.09.09 23:21:36.418406 [ 627 ] {} <Fatal> BaseDaemon: Stack trace: 0x00007fbe5ca2e9fd 0x00007fbe5c9da476 0x00007fbe5c9c07f3 0x000055938f4760dd 0x000055938f476b30 0x000055938f476e79 0x000055938805a10e 0x0000559388059b11 0x000055939642d7b6 0x000055939a78ea34 0x000055939a3bf11e 0x000055939a3b9a06 0x000055939a3b9ea9 0x000055939a3ba8c3 0x000055938f5c2ed3 0x000055938f5c95a6 0x000055938f5c0366 0x000055938f5c6d80 0x00007fbe5ca2cac3 0x00007fbe5cabe850
2025.09.09 23:21:36.418409 [ 627 ] {} <Fatal> BaseDaemon: ########################################
2025.09.09 23:21:36.418440 [ 627 ] {} <Fatal> BaseDaemon: (version 25.9.1.1, build id: 60E50CFBCDFC5B4E8F12C89C47F4BFE9C430D27D, git hash: 2135c1b701360e28a862eb743cc993dab272e58a) (from thread 1355) (query_id: bb0b7f48-4345-4aba-abfc-0fc25ac67f9d) (query: SELECT * FROM (SELECT number, number, number, number, number FROM numbers(5)) AS t1 GLOBAL ASOF INNER JOIN (SELECT DISTINCT number, number, number FROM numbers(3, 8)) AS t2 USING (number) ORDER BY number DESC) Received signal Aborted (6)
2025.09.09 23:21:36.418451 [ 627 ] {} <Fatal> BaseDaemon:
2025.09.09 23:21:36.418458 [ 627 ] {} <Fatal> BaseDaemon: Stack trace: 0x00007fbe5ca2e9fd 0x00007fbe5c9da476 0x00007fbe5c9c07f3 0x000055938f4760dd 0x000055938f476b30 0x000055938f476e79 0x000055938805a10e 0x0000559388059b11 0x000055939642d7b6 0x000055939a78ea34 0x000055939a3bf11e 0x000055939a3b9a06 0x000055939a3b9ea9 0x000055939a3ba8c3 0x000055938f5c2ed3 0x000055938f5c95a6 0x000055938f5c0366 0x000055938f5c6d80 0x00007fbe5ca2cac3 0x00007fbe5cabe850
2025.09.09 23:21:36.418496 [ 627 ] {} <Fatal> BaseDaemon: 3. __GI___pthread_kill @ 0x00000000000969fd
2025.09.09 23:21:36.418502 [ 627 ] {} <Fatal> BaseDaemon: 4. gsignal @ 0x0000000000042476
2025.09.09 23:21:36.418514 [ 627 ] {} <Fatal> BaseDaemon: 5. __lgamma_r_finite@GLIBC_2.15 @ 0x00000000000287f3
2025.09.09 23:21:36.434612 [ 627 ] {} <Fatal> BaseDaemon: 6. ./ci/tmp/build/./src/Common/Exception.cpp:51: DB::abortOnFailedAssertion(String const&, void* const*, unsigned long, unsigned long) @ 0x00000000144c10dd
2025.09.09 23:21:36.445801 [ 627 ] {} <Fatal> BaseDaemon: 7. ./ci/tmp/build/./src/Common/Exception.cpp:84: DB::handle_error_code(String const&, std::basic_string_view<char, std::char_traits<char>>, int, bool, std::vector<void*, std::allocator<void*>> const&) @ 0x00000000144c1b30
2025.09.09 23:21:36.457591 [ 627 ] {} <Fatal> BaseDaemon: 8. ./ci/tmp/build/./src/Common/Exception.cpp:135: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x00000000144c1e79
2025.09.09 23:21:36.470143 [ 627 ] {} <Fatal> BaseDaemon: 9. ./src/Common/Exception.h:123: DB::Exception::Exception(String&&, int, String, bool) @ 0x000000000d0a510e
2025.09.09 23:21:36.482287 [ 627 ] {} <Fatal> BaseDaemon: 10. ./src/Common/Exception.h:58: DB::Exception::Exception(PreformattedMessage&&, int) @ 0x000000000d0a4b11
2025.09.09 23:21:36.501109 [ 627 ] {} <Fatal> BaseDaemon: 11. ./src/Common/Exception.h:141: DB::Exception::Exception<unsigned long, unsigned long, String, String>(int, FormatStringHelperImpl<std::type_identity<unsigned long>::type, std::type_identity<unsigned long>::type, std::type_identity<String>::type, std::type_identity<String>::type>, unsigned long&&, unsigned long&&, String&&, String&&) @ 0x000000001b4787b6
2025.09.09 23:21:36.512336 [ 627 ] {} <Fatal> BaseDaemon: 12.0. inlined from ./src/Processors/Port.h:421: DB::OutputPort::pushData(DB::Port::State::Data)
2025.09.09 23:21:36.512371 [ 627 ] {} <Fatal> BaseDaemon: 12.1. inlined from ./src/Processors/Port.h:409: DB::OutputPort::push(DB::Chunk)
2025.09.09 23:21:36.512377 [ 627 ] {} <Fatal> BaseDaemon: 12. ./ci/tmp/build/./src/Processors/Merges/IMergingTransform.cpp:173: DB::IMergingTransformBase::prepare() @ 0x000000001f7d9a34
2025.09.09 23:21:36.525965 [ 627 ] {} <Fatal> BaseDaemon: 13. ./ci/tmp/build/./src/Processors/Executors/ExecutingGraph.cpp:281: DB::ExecutingGraph::updateNode(unsigned long, std::queue<DB::ExecutingGraph::Node*, std::deque<DB::ExecutingGraph::Node*, AllocatorWithMemoryTracking<DB::ExecutingGraph::Node*>>>&, std::queue<DB::ExecutingGraph::Node*, std::deque<DB::ExecutingGraph::Node*, AllocatorWithMemoryTracking<DB::ExecutingGraph::Node*>>>&) @ 0x000000001f40a11e
2025.09.09 23:21:36.542480 [ 627 ] {} <Fatal> BaseDaemon: 14. ./ci/tmp/build/./src/Processors/Executors/PipelineExecutor.cpp:370: DB::PipelineExecutor::executeStepImpl(unsigned long, DB::IAcquiredSlot*, std::atomic<bool>*) @ 0x000000001f404a06
2025.09.09 23:21:36.558086 [ 627 ] {} <Fatal> BaseDaemon: 15. ./ci/tmp/build/./src/Processors/Executors/PipelineExecutor.cpp:278: DB::PipelineExecutor::executeSingleThread(unsigned long, DB::IAcquiredSlot*) @ 0x000000001f404ea9
2025.09.09 23:21:36.576233 [ 627 ] {} <Fatal> BaseDaemon: 16.0. inlined from ./ci/tmp/build/./src/Processors/Executors/PipelineExecutor.cpp:561: operator()
2025.09.09 23:21:36.576278 [ 627 ] {} <Fatal> BaseDaemon: 16.1. inlined from ./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.09.09 23:21:36.576292 [ 627 ] {} <Fatal> BaseDaemon: 16.2. inlined from ./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.09.09 23:21:36.576305 [ 627 ] {} <Fatal> BaseDaemon: 16.3. inlined from ./contrib/llvm-project/libcxx/include/__functional/function.h:210: ?
2025.09.09 23:21:36.576315 [ 627 ] {} <Fatal> BaseDaemon: 16. ./contrib/llvm-project/libcxx/include/__functional/function.h:610: ? @ 0x000000001f4058c3
2025.09.09 23:21:36.587234 [ 627 ] {} <Fatal> BaseDaemon: 17.0. inlined from ./contrib/llvm-project/libcxx/include/__functional/function.h:716: ?
2025.09.09 23:21:36.587271 [ 627 ] {} <Fatal> BaseDaemon: 17.1. inlined from ./contrib/llvm-project/libcxx/include/__functional/function.h:989: ?
2025.09.09 23:21:36.587278 [ 627 ] {} <Fatal> BaseDaemon: 17. ./ci/tmp/build/./src/Common/ThreadPool.cpp:802: ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::worker() @ 0x000000001460ded3
2025.09.09 23:21:36.598947 [ 627 ] {} <Fatal> BaseDaemon: 18.0. inlined from ./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.09.09 23:21:36.599001 [ 627 ] {} <Fatal> BaseDaemon: 18.1. inlined from ./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.09.09 23:21:36.599025 [ 627 ] {} <Fatal> BaseDaemon: 18.2. inlined from ./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.09.09 23:21:36.599050 [ 627 ] {} <Fatal> BaseDaemon: 18. ./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()() @ 0x00000000146145a6
2025.09.09 23:21:36.608872 [ 627 ] {} <Fatal> BaseDaemon: 19.0. inlined from ./contrib/llvm-project/libcxx/include/__functional/function.h:716: ?
2025.09.09 23:21:36.608905 [ 627 ] {} <Fatal> BaseDaemon: 19.1. inlined from ./contrib/llvm-project/libcxx/include/__functional/function.h:989: ?
2025.09.09 23:21:36.608931 [ 627 ] {} <Fatal> BaseDaemon: 19. ./ci/tmp/build/./src/Common/ThreadPool.cpp:812: ThreadPoolImpl<std::thread>::ThreadFromThreadPool::worker() @ 0x000000001460b366
2025.09.09 23:21:36.627807 [ 627 ] {} <Fatal> BaseDaemon: 20.0. inlined from ./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.09.09 23:21:36.627881 [ 627 ] {} <Fatal> BaseDaemon: 20.1. inlined from ./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.09.09 23:21:36.627891 [ 627 ] {} <Fatal> BaseDaemon: 20. ./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*) @ 0x0000000014611d80
2025.09.09 23:21:36.627934 [ 627 ] {} <Fatal> BaseDaemon: 21. start_thread @ 0x0000000000094ac3
2025.09.09 23:21:36.627963 [ 627 ] {} <Fatal> BaseDaemon: 22. __clone3 @ 0x0000000000126850
2025.09.09 23:21:36.627988 [ 627 ] {} <Fatal> BaseDaemon: Integrity check of the executable skipped because the reference checksum could not be read.
2025.09.09 23:21:36.872290 [ 627 ] {} <Fatal> BaseDaemon: Changed settings: receive_timeout = 10., receive_data_timeout_ms = 10000, allow_suspicious_low_cardinality_types = true, log_queries = true, table_function_remote_max_addresses = 200, query_plan_join_swap_table = false, query_plan_optimize_join_order_limit = 0, max_execution_time = 10., join_algorithm = 'full_sorting_merge', max_rows_in_set_to_optimize_join = 0, max_memory_usage = 10000000000, send_logs_level = 'fatal', allow_introspection_functions = true, allow_experimental_parallel_reading_from_replicas = 0, parallel_replicas_for_cluster_engines = false, allow_experimental_analyzer = true
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasefuzzProblem found by one of the fuzzersProblem found by one of the fuzzers