Skip to content

segfault src/Interpreters/ActionsDAG.cpp:2144 #50451

@qoega

Description

@qoega

https://s3.amazonaws.com/clickhouse-test-reports/0/c70aa9592bc4991cf988184d4d03fc3ca90606e3/sqlancer__release_.html

2023.06.01 19:45:33.410065 [ 510 ] {} <Fatal> BaseDaemon: ########################################
2023.06.01 19:45:33.410126 [ 510 ] {} <Fatal> BaseDaemon: (version 23.5.1.2484 (official build), build id: D3517C86B7677AFA439D5F76F234FAC91F0EC3D3) (from thread 35) (query_id: ae7b3d43-34ca-4389-b626-0c0c18391ae8) (query: SELECT AVG(t1.c0) FROM t1 GROUP BY (erf ((- ((log (lcm(t1.c0,t1.c0))))))) HAVING (AVG(t1.c0)) and (AVG(t1.c0)) UNION ALL SELECT AVG(t1.c0) FROM t1 GROUP BY (erf ((- ((log (lcm(t1.c0,t1.c0))))))) HAVING (NOT ((AVG(t1.c0)) and (AVG(t1.c0)))) UNION ALL SELECT AVG(t1.c0) FROM t1 GROUP BY (erf ((- ((log (lcm(t1.c0,t1.c0))))))) HAVING (((AVG(t1.c0)) and (AVG(t1.c0))) IS NULL) SETTINGS aggregate_functions_null_for_empty=1, enable_optimize_predicate_expression=0) Received signal Segmentation fault (11)
2023.06.01 19:45:33.410169 [ 510 ] {} <Fatal> BaseDaemon: Address: NULL pointer. Access: read. Address not mapped to object.
2023.06.01 19:45:33.410241 [ 510 ] {} <Fatal> BaseDaemon: Stack trace: 0x0000000012f414bc 0x00000000150e3bd3 0x00000000150e3473 0x00000000150ccdb6 0x000000001506044d 0x000000001505f36e 0x0000000013b775ae 0x0000000013e9f038 0x0000000013ea3f3f 0x0000000014c20ef5 0x0000000014c25184 0x0000000014c94cb2 0x0000000017bd47b4 0x0000000017bd59d1 0x0000000017d52687 0x0000000017d500bc 0x00007fb9425fab43 0x00007fb94268ca00
2023.06.01 19:45:33.596727 [ 510 ] {} <Fatal> BaseDaemon: 2. ./build_docker/./src/Interpreters/ActionsDAG.cpp:2144: DB::ActionsDAG::cloneActionsForFilterPushDown(String const&, bool, std::vector<String, std::allocator<String>> const&, std::vector<DB::ColumnWithTypeAndName, std::allocator<DB::ColumnWithTypeAndName>> const&) @ 0x0000000012f414bc in /clickhouse
2023.06.01 19:45:33.623502 [ 510 ] {} <Fatal> BaseDaemon: 3.1. inlined from ./build_docker/./src/Processors/QueryPlan/Optimizations/filterPushDown.cpp:118: DB::QueryPlanOptimizations::splitFilter(DB::QueryPlan::Node*, std::vector<String, std::allocator<String>> const&, unsigned long)
2023.06.01 19:45:33.623534 [ 510 ] {} <Fatal> BaseDaemon: 3. ./build_docker/./src/Processors/QueryPlan/Optimizations/filterPushDown.cpp:188: DB::QueryPlanOptimizations::tryAddNewFilterStep(DB::QueryPlan::Node*, std::list<DB::QueryPlan::Node, std::allocator<DB::QueryPlan::Node>>&, std::vector<String, std::allocator<String>> const&, bool, unsigned long) @ 0x00000000150e3bd3 in /clickhouse
2023.06.01 19:45:33.652496 [ 510 ] {} <Fatal> BaseDaemon: 4. ./build_docker/./src/Processors/QueryPlan/Optimizations/filterPushDown.cpp:248: DB::QueryPlanOptimizations::tryPushDownFilter(DB::QueryPlan::Node*, std::list<DB::QueryPlan::Node, std::allocator<DB::QueryPlan::Node>>&) @ 0x00000000150e3473 in /clickhouse
2023.06.01 19:45:33.662879 [ 510 ] {} <Fatal> BaseDaemon: 5. ./build_docker/./src/Processors/QueryPlan/Optimizations/optimizeTree.cpp:88: DB::QueryPlanOptimizations::optimizeTreeFirstPass(DB::QueryPlanOptimizationSettings const&, DB::QueryPlan::Node&, std::list<DB::QueryPlan::Node, std::allocator<DB::QueryPlan::Node>>&) @ 0x00000000150ccdb6 in /clickhouse
2023.06.01 19:45:33.702088 [ 510 ] {} <Fatal> BaseDaemon: 6. ./build_docker/./src/Processors/QueryPlan/QueryPlan.cpp:484: DB::QueryPlan::optimize(DB::QueryPlanOptimizationSettings const&) @ 0x000000001506044d in /clickhouse
2023.06.01 19:45:33.739021 [ 510 ] {} <Fatal> BaseDaemon: 7.1. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/__memory/compressed_pair.h:36: __compressed_pair_elem
2023.06.01 19:45:33.739057 [ 510 ] {} <Fatal> BaseDaemon: 7.2. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/__memory/compressed_pair.h:108: __compressed_pair<std::__value_init_tag, std::__value_init_tag>
2023.06.01 19:45:33.739082 [ 510 ] {} <Fatal> BaseDaemon: 7.3. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:168: unique_ptr<true, void>
2023.06.01 19:45:33.739097 [ 510 ] {} <Fatal> BaseDaemon: 7. ./build_docker/./src/Processors/QueryPlan/QueryPlan.cpp:169: DB::QueryPlan::buildQueryPipeline(DB::QueryPlanOptimizationSettings const&, DB::BuildQueryPipelineSettings const&) @ 0x000000001505f36e in /clickhouse
2023.06.01 19:45:33.782462 [ 510 ] {} <Fatal> BaseDaemon: 8. ./build_docker/./src/Interpreters/InterpreterSelectWithUnionQuery.cpp:379: DB::InterpreterSelectWithUnionQuery::execute() @ 0x0000000013b775ae in /clickhouse
2023.06.01 19:45:33.830570 [ 510 ] {} <Fatal> BaseDaemon: 9. ./build_docker/./src/Interpreters/executeQuery.cpp:0: DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, bool, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x0000000013e9f038 in /clickhouse
2023.06.01 19:45:33.878410 [ 510 ] {} <Fatal> BaseDaemon: 10.1. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:612: shared_ptr
2023.06.01 19:45:33.878467 [ 510 ] {} <Fatal> BaseDaemon: 10.2. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:723: std::shared_ptr<DB::IAST>::operator=[abi:v15000](std::shared_ptr<DB::IAST>&&)
2023.06.01 19:45:33.878499 [ 510 ] {} <Fatal> BaseDaemon: 10.3. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/tuple:533: void std::__memberwise_forward_assign[abi:v15000]<std::tuple<std::shared_ptr<DB::IAST>&, DB::BlockIO&>, std::tuple<std::shared_ptr<DB::IAST>, DB::BlockIO>, std::shared_ptr<DB::IAST>, DB::BlockIO, 0ul, 1ul>(std::tuple<std::shared_ptr<DB::IAST>&, DB::BlockIO&>&, std::tuple<std::shared_ptr<DB::IAST>, DB::BlockIO>&&, std::__tuple_types<std::shared_ptr<DB::IAST>, DB::BlockIO>, std::__tuple_indices<0ul, 1ul>)
2023.06.01 19:45:33.878523 [ 510 ] {} <Fatal> BaseDaemon: 10.4. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/tuple:1138: std::tuple<std::shared_ptr<DB::IAST>&, DB::BlockIO&>& std::tuple<std::shared_ptr<DB::IAST>&, DB::BlockIO&>::operator=[abi:v15000]<std::shared_ptr<DB::IAST>, DB::BlockIO, 0>(std::tuple<std::shared_ptr<DB::IAST>, DB::BlockIO>&&)
2023.06.01 19:45:33.878539 [ 510 ] {} <Fatal> BaseDaemon: 10. ./build_docker/./src/Interpreters/executeQuery.cpp:1274: DB::executeQuery(DB::ReadBuffer&, DB::WriteBuffer&, bool, std::shared_ptr<DB::Context>, std::function<void (DB::QueryResultDetails const&)>, std::optional<DB::FormatSettings> const&) @ 0x0000000013ea3f3f in /clickhouse
2023.06.01 19:45:33.919279 [ 510 ] {} <Fatal> BaseDaemon: 11.1. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/optional:260: ~__optional_destruct_base
2023.06.01 19:45:33.919598 [ 510 ] {} <Fatal> BaseDaemon: 11. ./build_docker/./src/Server/HTTPHandler.cpp:834: DB::HTTPHandler::processQuery(DB::HTTPServerRequest&, DB::HTMLForm&, DB::HTTPServerResponse&, DB::HTTPHandler::Output&, std::optional<DB::CurrentThread::QueryScope>&) @ 0x0000000014c20ef5 in /clickhouse
2023.06.01 19:45:33.970750 [ 510 ] {} <Fatal> BaseDaemon: 12. ./build_docker/./src/Server/HTTPHandler.cpp:0: DB::HTTPHandler::handleRequest(DB::HTTPServerRequest&, DB::HTTPServerResponse&) @ 0x0000000014c25184 in /clickhouse
2023.06.01 19:45:33.974214 [ 510 ] {} <Fatal> BaseDaemon: 13.1. inlined from ./build_docker/./base/poco/Foundation/include/Poco/AutoPtr.h:205: Poco::AutoPtr<Poco::Net::HTTPServerParams>::operator->()
2023.06.01 19:45:33.974239 [ 510 ] {} <Fatal> BaseDaemon: 13. ./build_docker/./src/Server/HTTP/HTTPServerConnection.cpp:69: DB::HTTPServerConnection::run() @ 0x0000000014c94cb2 in /clickhouse
2023.06.01 19:45:33.976942 [ 510 ] {} <Fatal> BaseDaemon: 14. ./build_docker/./base/poco/Net/src/TCPServerConnection.cpp:57: Poco::Net::TCPServerConnection::start() @ 0x0000000017bd47b4 in /clickhouse
2023.06.01 19:45:33.980805 [ 510 ] {} <Fatal> BaseDaemon: 15.1. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:48: std::default_delete<Poco::Net::TCPServerConnection>::operator()[abi:v15000](Poco::Net::TCPServerConnection*) const
2023.06.01 19:45:33.980834 [ 510 ] {} <Fatal> BaseDaemon: 15.2. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:305: std::unique_ptr<Poco::Net::TCPServerConnection, std::default_delete<Poco::Net::TCPServerConnection>>::reset[abi:v15000](Poco::Net::TCPServerConnection*)
2023.06.01 19:45:33.980852 [ 510 ] {} <Fatal> BaseDaemon: 15.3. inlined from ./build_docker/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:259: ~unique_ptr
2023.06.01 19:45:33.980883 [ 510 ] {} <Fatal> BaseDaemon: 15. ./build_docker/./base/poco/Net/src/TCPServerDispatcher.cpp:116: Poco::Net::TCPServerDispatcher::run() @ 0x0000000017bd59d1 in /clickhouse
2023.06.01 19:45:33.985499 [ 510 ] {} <Fatal> BaseDaemon: 16. ./build_docker/./base/poco/Foundation/src/ThreadPool.cpp:202: Poco::PooledThread::run() @ 0x0000000017d52687 in /clickhouse
2023.06.01 19:45:33.989200 [ 510 ] {} <Fatal> BaseDaemon: 17.1. inlined from ./build_docker/./base/poco/Foundation/include/Poco/SharedPtr.h:231: Poco::SharedPtr<Poco::Runnable, Poco::ReferenceCounter, Poco::ReleasePolicy<Poco::Runnable>>::get()
2023.06.01 19:45:33.989226 [ 510 ] {} <Fatal> BaseDaemon: 17.2. inlined from ./build_docker/./base/poco/Foundation/include/Poco/SharedPtr.h:139: Poco::SharedPtr<Poco::Runnable, Poco::ReferenceCounter, Poco::ReleasePolicy<Poco::Runnable>>::assign(Poco::Runnable*)
2023.06.01 19:45:33.989246 [ 510 ] {} <Fatal> BaseDaemon: 17.3. inlined from ./build_docker/./base/poco/Foundation/include/Poco/SharedPtr.h:180: Poco::SharedPtr<Poco::Runnable, Poco::ReferenceCounter, Poco::ReleasePolicy<Poco::Runnable>>::operator=(Poco::Runnable*)
2023.06.01 19:45:33.989267 [ 510 ] {} <Fatal> BaseDaemon: 17. ./build_docker/./base/poco/Foundation/src/Thread_POSIX.cpp:350: Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000017d500bc in /clickhouse
2023.06.01 19:45:33.989289 [ 510 ] {} <Fatal> BaseDaemon: 18. ? @ 0x00007fb9425fab43 in ?
2023.06.01 19:45:33.989305 [ 510 ] {} <Fatal> BaseDaemon: 19. ? @ 0x00007fb94268ca00 in ?
2023.06.01 19:45:34.219356 [ 510 ] {} <Fatal> BaseDaemon: Integrity check of the executable successfully passed (checksum: D1F69B2A961A12BC10F3F45A6B41B21D)
2023.06.01 19:45:34.610525 [ 29 ] {} <Fatal> Application: Child process was terminated by signal 11.
DROP DATABASE IF EXISTS database3TLPHaving;
CREATE DATABASE IF NOT EXISTS database3TLPHaving;
USE database3TLPHaving;
CREATE TABLE database3TLPHaving.t0 (c0 Int32, c1 String, c2 String) ENGINE = Log() ;
CREATE TABLE database3TLPHaving.t1 (c0 Int32) ENGINE = Log() ;
CREATE TABLE IF NOT EXISTS database3TLPHaving.t2 (c0 Int32) ENGINE = Log() ;
CREATE TABLE database3TLPHaving.t3 (c0 String) ENGINE = Log() ;
CREATE TABLE database3TLPHaving.t4 (c0 Int32) ENGINE = Memory() ;
INSERT INTO t1(c0) VALUES (-261830918), (-120908140);
INSERT INTO t1(c0) VALUES (1611812154);
INSERT INTO t3(c0) VALUES ('?&u');
INSERT INTO t4(c0) VALUES (-1718115750);
INSERT INTO t4(c0) VALUES (-2105663472);
INSERT INTO t3(c0) VALUES ('tG}S?9X');
INSERT INTO t3(c0) VALUES ('Ew,|\\<RdP');
INSERT INTO t2(c0) VALUES (-2063959252);
INSERT INTO t4(c0) VALUES (-1262215227);
INSERT INTO t4(c0) VALUES (-1262215227), (1370223380);
INSERT INTO t4(c0) VALUES (608293296);
INSERT INTO t2(c0) VALUES (104963007);
INSERT INTO t1(c0) VALUES (-1247144537);
INSERT INTO t2(c0) VALUES (-966776550);
INSERT INTO t4(c0) VALUES (-1983678519);
INSERT INTO t0(c2) VALUES ('-,?'), ('');
INSERT INTO t4(c0) VALUES (1321399841);

Metadata

Metadata

Labels

bugConfirmed user-visible misbehaviour in official releasecrashCrash / segfault / abortfuzzProblem found by one of the fuzzerssqlancerIssue found by SQLancer tool

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions