-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Logical error: SQL user defined function '' must represent lambda expression #76496
Copy link
Copy link
Closed
Labels
analyzerIssues and pull-requests related to new analyzerIssues and pull-requests related to new analyzerbugConfirmed 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 the bug
From this CI run from AST fuzzer update PR: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=75279&sha=latest&name_0=PR&name_1=AST+fuzzer+%28ubsan%29
Seems to only happen with new analyzer enabled.
How to reproduce
Simplified it here: https://fiddle.clickhouse.com/b638b212-592f-48d9-89c9-2327e943e1e5
Error message and/or stacktrace
Stack trace:
2025.02.20 09:25:20.689110 [ 137620 ] {} <Fatal> BaseDaemon: ########## Short fault info ############
2025.02.20 09:25:20.689148 [ 137620 ] {} <Fatal> BaseDaemon: (version 25.2.1.2913 (official build), build id: A986F328B33DF81D97F6FBF084683EA70DD031A7, git hash: 50f87ec35c2cd06590aa2a52a832b98bbd809d35, architecture: x86_64) (from thread 136845) Received signal 6
2025.02.20 09:25:20.689166 [ 137620 ] {} <Fatal> BaseDaemon: Signal description: Aborted
2025.02.20 09:25:20.689178 [ 137620 ] {} <Fatal> BaseDaemon:
2025.02.20 09:25:20.689198 [ 137620 ] {} <Fatal> BaseDaemon: Stack trace: 0x000058978617e0ed 0x000058978663ce04 0x00007b5e75845250 0x00007b5e758a3f1d 0x00007b5e7584519e 0x00007b5e75828902 0x0000589786132fd5 0x00005897861339b1 0x0000589786133eef 0x000058977a6e27b6 0x000058977b17a84f 0x000058978f1f82b5 0x000058978f20f159 0x000058978f1e6e1a 0x000058978f1e5c9f 0x000058978f22da8c 0x000058978f1dbfef 0x000058978f1d9c29 0x000058978f1d9251 0x000058978f284939 0x000058979036bcd8 0x0000589790369897 0x000058979036dc4e 0x000058979036d5c5 0x00005897902b4d6f 0x00005897908b6d60 0x00005897908b193b 0x0000589793d190fc 0x0000589793d489ee 0x000058979809b322 0x000058979809bff2 0x0000589798003637 0x0000589797fff06e 0x00007b5e758a1e2e 0x00007b5e75933a4c
2025.02.20 09:25:20.689215 [ 137620 ] {} <Fatal> BaseDaemon: ########################################
2025.02.20 09:25:20.689249 [ 137620 ] {} <Fatal> BaseDaemon: (version 25.2.1.2913 (official build), build id: A986F328B33DF81D97F6FBF084683EA70DD031A7, git hash: 50f87ec35c2cd06590aa2a52a832b98bbd809d35) (from thread 136845) (query_id: afa1db93-1467-4652-bbfb-b5cfc3206e54) (query: SELECT y(1);) Received signal Aborted (6)
2025.02.20 09:25:20.689277 [ 137620 ] {} <Fatal> BaseDaemon:
2025.02.20 09:25:20.689300 [ 137620 ] {} <Fatal> BaseDaemon: Stack trace: 0x000058978617e0ed 0x000058978663ce04 0x00007b5e75845250 0x00007b5e758a3f1d 0x00007b5e7584519e 0x00007b5e75828902 0x0000589786132fd5 0x00005897861339b1 0x0000589786133eef 0x000058977a6e27b6 0x000058977b17a84f 0x000058978f1f82b5 0x000058978f20f159 0x000058978f1e6e1a 0x000058978f1e5c9f 0x000058978f22da8c 0x000058978f1dbfef 0x000058978f1d9c29 0x000058978f1d9251 0x000058978f284939 0x000058979036bcd8 0x0000589790369897 0x000058979036dc4e 0x000058979036d5c5 0x00005897902b4d6f 0x00005897908b6d60 0x00005897908b193b 0x0000589793d190fc 0x0000589793d489ee 0x000058979809b322 0x000058979809bff2 0x0000589798003637 0x0000589797fff06e 0x00007b5e758a1e2e 0x00007b5e75933a4c
2025.02.20 09:25:20.701522 [ 137620 ] {} <Fatal> BaseDaemon: 0.0. inlined from src/Common/StackTrace.cpp:381: StackTrace::tryCapture()
2025.02.20 09:25:20.701558 [ 137620 ] {} <Fatal> BaseDaemon: 0. src/Common/StackTrace.cpp:350: StackTrace::StackTrace(ucontext_t const&) @ 0x0000000023c6d0ed
2025.02.20 09:25:20.715871 [ 137620 ] {} <Fatal> BaseDaemon: 1. src/Common/SignalHandlers.cpp:106: signalHandler(int, siginfo_t*, void*) @ 0x000000002412be04
2025.02.20 09:25:20.715907 [ 137620 ] {} <Fatal> BaseDaemon: 2. ? @ 0x00007b5e75845250
2025.02.20 09:25:20.715940 [ 137620 ] {} <Fatal> BaseDaemon: 3. ? @ 0x00007b5e758a3f1d
2025.02.20 09:25:20.715973 [ 137620 ] {} <Fatal> BaseDaemon: 4. ? @ 0x00007b5e7584519e
2025.02.20 09:25:20.716002 [ 137620 ] {} <Fatal> BaseDaemon: 5. ? @ 0x00007b5e75828902
2025.02.20 09:25:20.735692 [ 137620 ] {} <Fatal> BaseDaemon: 6. src/Common/Exception.cpp:48: DB::abortOnFailedAssertion(String const&, void* const*, unsigned long, unsigned long) @ 0x0000000023c21fd5
2025.02.20 09:25:20.755498 [ 137620 ] {} <Fatal> BaseDaemon: 7. src/Common/Exception.cpp:70: DB::handle_error_code(String const&, int, bool, std::vector<void*, std::allocator<void*>> const&) @ 0x0000000023c229b1
2025.02.20 09:25:20.775401 [ 137620 ] {} <Fatal> BaseDaemon: 8. src/Common/Exception.cpp:112: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x0000000023c22eef
2025.02.20 09:25:20.832330 [ 137620 ] {} <Fatal> BaseDaemon: 9. DB::Exception::Exception(PreformattedMessage&&, int) @ 0x00000000181d17b6
2025.02.20 09:25:20.860560 [ 137620 ] {} <Fatal> BaseDaemon: 10. DB::Exception::Exception<String const&, String>(int, FormatStringHelperImpl<std::type_identity<String const&>::type, std::type_identity<String>::type>, String const&, String&&) @ 0x0000000018c6984f
2025.02.20 09:25:20.952871 [ 137620 ] {} <Fatal> BaseDaemon: 11. src/Analyzer/Resolve/QueryAnalyzer.cpp:507: DB::QueryAnalyzer::tryGetLambdaFromSQLUserDefinedFunctions(String const&, std::shared_ptr<DB::Context const>) @ 0x000000002cce72b5
2025.02.20 09:25:21.016851 [ 137620 ] {} <Fatal> BaseDaemon: 12. src/Analyzer/Resolve/QueryAnalyzer.cpp:3148: DB::QueryAnalyzer::resolveFunction(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&) @ 0x000000002ccfe159
2025.02.20 09:25:21.089348 [ 137620 ] {} <Fatal> BaseDaemon: 13. src/Analyzer/Resolve/QueryAnalyzer.cpp:3836: DB::QueryAnalyzer::resolveExpressionNode(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&, bool, bool, bool) @ 0x000000002ccd5e1a
2025.02.20 09:25:21.163743 [ 137620 ] {} <Fatal> BaseDaemon: 14. src/Analyzer/Resolve/QueryAnalyzer.cpp:3972: DB::QueryAnalyzer::resolveExpressionNodeList(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&, bool, bool) @ 0x000000002ccd4c9f
2025.02.20 09:25:21.242936 [ 137620 ] {} <Fatal> BaseDaemon: 15. src/Analyzer/Resolve/QueryAnalyzer.cpp:4296: DB::QueryAnalyzer::resolveProjectionExpressionNodeList(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&) @ 0x000000002cd1ca8c
2025.02.20 09:25:21.318811 [ 137620 ] {} <Fatal> BaseDaemon: 16. src/Analyzer/Resolve/QueryAnalyzer.cpp:5578: DB::QueryAnalyzer::resolveQuery(std::shared_ptr<DB::IQueryTreeNode> const&, DB::IdentifierResolveScope&) @ 0x000000002cccafef
2025.02.20 09:25:21.390237 [ 137620 ] {} <Fatal> BaseDaemon: 17. src/Analyzer/Resolve/QueryAnalyzer.cpp:176: DB::QueryAnalyzer::resolve(std::shared_ptr<DB::IQueryTreeNode>&, std::shared_ptr<DB::IQueryTreeNode> const&, std::shared_ptr<DB::Context const>) @ 0x000000002ccc8c29
2025.02.20 09:25:21.392105 [ 137620 ] {} <Fatal> BaseDaemon: 18. src/Analyzer/Resolve/QueryAnalysisPass.cpp:18: DB::QueryAnalysisPass::run(std::shared_ptr<DB::IQueryTreeNode>&, std::shared_ptr<DB::Context const>) @ 0x000000002ccc8251
2025.02.20 09:25:21.408009 [ 137620 ] {} <Fatal> BaseDaemon: 19. src/Analyzer/QueryTreePassManager.cpp:184: DB::QueryTreePassManager::run(std::shared_ptr<DB::IQueryTreeNode>) @ 0x000000002cd73939
2025.02.20 09:25:21.431050 [ 137620 ] {} <Fatal> BaseDaemon: 20. src/Interpreters/InterpreterSelectQueryAnalyzer.cpp:151: DB::buildQueryTreeAndRunPasses(std::shared_ptr<DB::IAST> const&, DB::SelectQueryOptions const&, std::shared_ptr<DB::Context const> const&, std::shared_ptr<DB::IStorage> const&) @ 0x000000002de5acd8
2025.02.20 09:25:21.449408 [ 137620 ] {} <Fatal> BaseDaemon: 21. src/Interpreters/InterpreterSelectQueryAnalyzer.cpp:168: DB::InterpreterSelectQueryAnalyzer::InterpreterSelectQueryAnalyzer(std::shared_ptr<DB::IAST> const&, std::shared_ptr<DB::Context const> const&, DB::SelectQueryOptions const&, std::vector<String, std::allocator<String>> const&) @ 0x000000002de58897
2025.02.20 09:25:21.471933 [ 137620 ] {} <Fatal> BaseDaemon: 22. contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:634: std::__unique_if<DB::InterpreterSelectQueryAnalyzer>::__unique_single std::make_unique[abi:ne190107]<DB::InterpreterSelectQueryAnalyzer, std::shared_ptr<DB::IAST>&, std::shared_ptr<DB::Context> const&, DB::SelectQueryOptions const&>(std::shared_ptr<DB::IAST>&, std::shared_ptr<DB::Context> const&, DB::SelectQueryOptions const&) @ 0x000000002de5cc4e
2025.02.20 09:25:21.494045 [ 137620 ] {} <Fatal> BaseDaemon: 23.0. inlined from src/Interpreters/InterpreterSelectQueryAnalyzer.cpp:293: operator()
2025.02.20 09:25:21.494086 [ 137620 ] {} <Fatal> BaseDaemon: 23.1. inlined from contrib/llvm-project/libcxx/include/__type_traits/invoke.h:149: decltype(std::declval<DB::registerInterpreterSelectQueryAnalyzer(DB::InterpreterFactory&)::$_0&>()(std::declval<DB::InterpreterFactory::Arguments const&>())) std::__invoke[abi:ne190107]<DB::registerInterpreterSelectQueryAnalyzer(DB::InterpreterFactory&)::$_0&, DB::InterpreterFactory::Arguments const&>(DB::registerInterpreterSelectQueryAnalyzer(DB::InterpreterFactory&)::$_0&, DB::InterpreterFactory::Arguments const&)
2025.02.20 09:25:21.494140 [ 137620 ] {} <Fatal> BaseDaemon: 23.2. inlined from contrib/llvm-project/libcxx/include/__type_traits/invoke.h:216: std::unique_ptr<DB::IInterpreter, std::default_delete<DB::IInterpreter>> std::__invoke_void_return_wrapper<std::unique_ptr<DB::IInterpreter, std::default_delete<DB::IInterpreter>>, false>::__call[abi:ne190107]<DB::registerInterpreterSelectQueryAnalyzer(DB::InterpreterFactory&)::$_0&, DB::InterpreterFactory::Arguments const&>(DB::registerInterpreterSelectQueryAnalyzer(DB::InterpreterFactory&)::$_0&, DB::InterpreterFactory::Arguments const&)
2025.02.20 09:25:21.494182 [ 137620 ] {} <Fatal> BaseDaemon: 23.3. inlined from contrib/llvm-project/libcxx/include/__functional/function.h:210: ?
2025.02.20 09:25:21.494214 [ 137620 ] {} <Fatal> BaseDaemon: 23. contrib/llvm-project/libcxx/include/__functional/function.h:610: ? @ 0x000000002de5c5c5
2025.02.20 09:25:21.501916 [ 137620 ] {} <Fatal> BaseDaemon: 24.0. inlined from contrib/llvm-project/libcxx/include/__functional/function.h:716: ?
2025.02.20 09:25:21.501947 [ 137620 ] {} <Fatal> BaseDaemon: 24.1. inlined from contrib/llvm-project/libcxx/include/__functional/function.h:989: ?
2025.02.20 09:25:21.501983 [ 137620 ] {} <Fatal> BaseDaemon: 24. src/Interpreters/InterpreterFactory.cpp:392: DB::InterpreterFactory::get(std::shared_ptr<DB::IAST>&, std::shared_ptr<DB::Context>, DB::SelectQueryOptions const&) @ 0x000000002dda3d6f
2025.02.20 09:25:21.550913 [ 137620 ] {} <Fatal> BaseDaemon: 25. src/Interpreters/executeQuery.cpp:1391: DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, DB::ReadBuffer*, std::shared_ptr<DB::IAST>&) @ 0x000000002e3a5d60
2025.02.20 09:25:21.606947 [ 137620 ] {} <Fatal> BaseDaemon: 26. src/Interpreters/executeQuery.cpp:1625: DB::executeQuery(String const&, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) @ 0x000000002e3a093b
2025.02.20 09:25:21.644881 [ 137620 ] {} <Fatal> BaseDaemon: 27. src/Server/TCPHandler.cpp:664: DB::TCPHandler::runImpl() @ 0x00000000318080fc
2025.02.20 09:25:21.704492 [ 137620 ] {} <Fatal> BaseDaemon: 28. src/Server/TCPHandler.cpp:2629: DB::TCPHandler::run() @ 0x00000000318379ee
2025.02.20 09:25:21.706690 [ 137620 ] {} <Fatal> BaseDaemon: 29. base/poco/Net/src/TCPServerConnection.cpp:40: Poco::Net::TCPServerConnection::start() @ 0x0000000035b8a322
2025.02.20 09:25:21.710002 [ 137620 ] {} <Fatal> BaseDaemon: 30. base/poco/Net/src/TCPServerDispatcher.cpp:115: Poco::Net::TCPServerDispatcher::run() @ 0x0000000035b8aff2
2025.02.20 09:25:21.713572 [ 137620 ] {} <Fatal> BaseDaemon: 31. base/poco/Foundation/src/ThreadPool.cpp:205: Poco::PooledThread::run() @ 0x0000000035af2637
2025.02.20 09:25:21.716984 [ 137620 ] {} <Fatal> BaseDaemon: 32. base/poco/Foundation/src/Thread_POSIX.cpp:335: Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000035aee06e
2025.02.20 09:25:21.717014 [ 137620 ] {} <Fatal> BaseDaemon: 33. ? @ 0x00007b5e758a1e2e
2025.02.20 09:25:21.717046 [ 137620 ] {} <Fatal> BaseDaemon: 34. ? @ 0x00007b5e75933a4c
2025.02.20 09:25:21.968294 [ 137620 ] {} <Fatal> BaseDaemon: Integrity check of the executable successfully passed (checksum: 29378C00DD909796EE513C7DFC51F1DC)
2025.02.20 09:25:22.962472 [ 137620 ] {} <Fatal> BaseDaemon: Report this error to https://github.com/ClickHouse/ClickHouse/issues
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
analyzerIssues and pull-requests related to new analyzerIssues and pull-requests related to new analyzerbugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasefuzzProblem found by one of the fuzzersProblem found by one of the fuzzers