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

Server crash if enable_optimize_predicate_expression enabled in config #4865

Closed
ShivaS123 opened this issue Mar 31, 2019 · 2 comments
Closed
Assignees
Labels
bug Confirmed user-visible misbehaviour in official release comp-optimizers Query optimizations crash Crash / segfault / abort

Comments

@ShivaS123
Copy link

ClickHouse server version 19.4.1.1

Once enabled in config, enable_optimize_predicate_expression crashes server on next clickhouse-client login.

Simple config:

<profiles>
        <default>
           <enable_optimize_predicate_expression>1</enable_optimize_predicate_expression>
        </default>
    </profiles>

Error log:

2019.03.31 11:19:36.188259 [ 32 ] {} <Error> BaseDaemon: ########################################
2019.03.31 11:19:36.188302 [ 32 ] {} <Error> BaseDaemon: (from thread 28) Received signal Floating point exception (8).
2019.03.31 11:19:36.188312 [ 32 ] {} <Error> BaseDaemon: Integer divide by zero.
2019.03.31 11:19:36.230052 [ 32 ] {} <Error> BaseDaemon: 0. clickhouse-server(std::_Hashtable<std::string, std::string, std::allocator<std::string>, std::__detail::_Identity, std::equal_to<std::string>, std::hash<std::string>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, true, true> >::count(std::string const&) const+0x35) [0x5476f45]
2019.03.31 11:19:36.230087 [ 32 ] {} <Error> BaseDaemon: 1. clickhouse-server(DB::TranslateQualifiedNamesMatcher::visit(DB::ASTIdentifier&, std::shared_ptr<DB::IAST>&, DB::TranslateQualifiedNamesMatcher::Data&)+0xdf) [0x56e1c0f]
2019.03.31 11:19:36.230099 [ 32 ] {} <Error> BaseDaemon: 2. clickhouse-server(DB::TranslateQualifiedNamesMatcher::visit(std::shared_ptr<DB::IAST>&, DB::TranslateQualifiedNamesMatcher::Data&)+0x50) [0x56e37d0]
2019.03.31 11:19:36.230110 [ 32 ] {} <Error> BaseDaemon: 3. clickhouse-server(DB::InDepthNodeVisitor<DB::TranslateQualifiedNamesMatcher, true>::visit(std::shared_ptr<DB::IAST>&)+0x3a) [0x56d044a]
2019.03.31 11:19:36.230118 [ 32 ] {} <Error> BaseDaemon: 4. clickhouse-server(DB::InDepthNodeVisitor<DB::TranslateQualifiedNamesMatcher, true>::visit(std::shared_ptr<DB::IAST>&)+0x73) [0x56d0483]
2019.03.31 11:19:36.230133 [ 32 ] {} <Error> BaseDaemon: 5. clickhouse-server(DB::InDepthNodeVisitor<DB::TranslateQualifiedNamesMatcher, true>::visit(std::shared_ptr<DB::IAST>&)+0x73) [0x56d0483]
2019.03.31 11:19:36.230141 [ 32 ] {} <Error> BaseDaemon: 6. clickhouse-server(DB::InDepthNodeVisitor<DB::TranslateQualifiedNamesMatcher, true>::visit(std::shared_ptr<DB::IAST>&)+0x73) [0x56d0483]
2019.03.31 11:19:36.230148 [ 32 ] {} <Error> BaseDaemon: 7. clickhouse-server(DB::PredicateExpressionsOptimizer::getSelectQueryProjectionColumns(std::shared_ptr<DB::IAST>&)+0x4fb) [0x5b9860b]
2019.03.31 11:19:36.230162 [ 32 ] {} <Error> BaseDaemon: 8. clickhouse-server(DB::PredicateExpressionsOptimizer::getSubqueryProjectionColumns(std::shared_ptr<DB::IAST> const&, std::map<DB::ASTSelectQuery*, std::vector<std::pair<std::shared_ptr<DB::IAST>, std::string>, std::allocator<std::pair<std::shared_ptr<DB::IAST>, std::string> > >, std::less<DB::ASTSelectQuery*>, std::allocator<std::pair<DB::ASTSelectQuery* const, std::vector<std::pair<std::shared_ptr<DB::IAST>, std::string>, std::allocator<std::pair<std::shared_ptr<DB::IAST>, std::string> > > > > >&)+0xd1) [0x5b99ea1]
2019.03.31 11:19:36.230172 [ 32 ] {} <Error> BaseDaemon: 9. clickhouse-server(DB::PredicateExpressionsOptimizer::getAllSubqueryProjectionColumns()+0x71) [0x5b9a7a1]
2019.03.31 11:19:36.230181 [ 32 ] {} <Error> BaseDaemon: 10. clickhouse-server(DB::PredicateExpressionsOptimizer::optimize()+0x54) [0x5b9a854]
2019.03.31 11:19:36.230193 [ 32 ] {} <Error> BaseDaemon: 11. clickhouse-server(DB::SyntaxAnalyzer::analyze(std::shared_ptr<DB::IAST>&, DB::NamesAndTypesList const&, std::vector<std::string, std::allocator<std::string> > const&, std::shared_ptr<DB::IStorage>) const+0x2541) [0x56cee11]
2019.03.31 11:19:36.230204 [ 32 ] {} <Error> BaseDaemon: 12. clickhouse-server(DB::InterpreterSelectQuery::InterpreterSelectQuery(std::shared_ptr<DB::IAST> const&, DB::Context const&, std::shared_ptr<DB::IBlockInputStream> const&, std::shared_ptr<DB::IStorage> const&, std::vector<std::string, std::allocator<std::string> > const&, DB::QueryProcessingStage::Enum, unsigned long, bool, bool)+0x493) [0x55d1663]
2019.03.31 11:19:36.230213 [ 32 ] {} <Error> BaseDaemon: 13. clickhouse-server(DB::InterpreterSelectQuery::InterpreterSelectQuery(std::shared_ptr<DB::IAST> const&, DB::Context const&, std::vector<std::string, std::allocator<std::string> > const&, DB::QueryProcessingStage::Enum, unsigned long, bool, bool)+0x47) [0x55d2817]
2019.03.31 11:19:36.230225 [ 32 ] {} <Error> BaseDaemon: 14. clickhouse-server(DB::InterpreterSelectWithUnionQuery::InterpreterSelectWithUnionQuery(std::shared_ptr<DB::IAST> const&, DB::Context const&, std::vector<std::string, std::allocator<std::string> > const&, DB::QueryProcessingStage::Enum, unsigned long, bool, bool)+0x71e) [0x55de2ae]
2019.03.31 11:19:36.230235 [ 32 ] {} <Error> BaseDaemon: 15. clickhouse-server(DB::InterpreterFactory::get(std::shared_ptr<DB::IAST>&, DB::Context&, DB::QueryProcessingStage::Enum)+0x2da) [0x55ba5ca]
2019.03.31 11:19:36.230242 [ 32 ] {} <Error> BaseDaemon: 16. clickhouse-server() [0x56f5b03]
2019.03.31 11:19:36.230249 [ 32 ] {} <Error> BaseDaemon: 17. clickhouse-server(DB::executeQuery(std::string const&, DB::Context&, bool, DB::QueryProcessingStage::Enum, bool)+0x61) [0x56f7a11]
2019.03.31 11:19:36.230261 [ 32 ] {} <Error> BaseDaemon: 18. clickhouse-server(DB::TCPHandler::runImpl()+0x47c) [0x2e1676c]
2019.03.31 11:19:36.230267 [ 32 ] {} <Error> BaseDaemon: 19. clickhouse-server(DB::TCPHandler::run()+0x1c) [0x2e17b0c]
2019.03.31 11:19:36.230274 [ 32 ] {} <Error> BaseDaemon: 20. clickhouse-server(Poco::Net::TCPServerConnection::start()+0xf) [0x6135eaf]
2019.03.31 11:19:36.230280 [ 32 ] {} <Error> BaseDaemon: 21. clickhouse-server(Poco::Net::TCPServerDispatcher::run()+0x110) [0x6136510]
2019.03.31 11:19:36.230287 [ 32 ] {} <Error> BaseDaemon: 22. clickhouse-server(Poco::PooledThread::run()+0x77) [0x621dc77]
2019.03.31 11:19:36.230295 [ 32 ] {} <Error> BaseDaemon: 23. clickhouse-server(Poco::ThreadImpl::runnableEntry(void*)+0x38) [0x621b1d8]
2019.03.31 11:19:36.230307 [ 32 ] {} <Error> BaseDaemon: 24. clickhouse-server() [0x692e86f]
2019.03.31 11:19:36.230313 [ 32 ] {} <Error> BaseDaemon: 25. /lib64/libpthread.so.0(+0x7e25) [0x7fdbb3815e25]

Console error:

Cannot load data for command line suggestions: Code: 32, e.displayText() = DB::Exception: Attempt to read after eof: while receiving packet from localhost:9000, 127.0.0.1

Thanks

@ShivaS123 ShivaS123 added the bug Confirmed user-visible misbehaviour in official release label Mar 31, 2019
@ShivaS123 ShivaS123 changed the title server crash if enable_optimize_predicate_expression enabled in config Server crash if enable_optimize_predicate_expression enabled in config Mar 31, 2019
@ShivaS123
Copy link
Author

ShivaS123 commented Apr 1, 2019

Seems like it's fixed and recently been committed #4794 ?

@abyss7 abyss7 added crash Crash / segfault / abort v19.4 labels Apr 4, 2019
@abyss7
Copy link
Contributor

abyss7 commented Apr 4, 2019

Yes. That's the fix.

@abyss7 abyss7 closed this as completed Apr 4, 2019
@filimonov filimonov added the comp-optimizers Query optimizations label Jun 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed user-visible misbehaviour in official release comp-optimizers Query optimizations crash Crash / segfault / abort
Projects
None yet
Development

No branches or pull requests

3 participants