Skip to content

Logical error: 'dict_structure.hasAttribute(attr_col_name) && "Attribute not found in dictionary structure of dictionary"' #91469

@PedroTadim

Description

@PedroTadim

Important: This issue was automatically generated and is used by CI for matching failures. DO NOT modify the body content. DO NOT remove labels.

Test name: Logical error: 'dict_structure.hasAttribute(attr_col_name) && "Attribute not found in dictionary structure of dictionary"'
CI report: BuzzHouse (amd_ubsan)
CIDB statistics: cidb

Describe the bug

Yes, I need a break. Only happens with the new analyzer enabled. Sorry @nihalzp

How to reproduce

On a debug build run:

CREATE TABLE t0 (c0 Nullable(Int)) ENGINE = MergeTree() PRIMARY KEY tuple();
CREATE DICTIONARY d0 (c0 Nullable(Int) DEFAULT 1) PRIMARY KEY (c0) SOURCE(CLICKHOUSE(DB 'default' TABLE 't0')) LAYOUT(FLAT()) LIFETIME(1);
SELECT 1 FROM t0 WHERE dictGetInt32(d0, 'c0.null', c0) = 1;

Error message and/or stacktrace

Stack trace:

<Fatal> : Logical error: 'dict_structure.hasAttribute(attr_col_name) && "Attribute not found in dictionary structure of dictionary"'.
<Fatal> : Stack trace (when copying this message, always include the lines below):

0. src/Common/StackTrace.cpp:397: StackTrace::StackTrace() @ 0x000000001570d964
1. src/Common/Exception.cpp:57: DB::abortOnFailedAssertion(String const&) @ 0x000000001566dd95
2. src/Analyzer/Passes/InverseDictionaryLookupPass.cpp:219: DB::InDepthQueryTreeVisitorWithContext<DB::(anonymous namespace)::InverseDictionaryLookupVisitor>::visit(std::shared_ptr<DB::IQueryTreeNode>&) @ 0x000000001ae4668c
3. src/Analyzer/InDepthQueryTreeVisitor.h:205: DB::InDepthQueryTreeVisitorWithContext<DB::(anonymous namespace)::InverseDictionaryLookupVisitor>::visit(std::shared_ptr<DB::IQueryTreeNode>&) @ 0x000000001ae4627d
4. src/Analyzer/Passes/InverseDictionaryLookupPass.cpp:276: DB::InverseDictionaryLookupPass::run(std::shared_ptr<DB::IQueryTreeNode>&, std::shared_ptr<DB::Context const>) @ 0x000000001ae451b2
5. src/Analyzer/QueryTreePassManager.cpp:194: DB::QueryTreePassManager::run(std::shared_ptr<DB::IQueryTreeNode>&) @ 0x000000001abf578a
6. src/Interpreters/InterpreterSelectQueryAnalyzer.cpp:165: DB::buildQueryTreeAndRunPasses(std::shared_ptr<DB::IAST> const&, DB::SelectQueryOptions const&, std::shared_ptr<DB::Context const> const&, std::shared_ptr<DB::IStorage> const&) @ 0x000000001b772c46
7. src/Interpreters/InterpreterSelectQueryAnalyzer.cpp:182: 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&) @ 0x000000001b7714b8
8. contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:759: std::unique_ptr<DB::InterpreterSelectQueryAnalyzer, std::default_delete<DB::InterpreterSelectQueryAnalyzer>> std::make_unique[abi:se210105]<DB::InterpreterSelectQueryAnalyzer, std::shared_ptr<DB::IAST>&, std::shared_ptr<DB::Context> const&, DB::SelectQueryOptions const&, 0>(std::shared_ptr<DB::IAST>&, std::shared_ptr<DB::Context> const&, DB::SelectQueryOptions const&) @ 0x000000001b773f70
9. contrib/llvm-project/libcxx/include/__functional/function.h:508: ? @ 0x000000001b6f90ab
10. src/Interpreters/executeQuery.cpp:1650: DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, std::unique_ptr<DB::ReadBuffer, std::default_delete<DB::ReadBuffer>>&, std::shared_ptr<DB::IAST>&, std::shared_ptr<DB::ImplicitTransactionControlExecutor>, std::function<void ()>, DB::QueryResultDetails&) @ 0x000000001bac2d61
11. src/Interpreters/executeQuery.cpp:1940: DB::executeQuery(String const&, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) @ 0x000000001babe012
12. src/Server/TCPHandler.cpp:765: DB::TCPHandler::runImpl() @ 0x000000001efa86ea
13. src/Server/TCPHandler.cpp:2861: DB::TCPHandler::run() @ 0x000000001efc3364
14. base/poco/Net/src/TCPServerConnection.cpp:40: Poco::Net::TCPServerConnection::start() @ 0x0000000025275047
15. base/poco/Net/src/TCPServerDispatcher.cpp:115: Poco::Net::TCPServerDispatcher::run() @ 0x0000000025275625
16. base/poco/Foundation/src/ThreadPool.cpp:205: Poco::PooledThread::run() @ 0x0000000025212cff
17. base/poco/Foundation/src/Thread_POSIX.cpp:341: Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000025210491
18. ? @ 0x00000000000a3d64
19. __GI___clone3 @ 0x00000000001373bc

Metadata

Metadata

Assignees

Labels

bugConfirmed user-visible misbehaviour in official releasefuzzProblem 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