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

Clickhouse Segmentation fault on alias join table #8254

Closed
dmitriy-myz opened this issue Dec 17, 2019 · 1 comment
Closed

Clickhouse Segmentation fault on alias join table #8254

dmitriy-myz opened this issue Dec 17, 2019 · 1 comment
Assignees
Labels
bug Confirmed user-visible misbehaviour in official release crash Crash / segfault / abort duplicate

Comments

@dmitriy-myz
Copy link
Contributor

How to reproduce

Run query with table alias on table with join engine

  • Which ClickHouse server version to use
    19.17.4.11
  • CREATE TABLE statements for all tables involved
CREATE TABLE some_join
(
    `id` String,
    `value` String
)
ENGINE = Join(ANY, LEFT, id);

create table tbl
(
    `eventDate` Date,
    id String
)
ENGINE = MergeTree() PARTITION BY tuple() ORDER BY eventDate;
  • This query lead to segmentation fault
SELECT *
FROM tbl AS t
ANY LEFT JOIN some_join AS d USING (id)
  • this query ok
SELECT *
FROM tbl AS t
ANY LEFT JOIN some_join USING (id)

Error message and/or stacktrace

2019.12.17 18:36:53.923302 [ 110 ] {} <Fatal> BaseDaemon: (version 19.17.4.11 (official build)) (from thread 107) Received signal Segmentation fault (11).
2019.12.17 18:36:53.923318 [ 110 ] {} <Fatal> BaseDaemon: Address: NULL pointer. Access: read. Address not mapped to object.
2019.12.17 18:36:53.923334 [ 110 ] {} <Fatal> BaseDaemon: Stack trace: 0x55d82e76c4a3 0x55d82e799ed7 0x55d82e74b4f5 0x55d82ee62580 0x55d82ee63535 0x55d82ece52cd 0x55d82e7275ee 0x55d82e70852c 0x55d82e72893f 0x55d
82e72a745 0x55d82e82d3fe 0x55d82e82e84e 0x55d82b3cd894 0x55d82b3ce2cb 0x55d82f2ca660 0x55d82f2cad7d 0x55d8309a0ef1 0x55d83099ec9c 0x55d831114e00 0x7fadc316e6db 0x7fadc2a8b88f
2019.12.17 18:36:53.923383 [ 110 ] {} <Fatal> BaseDaemon: 3. 0x55d82e76c4a3 ? /usr/bin/clickhouse
2019.12.17 18:36:53.923424 [ 110 ] {} <Fatal> BaseDaemon: 4. 0x55d82e799ed7 void DB::Join::joinBlockImpl<(DB::ASTTableJoin::Kind)1, (DB::ASTTableJoin::Strictness)1, DB::Join::MapsTemplate<DB::JoinStuff::WithFlags<DB::RowRef, false> > >(DB::Block&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, DB::Block const&, DB::Join::MapsTemplate<DB::JoinStuff::WithFlags<DB::RowRef, false> > const&) const /usr/bin/clickhouse
2019.12.17 18:36:53.923440 [ 110 ] {} <Fatal> BaseDaemon: 5. 0x55d82e74b4f5 DB::Join::joinBlock(DB::Block&) /usr/bin/clickhouse
2019.12.17 18:36:53.923465 [ 110 ] {} <Fatal> BaseDaemon: 6. 0x55d82ee62580 DB::ExpressionAction::execute(DB::Block&, bool) const /usr/bin/clickhouse
2019.12.17 18:36:53.923476 [ 110 ] {} <Fatal> BaseDaemon: 7. 0x55d82ee63535 DB::ExpressionActions::execute(DB::Block&, bool) const /usr/bin/clickhouse
2019.12.17 18:36:53.923489 [ 110 ] {} <Fatal> BaseDaemon: 8. 0x55d82ece52cd DB::ExpressionBlockInputStream::ExpressionBlockInputStream(std::shared_ptr<DB::IBlockInputStream> const&, std::shared_ptr<DB::ExpressionActions> const&) /usr/bin/clickhouse
2019.12.17 18:36:53.923503 [ 110 ] {} <Fatal> BaseDaemon: 9. 0x55d82e7275ee void DB::InterpreterSelectQuery::executeImpl<DB::InterpreterSelectQuery::Pipeline>(DB::InterpreterSelectQuery::Pipeline&, std::shared_ptr<DB::IBlockInputStream> const&, DB::QueryPipeline&) /usr/bin/clickhouse
2019.12.17 18:36:53.923516 [ 110 ] {} <Fatal> BaseDaemon: 10. 0x55d82e70852c DB::InterpreterSelectQuery::executeWithMultipleStreams(DB::QueryPipeline&) /usr/bin/clickhouse
2019.12.17 18:36:53.923531 [ 110 ] {} <Fatal> BaseDaemon: 11. 0x55d82e72893f DB::InterpreterSelectWithUnionQuery::executeWithMultipleStreams(DB::QueryPipeline&) /usr/bin/clickhouse
2019.12.17 18:36:53.923541 [ 110 ] {} <Fatal> BaseDaemon: 12. 0x55d82e72a745 DB::InterpreterSelectWithUnionQuery::execute() /usr/bin/clickhouse
2019.12.17 18:36:53.923551 [ 110 ] {} <Fatal> BaseDaemon: 13. 0x55d82e82d3fe ? /usr/bin/clickhouse
2019.12.17 18:36:53.923564 [ 110 ] {} <Fatal> BaseDaemon: 14. 0x55d82e82e84e DB::executeQuery(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, DB::Context&, bool, DB::QueryProcessingStage::Enum, bool, bool) /usr/bin/clickhouse
2019.12.17 18:36:53.923576 [ 110 ] {} <Fatal> BaseDaemon: 15. 0x55d82b3cd894 DB::TCPHandler::runImpl() /usr/bin/clickhouse
2019.12.17 18:36:53.923586 [ 110 ] {} <Fatal> BaseDaemon: 16. 0x55d82b3ce2cb DB::TCPHandler::run() /usr/bin/clickhouse
2019.12.17 18:36:53.923597 [ 110 ] {} <Fatal> BaseDaemon: 17. 0x55d82f2ca660 Poco::Net::TCPServerConnection::start() /usr/bin/clickhouse
2019.12.17 18:36:53.923607 [ 110 ] {} <Fatal> BaseDaemon: 18. 0x55d82f2cad7d Poco::Net::TCPServerDispatcher::run() /usr/bin/clickhouse
2019.12.17 18:36:53.923618 [ 110 ] {} <Fatal> BaseDaemon: 19. 0x55d8309a0ef1 Poco::PooledThread::run() /usr/bin/clickhouse
2019.12.17 18:36:53.923629 [ 110 ] {} <Fatal> BaseDaemon: 20. 0x55d83099ec9c Poco::ThreadImpl::runnableEntry(void*) /usr/bin/clickhouse
2019.12.17 18:36:53.923639 [ 110 ] {} <Fatal> BaseDaemon: 21. 0x55d831114e00 ? /usr/bin/clickhouse
2019.12.17 18:36:53.923653 [ 110 ] {} <Fatal> BaseDaemon: 22. 0x7fadc316e6db start_thread /lib/x86_64-linux-gnu/libpthread-2.27.so
2019.12.17 18:36:53.923669 [ 110 ] {} <Fatal> BaseDaemon: 23. 0x7fadc2a8b88f clone /lib/x86_64-linux-gnu/libc-2.27.so
@dmitriy-myz dmitriy-myz added the bug Confirmed user-visible misbehaviour in official release label Dec 17, 2019
@4ertus2 4ertus2 added crash Crash / segfault / abort duplicate labels Dec 17, 2019
@4ertus2
Copy link
Contributor

4ertus2 commented Dec 17, 2019

#7556

@4ertus2 4ertus2 self-assigned this Dec 17, 2019
@4ertus2 4ertus2 closed this as completed Dec 20, 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 crash Crash / segfault / abort duplicate
Projects
None yet
Development

No branches or pull requests

2 participants