Details
-
Bug
-
Status: Resolved
-
Blocker
-
Resolution: Fixed
-
Impala 3.1.0
-
ghx-label-1
Description
The random query generator found a query that crashes an executor node. Multiple COUNT(DISTINCT) looks involved, so assigning to twmarshall.
Query that reproduces the crash:
USE tpch; SELECT COUNT(DISTINCT -475.116242696) AS int_col, COALESCE('67', CAST(COUNT(DISTINCT a1.o_totalprice) AS STRING)) AS char_col, CAST(COUNT(DISTINCT a1.o_orderkey) AS STRING) AS char_col_1, IF(True, '15', CAST(COUNT(DISTINCT False) AS STRING)) AS char_col_2, (COUNT(DISTINCT a1.o_orderdate)) / (-899.6051032421) AS decimal_col FROM orders a1 WHERE (CAST('1992-11-22 00:00:00' AS TIMESTAMP)) NOT IN (SELECT CAST('1992-09-02 00:00:00' AS TIMESTAMP) + INTERVAL IF(False, 744, COUNT(DISTINCT a2.o_custkey)) MINUTE AS timestamp_col FROM orders a2 INNER JOIN orders a3 ON (a2.o_shippriority) = (a3.o_totalprice));
I1008 09:31:15.222935 110602 impala-internal-service.cc:49] ExecQueryFInstances(): query_id=5d4496651cffa066:fc72c69a00000000 coord=mikeb-ub162:22000 #instances=6 I1008 09:31:15.223341 110608 query-state.cc:472] Executing instance. instance_id=5d4496651cffa066:fc72c69a0000000d fragment_idx=1 per_fragment_instance_idx=1 coord_state_idx=1 #in-flight=1 I1008 09:31:15.224743 110610 query-state.cc:472] Executing instance. instance_id=5d4496651cffa066:fc72c69a0000000b fragment_idx=2 per_fragment_instance_idx=1 coord_state_idx=1 #in-flight=2 I1008 09:31:15.225250 110616 query-state.cc:472] Executing instance. instance_id=5d4496651cffa066:fc72c69a00000008 fragment_idx=4 per_fragment_instance_idx=1 coord_state_idx=1 #in-flight=3 I1008 09:31:15.225797 110619 query-state.cc:472] Executing instance. instance_id=5d4496651cffa066:fc72c69a00000006 fragment_idx=5 per_fragment_instance_idx=1 coord_state_idx=1 #in-flight=4 I1008 09:31:15.225960 110620 query-state.cc:472] Executing instance. instance_id=5d4496651cffa066:fc72c69a00000002 fragment_idx=6 per_fragment_instance_idx=1 coord_state_idx=1 #in-flight=5 I1008 09:31:15.226035 110622 query-state.cc:472] Executing instance. instance_id=5d4496651cffa066:fc72c69a00000004 fragment_idx=7 per_fragment_instance_idx=1 coord_state_idx=1 #in-flight=6 I1008 09:31:16.570009 110622 query-state.cc:480] Instance completed. instance_id=5d4496651cffa066:fc72c69a00000004 #in-flight=5 status=OK I1008 09:31:16.571622 110602 query-exec-mgr.cc:97] QueryState: query_id=5d4496651cffa066:fc72c69a00000000 refcnt=7 I1008 09:31:16.646488 110654 krpc-data-stream-mgr.cc:294] DeregisterRecvr(): fragment_instance_id=5d4496651cffa066:fc72c69a00000006, node=11 I1008 09:31:17.235110 110619 krpc-data-stream-mgr.cc:294] DeregisterRecvr(): fragment_instance_id=5d4496651cffa066:fc72c69a00000006, node=10 I1008 09:31:17.236071 110620 query-state.cc:480] Instance completed. instance_id=5d4496651cffa066:fc72c69a00000002 #in-flight=4 status=OK I1008 09:31:17.237010 110616 krpc-data-stream-mgr.cc:294] DeregisterRecvr(): fragment_instance_id=5d4496651cffa066:fc72c69a00000008, node=12 I1008 09:31:17.238026 110619 query-state.cc:480] Instance completed. instance_id=5d4496651cffa066:fc72c69a00000006 #in-flight=3 status=OK I1008 09:31:17.241374 110616 query-state.cc:480] Instance completed. instance_id=5d4496651cffa066:fc72c69a00000008 #in-flight=2 status=OK I1008 09:31:21.108199 110610 krpc-data-stream-mgr.cc:294] DeregisterRecvr(): fragment_instance_id=5d4496651cffa066:fc72c69a0000000b, node=16 F1008 09:31:21.109815 110610 grouping-aggregator.cc:868] Check failed: !hash_partitions_.empty()
From be/src/exec/grouping-aggregator.cc:
867 Status GroupingAggregator::MoveHashPartitions(int64_t num_input_rows) { 868 DCHECK(!hash_partitions_.empty());
#6 0x000000000448061e in google::LogMessageFatal::~LogMessageFatal() () #7 0x0000000002fa6c68 in impala::GroupingAggregator::MoveHashPartitions (this=0xc332300, num_input_rows=1181503) at /home/mikeb/Impala/be/src/exec/grouping-aggregator.cc:868 #8 0x0000000002fa2c6a in impala::GroupingAggregator::InputDone (this=0xc332300) at /home/mikeb/Impala/be/src/exec/grouping-aggregator.cc:460 #9 0x0000000002f5a588 in impala::StreamingAggregationNode::GetRowsStreaming (this=0xe204d80, state=0xdaa7ba0, out_batch=0xe909c00) at /home/mikeb/Impala/be/src/exec/streaming-aggregation-node.cc:177 #10 0x0000000002f59168 in impala::StreamingAggregationNode::GetNext (this=0xe204d80, state=0xdaa7ba0, row_batch=0xe909c00, eos=0x7f2574601477) at /home/mikeb/Impala/be/src/exec/streaming-aggregation-node.cc:73 #11 0x0000000001e8a4bb in impala::FragmentInstanceState::ExecInternal (this=0xed64e00) at /home/mikeb/Impala/be/src/runtime/fragment-instance-state.cc:310 #12 0x0000000001e870d3 in impala::FragmentInstanceState::Exec (this=0xed64e00) at /home/mikeb/Impala/be/src/runtime/fragment-instance-state.cc:95 #13 0x0000000001e9819b in impala::QueryState::ExecFInstance (this=0xf40c800, fis=0xed64e00) at /home/mikeb/Impala/be/src/runtime/query-state.cc:478 #14 0x0000000001e963b6 in impala::QueryState::<lambda()>::operator()(void) const (__closure=0x7f2574601ca8) at /home/mikeb/Impala/be/src/runtime/query-state.cc:406 #15 0x0000000001e98f67 in boost::detail::function::void_function_obj_invoker0<impala::QueryState::StartFInstances()::<lambda()>, void>::invoke(boost::detail::function::function_buffer &) (function_obj_ptr=...) at /home/mikeb/Impala/toolchain/boost-1.57.0-p3/include/boost/function/function_template.hpp:153 #16 0x0000000001cb6ae0 in boost::function0<void>::operator() (this=0x7f2574601ca0) at /home/mikeb/Impala/toolchain/boost-1.57.0-p3/include/boost/function/function_template.hpp:767 #17 0x00000000020f18af in impala::Thread::SuperviseThread(std::string const&, std::string const&, boost::function<void ()>, impala::ThreadDebugInfo const*, impala::Promise<long, (impala::PromiseMode)0>*) (name=..., category=..., functor=..., parent_thread_info=0x7f2575002950, thread_started=0x7f2575001830) at /home/mikeb/Impala/be/src/util/thread.cc:359 #18 0x00000000020f9bcf in boost::_bi::list5<boost::_bi::value<std::string>, boost::_bi::value<std::string>, boost::_bi::value<boost::function<void ()> >, boost::_bi::value<impala::ThreadDebugInfo*>, boost::_bi::value<impala::Promise<long, (impala::PromiseMode)0>*> >::operator()<void (*)(std::string const&, std::string const&, boost::function<void ()>, impala::ThreadDebugInfo const*, impala::Promise<long, (impala::PromiseMode)0>*), boost::_bi::list0>(boost::_bi::type<void>, void (*&)(std::string const&, std::string const&, boost::function<void ()>, impala::ThreadDebugInfo const*, impala::Promise<long, (impala::PromiseMode)0>*), boost::_bi::list0&, int) (this=0xed651c0, f=@0xed651b8: 0x20f1548 <impala::Thread::SuperviseThread(std::string const&, std::string const&, boost::function<void ()>, impala::ThreadDebugInfo const*, impala::Promise<long, (impala::PromiseMode)0>*)>, a=...) at /home/mikeb/Impala/toolchain/boost-1.57.0-p3/include/boost/bind/bind.hpp:525 #19 0x00000000020f9af3 in boost::_bi::bind_t<void, void (*)(std::string const&, std::string const&, boost::function<void ()>, impala::ThreadDebugInfo const*, impala::Promise<long, (impala::PromiseMode)0>*), boost::_bi::list5<boost::_bi::value<std::string>, boost::_bi::value<std::string>, boost::_bi::value<boost::function<void ()> >, boost::_bi::value<impala::ThreadDebugInfo*>, boost::_bi::value<impala::Promise<long, (impala::PromiseMode)0>*> > >::operator()() (this=0xed651b8) at /home/mikeb/Impala/toolchain/boost-1.57.0-p3/include/boost/bind/bind_template.hpp:20 #20 0x00000000020f9ab6 in boost::detail::thread_data<boost::_bi::bind_t<void, void (*)(std::string const&, std::string const&, boost::function<void ()>, impala::ThreadDebugInfo const*, impala::Promise<long, (impala::PromiseMode)0>*), boost::_bi::list5<boost::_bi::value<std::string>, boost::_bi::value<std::string>, boost::_bi::value<boost::function<void ()> >, boost::_bi::value<impala::ThreadDebugInfo*>, boost::_bi::value<impala::Promise<long, (impala::PromiseMode)0>*> > > >::run() (this=0xed65000) at /home/mikeb/Impala/toolchain/boost-1.57.0-p3/include/boost/thread/detail/thread.hpp:116 #21 0x00000000033a8cca in thread_proxy () #22 0x00007f2609c216ba in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0 #23 0x00007f260995741d in clone () from /lib/x86_64-linux-gnu/libc.so.6