Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<Error> TCPHandler: Code: 46. DB::Exception: Unknown function notHandled #6097

Open
rojinebrahimi opened this issue Jul 7, 2024 · 5 comments

Comments

@rojinebrahimi
Copy link

Self-Hosted Version

24.5.1

CPU Architecture

x86_64

Docker Version

24.0.6

Docker Compose Version

2.23.0

Steps to Reproduce

Hey!
I get the error rated to Universal timestamp on my ClickHouse. Does anyone have a clue what the roots of this problem might lie at?

Expected Result

I suppose I should not see such an exception in ClickHouse...

Actual Result

2024.07.07 11:11:58.974263 [ 19750 ] {7760523f29425408e575ceb5fbd61469} <Error> TCPHandler: Code: 46. DB::Exception: Unknown function notHandled: While processing ((client_timestamp AS _snuba_timestamp) >= toDateTime('2024-06-27T11:11:58', 'Universal')) AND (_snuba_timestamp < toDateTime('2024-07-07T11:11:55', 'Universal')) AND ((project_id AS _snuba_project_id) IN tuple(17)) AND (notHandled() = 1) AND ((occurrence_type_id AS _snuba_occurrence_type_id) IN (4001, 4002, 4003)) AND (_snuba_project_id IN tuple(17)) AND ((group_id AS _snuba_group_id) IN (187756,...

Event ID

No response

@hubertdeng123 hubertdeng123 transferred this issue from getsentry/self-hosted Jul 9, 2024
@VLZZZ
Copy link

VLZZZ commented Aug 22, 2024

Same here, for now I have no clue regarding the possible root cause

2024.08.22 13:30:34.861302 [ 21235 ] {0ae6ee987136120058455740f00f3a3b} <Error> TCPHandler: Code: 46, e.displayText() = DB::Exception: Unknown function notHandled: While processing ((client_timestamp AS _snuba_timestamp) >= toDateTime('2024-08-21T13:30:34', 'Universal')) AND (_snuba_timestamp < toDateTime('2024-08-22T13:30:34', 'Universal')) AND ((project_id AS _snuba_project_id) IN tuple(237)) AND (notHandled() = 1) AND ((occurrence_type_id AS _snuba_occurrence_type_id) IN (4001, 4002, 4003)) AND (_snuba_project_id IN tuple(237)) AND ((environment AS _snuba_environment) IN tuple('prod')) AND ((group_id AS _snuba_group_id) IN (353819, 354719, 370183, 374283, 393014)), Stack trace:

0. DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0x8febd9a in /usr/bin/clickhouse
1. DB::Exception::Exception<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&>(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) @ 0xe458e7e in /usr/bin/clickhouse
2. DB::FunctionFactory::getImpl(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<DB::Context const>) const @ 0xfb3deef in /usr/bin/clickhouse
3. DB::ActionsMatcher::visit(DB::ASTFunction const&, std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) @ 0x102a8310 in /usr/bin/clickhouse
4. DB::ActionsMatcher::visit(DB::ASTFunction const&, std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) @ 0x102ab28d in /usr/bin/clickhouse
5. DB::ActionsMatcher::visit(DB::ASTFunction const&, std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) @ 0x102ab28d in /usr/bin/clickhouse
6. DB::InDepthNodeVisitor<DB::ActionsMatcher, true, std::__1::shared_ptr<DB::IAST> const>::visit(std::__1::shared_ptr<DB::IAST> const&) @ 0x10277f97 in /usr/bin/clickhouse
7. DB::ExpressionAnalyzer::getRootActions(std::__1::shared_ptr<DB::IAST> const&, bool, std::__1::shared_ptr<DB::ActionsDAG>&, bool) @ 0x10277c85 in /usr/bin/clickhouse
8. DB::SelectQueryExpressionAnalyzer::appendWhere(DB::ExpressionActionsChain&, bool) @ 0x10282edd in /usr/bin/clickhouse
9. DB::ExpressionAnalysisResult::ExpressionAnalysisResult(DB::SelectQueryExpressionAnalyzer&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, bool, bool, bool, std::__1::shared_ptr<DB::FilterDAGInfo> const&, DB::Block const&) @ 0x10289b2c in /usr/bin/clickhouse
10. DB::InterpreterSelectQuery::getSampleBlockImpl() @ 0x10488b26 in /usr/bin/clickhouse
11. ? @ 0x1048166b in /usr/bin/clickhouse
12. DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const>, std::__1::shared_ptr<DB::IBlockInputStream> const&, std::__1::optional<DB::Pipe>, std::__1::shared_ptr<DB::IStorage> const&, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&) @ 0x1047bb58 in /usr/bin/clickhouse
13. DB::InterpreterSelectQuery::InterpreterSelectQuery(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const>, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0x1047a25e in /usr/bin/clickhouse
14. DB::InterpreterSelectWithUnionQuery::InterpreterSelectWithUnionQuery(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context const>, DB::SelectQueryOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0x106571fa in /usr/bin/clickhouse
15. DB::InterpreterFactory::get(std::__1::shared_ptr<DB::IAST>&, std::__1::shared_ptr<DB::Context>, DB::SelectQueryOptions const&) @ 0x10265837 in /usr/bin/clickhouse
16. ? @ 0x1081bc66 in /usr/bin/clickhouse
17. DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<DB::Context>, bool, DB::QueryProcessingStage::Enum, bool) @ 0x1081a5a3 in /usr/bin/clickhouse
18. DB::TCPHandler::runImpl() @ 0x110c08be in /usr/bin/clickhouse
19. DB::TCPHandler::run() @ 0x110d3859 in /usr/bin/clickhouse
20. Poco::Net::TCPServerConnection::start() @ 0x13c4ca2f in /usr/bin/clickhouse
21. Poco::Net::TCPServerDispatcher::run() @ 0x13c4e4ba in /usr/bin/clickhouse
22. Poco::PooledThread::run() @ 0x13d80739 in /usr/bin/clickhouse
23. Poco::ThreadImpl::runnableEntry(void*) @ 0x13d7c9ca in /usr/bin/clickhouse
24. start_thread @ 0x9609 in /usr/lib/x86_64-linux-gnu/libpthread-2.31.so
25. __clone @ 0x122293 in /usr/lib/x86_64-linux-gnu/libc-2.31.so

Self-Hosted Version
24.2.0

Envrionment - EKS Kubernetes v1.28.11-eks-db838b0

@mcannizz
Copy link
Member

Please provide steps to reproduce the problem.

@getsantry
Copy link
Contributor

getsantry bot commented Oct 5, 2024

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot added the Stale label Oct 5, 2024
@grindlife
Copy link

grindlife commented Oct 9, 2024

I am experiencing the same issue.
After selecting any project, the logs were output.

<Error> executeQuery: Code: 46. DB::Exception: Unknown function notHandled: While processing ...

<Error> TCPHandler: Code: 46. DB::Exception: Unknown function notHandled: While processing ...

Self-Hosted Version: 24.8.0

@getsantry getsantry bot moved this from Waiting for: Community to Waiting for: Product Owner in GitHub Issues with 👀 3 Oct 9, 2024
@getsantry getsantry bot removed the Stale label Oct 10, 2024
@M0CHIL0
Copy link

M0CHIL0 commented Nov 11, 2024

I have the same issue in self-hosted version 24.10.0
I only deployed sentry self-hosted following the website instructions. Add a project and a group and the issue is there when you click in your new project

2024-11-11T12:02:57.200885015Z 2024.11.11 12:02:57.200026 [ 402 ] {randomized-d84c69227008421cbf19ed088456e067} <Error> executeQuery: Code: 46. DB::Exception: Unknown function notHandled: While processing ((client_timestamp AS _snuba_timestamp) >= toDateTime('2024-11-08T14:06:45', 'Universal')) AND (_snuba_timestamp < toDateTime('2024-11-11T12:02:57', 'Universal')) AND ((project_id AS _snuba_project_id) IN tuple(2)) AND (notHandled() = 1) AND ((occurrence_type_id AS _snuba_occurrence_type_id) IN (4001, 4002, 4003)) AND (_snuba_project_id IN tuple(2)) AND ((group_id AS _snuba_group_id) IN tuple(1)). (UNKNOWN_FUNCTION) (version 23.8.11.29.altinitystable (altinity build)) (from 172.18.0.45:36890) (in query: SELECT (group_id AS _snuba_group_id), (ifNull(uniq(_snuba_group_id), 0) AS _snuba_total), (count() AS _snuba_times_seen) FROM search_issues_local_v2 SAMPLE 1.0 WHERE greaterOrEquals((client_timestamp AS _snuba_timestamp), toDateTime('2024-11-08T14:06:45', 'Universal')) AND less(_snuba_timestamp, toDateTime('2024-11-11T12:02:57', 'Universal')) AND in((project_id AS _snuba_project_id), tuple(2)) AND equals(notHandled(), 1) AND in((occurrence_type_id AS _snuba_occurrence_type_id), (4001, 4002, 4003)) AND in(_snuba_project_id, tuple(2)) AND in(_snuba_group_id, tuple(1)) GROUP BY _snuba_group_id WITH TOTALS ORDER BY _snuba_times_seen DESC, _snuba_group_id ASC LIMIT 7 OFFSET 0), Stack trace (when copying this message, always include the lines below): 2024-11-11T12:02:57.200947085Z 2024-11-11T12:02:57.200954034Z 0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000000c61ff37 in /usr/bin/clickhouse 2024-11-11T12:02:57.200960781Z 1. DB::Exception::Exception<String const&, String&>(int, FormatStringHelperImpl<std::type_identity<String const&>::type, std::type_identity<String&>::type>, String const&, String&) @ 0x000000000c6cd727 in /usr/bin/clickhouse 2024-11-11T12:02:57.200967880Z 2. DB::FunctionFactory::getImpl(String const&, std::shared_ptr<DB::Context const>) const @ 0x0000000010c038a8 in /usr/bin/clickhouse 2024-11-11T12:02:57.200974059Z 3. DB::FunctionFactory::get(String const&, std::shared_ptr<DB::Context const>) const @ 0x0000000010c0430a in /usr/bin/clickhouse 2024-11-11T12:02:57.200980810Z 4. DB::ActionsMatcher::visit(DB::ASTFunction const&, std::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) @ 0x00000000117911eb in /usr/bin/clickhouse 2024-11-11T12:02:57.200986969Z 5. DB::ActionsMatcher::visit(DB::ASTFunction const&, std::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) @ 0x0000000011791d6b in /usr/bin/clickhouse 2024-11-11T12:02:57.200993487Z 6. DB::ActionsMatcher::visit(DB::ASTFunction const&, std::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) @ 0x0000000011791d6b in /usr/bin/clickhouse 2024-11-11T12:02:57.200999364Z 7. DB::InDepthNodeVisitor<DB::ActionsMatcher, true, false, std::shared_ptr<DB::IAST> const>::doVisit(std::shared_ptr<DB::IAST> const&) @ 0x0000000011785915 in /usr/bin/clickhouse 2024-11-11T12:02:57.201016373Z 8. DB::ExpressionAnalyzer::getRootActions(std::shared_ptr<DB::IAST> const&, bool, std::shared_ptr<DB::ActionsDAG>&, bool) @ 0x00000000117637fb in /usr/bin/clickhouse 2024-11-11T12:02:57.201022778Z 9. DB::ExpressionAnalysisResult::ExpressionAnalysisResult(DB::SelectQueryExpressionAnalyzer&, std::shared_ptr<DB::StorageInMemoryMetadata const> const&, bool, bool, bool, std::shared_ptr<DB::FilterDAGInfo> const&, std::shared_ptr<DB::FilterDAGInfo> const&, DB::Block const&) @ 0x00000000117701dc in /usr/bin/clickhouse 2024-11-11T12:02:57.201029778Z 10. DB::InterpreterSelectQuery::getSampleBlockImpl() @ 0x0000000011ee2743 in /usr/bin/clickhouse 2024-11-11T12:02:57.201035261Z 11. DB::InterpreterSelectQuery::InterpreterSelectQuery(std::shared_ptr<DB::IAST> const&, std::shared_ptr<DB::Context> const&, std::optional<DB::Pipe>, std::shared_ptr<DB::IStorage> const&, DB::SelectQueryOptions const&, std::vector<String, std::allocator<String>> const&, std::shared_ptr<DB::StorageInMemoryMetadata const> const&, std::shared_ptr<DB::PreparedSets>)::$_0::operator()(bool) const @ 0x0000000011ed371a in /usr/bin/clickhouse 2024-11-11T12:02:57.201043610Z 12. DB::InterpreterSelectQuery::InterpreterSelectQuery(std::shared_ptr<DB::IAST> const&, std::shared_ptr<DB::Context> const&, std::optional<DB::Pipe>, std::shared_ptr<DB::IStorage> const&, DB::SelectQueryOptions const&, std::vector<String, std::allocator<String>> const&, std::shared_ptr<DB::StorageInMemoryMetadata const> const&, std::shared_ptr<DB::PreparedSets>) @ 0x0000000011ec5975 in /usr/bin/clickhouse 2024-11-11T12:02:57.201051159Z 13. DB::InterpreterSelectWithUnionQuery::InterpreterSelectWithUnionQuery(std::shared_ptr<DB::IAST> const&, std::shared_ptr<DB::Context>, DB::SelectQueryOptions const&, std::vector<String, std::allocator<String>> const&) @ 0x0000000011f74948 in /usr/bin/clickhouse 2024-11-11T12:02:57.201057835Z 14. DB::InterpreterFactory::get(std::shared_ptr<DB::IAST>&, std::shared_ptr<DB::Context>, DB::SelectQueryOptions const&) @ 0x0000000011e7b91e in /usr/bin/clickhouse 2024-11-11T12:02:57.201063833Z 15. DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, bool, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x00000000122bf58a in /usr/bin/clickhouse 2024-11-11T12:02:57.201069574Z 16. DB::executeQuery(String const&, std::shared_ptr<DB::Context>, bool, DB::QueryProcessingStage::Enum) @ 0x00000000122bb5b5 in /usr/bin/clickhouse 2024-11-11T12:02:57.201076654Z 17. DB::TCPHandler::runImpl() @ 0x0000000013137519 in /usr/bin/clickhouse 2024-11-11T12:02:57.201082106Z 18. DB::TCPHandler::run() @ 0x00000000131498f9 in /usr/bin/clickhouse 2024-11-11T12:02:57.201087469Z 19. Poco::Net::TCPServerConnection::start() @ 0x0000000015b42834 in /usr/bin/clickhouse 2024-11-11T12:02:57.201092746Z 20. Poco::Net::TCPServerDispatcher::run() @ 0x0000000015b43a31 in /usr/bin/clickhouse 2024-11-11T12:02:57.201098127Z 21. Poco::PooledThread::run() @ 0x0000000015c7a667 in /usr/bin/clickhouse 2024-11-11T12:02:57.201109053Z 22. Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000015c7893c in /usr/bin/clickhouse 2024-11-11T12:02:57.201114615Z 23. ? @ 0x00007fb30e518609 in ? 2024-11-11T12:02:57.201119853Z 24. ? @ 0x00007fb30e43d353 in ? 2024-11-11T12:02:57.201125208Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for: Product Owner
Status: No status
Development

No branches or pull requests

5 participants