Skip to content

Logical error: 'std::exception. Code: 1001, type: std::out_of_range, e.what() = unordered_map::at: key not found #76006

@qoega

Description

@qoega

Describe the bug

https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=75870&sha=latest&name_0=PR&name_1=AST+fuzzer+%28debug%29

I expect it is the one:

CREATE TABLE t_missed_subcolumns (id UInt64, `n.a` Array(Nullable(String))) ENGINE = MergeTree ORDER BY id;

INSERT INTO t_missed_subcolumns VALUES (1, ['aaa', NULL]) (2, ['ccc']) (3, [NULL]);
ALTER TABLE t_missed_subcolumns ADD COLUMN `n.b` Array(Nullable(String));
INSERT INTO t_missed_subcolumns VALUES (4, [NULL, 'bbb'], ['ddd', NULL]), (5, [NULL], [NULL]);


SELECT n.b.size0 FROM t_missed_subcolumns ORDER BY toLowCardinality(materialize(30)) DESC NULLS LAST, id DESC NULLS LAST SETTINGS receive_timeout = 10., receive_data_timeout_ms = 10000, allow_suspicious_low_cardinality_types = true, log_queries = true, table_function_remote_max_addresses = 200, max_execution_time = 10., max_memory_usage = 10000000000, parallel_view_processing = false, allow_introspection_functions = true, allow_experimental_analyzer = true;

2025.02.12 16:18:22.772389 [ 1832 ] {26e5490f-c16d-404b-950a-71fb48f9df06} <Fatal> : Logical error: 'std::exception. Code: 1001, type: std::out_of_range, e.what() = unordered_map::at: key not found (version 25.2.1.1943), Stack trace:
2025.02.12 16:18:22.777249 [ 1832 ] {26e5490f-c16d-404b-950a-71fb48f9df06} <Fatal> : Stack trace (when copying this message, always include the lines below):
2025.02.12 16:23:11.405971 [ 1838 ] {} <Fatal> BaseDaemon: ########## Short fault info ############
2025.02.12 16:23:11.406013 [ 1838 ] {} <Fatal> BaseDaemon: (version 25.2.1.1943, build id: D44C8051144BDACECBDB1E8BC90252EC22CA6EED, git hash: ba741c48dc1a29b93ffe876a73994a537dd37a98, architecture: x86_64) (from thread 1832) Received signal 6
2025.02.12 16:23:11.406032 [ 1838 ] {} <Fatal> BaseDaemon: Signal description: Aborted
2025.02.12 16:23:11.406036 [ 1838 ] {} <Fatal> BaseDaemon:
2025.02.12 16:23:11.406045 [ 1838 ] {} <Fatal> BaseDaemon: Stack trace: 0x000000000d0bfea8 0x000000000d3a5da2 0x00007fac071ae520 0x00007fac072029fd 0x00007fac071ae476 0x00007fac071947f3 0x000000000d08d148 0x000000000d08d1cc 0x000000000d092ec4 0x000000000d091d16 0x000000000d0940ce 0x0000000014d4b084 0x0000000014d5a40a 0x000000000d15202f 0x000000000d157e60 0x00007fac07200ac3 0x00007fac07292850
2025.02.12 16:23:11.406058 [ 1838 ] {} <Fatal> BaseDaemon: ########################################
2025.02.12 16:23:11.406091 [ 1838 ] {} <Fatal> BaseDaemon: (version 25.2.1.1943, build id: D44C8051144BDACECBDB1E8BC90252EC22CA6EED, git hash: ba741c48dc1a29b93ffe876a73994a537dd37a98) (from thread 1832) (query_id: 26e5490f-c16d-404b-950a-71fb48f9df06) (query: SELECT n.b.size0 FROM t_missed_subcolumns ORDER BY toLowCardinality(materialize(30)) DESC NULLS LAST, id DESC NULLS LAST) Received signal Aborted (6)
2025.02.12 16:23:11.406108 [ 1838 ] {} <Fatal> BaseDaemon:
2025.02.12 16:23:11.406132 [ 1838 ] {} <Fatal> BaseDaemon: Stack trace: 0x000000000d0bfea8 0x000000000d3a5da2 0x00007fac071ae520 0x00007fac072029fd 0x00007fac071ae476 0x00007fac071947f3 0x000000000d08d148 0x000000000d08d1cc 0x000000000d092ec4 0x000000000d091d16 0x000000000d0940ce 0x0000000014d4b084 0x0000000014d5a40a 0x000000000d15202f 0x000000000d157e60 0x00007fac07200ac3 0x00007fac07292850
2025.02.12 16:23:11.423054 [ 1838 ] {} <Fatal> BaseDaemon: 0.0. inlined from /build/src/Common/StackTrace.cpp:381: StackTrace::tryCapture()
2025.02.12 16:23:11.423102 [ 1838 ] {} <Fatal> BaseDaemon: 0. /build/src/Common/StackTrace.cpp:350: StackTrace::StackTrace(ucontext_t const&) @ 0x000000000d0bfea8
2025.02.12 16:23:11.443412 [ 1838 ] {} <Fatal> BaseDaemon: 1. /build/src/Common/SignalHandlers.cpp:104: signalHandler(int, siginfo_t*, void*) @ 0x000000000d3a5da2
2025.02.12 16:23:11.443456 [ 1838 ] {} <Fatal> BaseDaemon: 2. ? @ 0x00007fac071ae520
2025.02.12 16:23:11.443470 [ 1838 ] {} <Fatal> BaseDaemon: 3. ? @ 0x00007fac072029fd
2025.02.12 16:23:11.443491 [ 1838 ] {} <Fatal> BaseDaemon: 4. ? @ 0x00007fac071ae476
2025.02.12 16:23:11.443501 [ 1838 ] {} <Fatal> BaseDaemon: 5. ? @ 0x00007fac071947f3
2025.02.12 16:23:11.472840 [ 1838 ] {} <Fatal> BaseDaemon: 6. /build/src/Common/Exception.cpp:48: DB::abortOnFailedAssertion(String const&, void* const*, unsigned long, unsigned long) @ 0x000000000d08d148
2025.02.12 16:23:11.492746 [ 1838 ] {} <Fatal> BaseDaemon: 7. /build/src/Common/Exception.cpp:54: ? @ 0x000000000d08d1cc
2025.02.12 16:23:11.514536 [ 1838 ] {} <Fatal> BaseDaemon: 8. /build/src/Common/Exception.cpp:503: DB::getCurrentExceptionMessageAndPattern(bool, bool, bool) @ 0x000000000d092ec4
2025.02.12 16:23:11.540244 [ 1838 ] {} <Fatal> BaseDaemon: 9. /build/src/Common/Exception.cpp:443: DB::getCurrentExceptionMessage(bool, bool, bool) @ 0x000000000d091d16
2025.02.12 16:23:11.563152 [ 1838 ] {} <Fatal> BaseDaemon: 10. /build/src/Common/Exception.cpp:687: DB::ExecutionStatus::fromCurrentException(String const&, bool) @ 0x000000000d0940ce
2025.02.12 16:23:11.577145 [ 1838 ] {} <Fatal> BaseDaemon: 11. /build/src/Processors/Executors/PipelineExecutor.cpp:140: DB::PipelineExecutor::execute(unsigned long, bool) @ 0x0000000014d4b084
2025.02.12 16:23:11.588217 [ 1838 ] {} <Fatal> BaseDaemon: 12.0. inlined from /build/src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:83: DB::threadFunction(DB::PullingAsyncPipelineExecutor::Data&, std::shared_ptr<DB::ThreadGroup>, unsigned long, bool)
2025.02.12 16:23:11.588255 [ 1838 ] {} <Fatal> BaseDaemon: 12.1. inlined from /build/src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:109: operator()
2025.02.12 16:23:11.588277 [ 1838 ] {} <Fatal> BaseDaemon: 12.2. inlined from /build/contrib/llvm-project/libcxx/include/__type_traits/invoke.h:344: decltype(std::declval<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&>()()) std::__invoke[abi:se180100]<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&)
2025.02.12 16:23:11.588288 [ 1838 ] {} <Fatal> BaseDaemon: 12.3. inlined from /build/contrib/llvm-project/libcxx/include/tuple:1424: decltype(auto) std::__apply_tuple_impl[abi:se180100]<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::tuple<>&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::tuple<>&, std::__tuple_indices<...>)
2025.02.12 16:23:11.588327 [ 1838 ] {} <Fatal> BaseDaemon: 12.4. inlined from /build/contrib/llvm-project/libcxx/include/tuple:1428: decltype(auto) std::apply[abi:se180100]<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::tuple<>&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::tuple<>&)
2025.02.12 16:23:11.588349 [ 1838 ] {} <Fatal> BaseDaemon: 12.5. inlined from /build/src/Common/ThreadPool.h:311: operator()
2025.02.12 16:23:11.588375 [ 1838 ] {} <Fatal> BaseDaemon: 12.6. inlined from /build/contrib/llvm-project/libcxx/include/__type_traits/invoke.h:344: decltype(std::declval<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>()()) std::__invoke[abi:se180100]<ThreadFromGlobalPoolImpl<true, true>::ThreadFromGlobalPoolImpl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)
2025.02.12 16:23:11.588400 [ 1838 ] {} <Fatal> BaseDaemon: 12.7. inlined from /build/contrib/llvm-project/libcxx/include/__type_traits/invoke.h:419: void std::__invoke_void_return_wrapper<void, true>::__call[abi:se180100]<ThreadFromGlobalPoolImpl<true, true>::ThreadFromGlobalPoolImpl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()&>(ThreadFromGlobalPoolImpl<true, true>::ThreadFromGlobalPoolImpl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()&)
2025.02.12 16:23:11.588416 [ 1838 ] {} <Fatal> BaseDaemon: 12.8. inlined from /build/contrib/llvm-project/libcxx/include/__functional/function.h:208: ?
2025.02.12 16:23:11.588437 [ 1838 ] {} <Fatal> BaseDaemon: 12. /build/contrib/llvm-project/libcxx/include/__functional/function.h:608: ? @ 0x0000000014d5a40a
2025.02.12 16:23:11.598135 [ 1838 ] {} <Fatal> BaseDaemon: 13.0. inlined from /build/contrib/llvm-project/libcxx/include/__functional/function.h:714: ?
2025.02.12 16:23:11.598174 [ 1838 ] {} <Fatal> BaseDaemon: 13.1. inlined from /build/contrib/llvm-project/libcxx/include/__functional/function.h:981: ?
2025.02.12 16:23:11.598191 [ 1838 ] {} <Fatal> BaseDaemon: 13. /build/src/Common/ThreadPool.cpp:785: ThreadPoolImpl<std::thread>::ThreadFromThreadPool::worker() @ 0x000000000d15202f
2025.02.12 16:23:11.616439 [ 1838 ] {} <Fatal> BaseDaemon: 14.0. inlined from /build/contrib/llvm-project/libcxx/include/__type_traits/invoke.h:312: decltype(*std::declval<ThreadPoolImpl<std::thread>::ThreadFromThreadPool*>().*std::declval<void (ThreadPoolImpl<std::thread>::ThreadFromThreadPool::*)()>()()) std::__invoke[abi:se180100]<void (ThreadPoolImpl<std::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::thread>::ThreadFromThreadPool*, void>(void (ThreadPoolImpl<std::thread>::ThreadFromThreadPool::*&&)(), ThreadPoolImpl<std::thread>::ThreadFromThreadPool*&&)
2025.02.12 16:23:11.616494 [ 1838 ] {} <Fatal> BaseDaemon: 14.1. inlined from /build/contrib/llvm-project/libcxx/include/__thread/thread.h:193: void std::__thread_execute[abi:se180100]<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.02.12 16:23:11.616514 [ 1838 ] {} <Fatal> BaseDaemon: 14. /build/contrib/llvm-project/libcxx/include/__thread/thread.h:202: void* std::__thread_proxy[abi:se180100]<std::tuple<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, void (ThreadPoolImpl<std::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::thread>::ThreadFromThreadPool*>>(void*) @ 0x000000000d157e60
2025.02.12 16:23:11.616552 [ 1838 ] {} <Fatal> BaseDaemon: 15. ? @ 0x00007fac07200ac3
2025.02.12 16:23:11.616572 [ 1838 ] {} <Fatal> BaseDaemon: 16. ? @ 0x00007fac07292850
2025.02.12 16:23:11.616590 [ 1838 ] {} <Fatal> BaseDaemon: Integrity check of the executable skipped because the reference checksum could not be read.
2025.02.12 16:23:11.794058 [ 1838 ] {} <Fatal> BaseDaemon: This ClickHouse version is not official and should be upgraded to the official build.
2025.02.12 16:23:11.794239 [ 1838 ] {} <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, max_execution_time = 10., max_memory_usage = 10000000000, parallel_view_processing = false, allow_introspection_functions = true, allow_experimental_analyzer = true
2025.02.12 16:23:17.745932 [ 181 ] {} <Fatal> Application: Child process was terminated by signal 6.

How to reproduce

No response

Error message and/or stacktrace

No response

Metadata

Metadata

Assignees

Labels

fuzzProblem found by one of the fuzzers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions