Details
-
Bug
-
Status: Resolved
-
Blocker
-
Resolution: Fixed
-
Impala 2.0
-
None
-
None
-
commit 53b73e5b4dd11888ab3c86d5d331a652f51f8092
Author: Skye Wanderman-Milne <skye@cloudera.com>
Date: Tue Sep 30 11:09:21 2014 -0700
Revert "Free local UDF/UDA allocations"
Description
With codegen disabled the query runs but the result is wrong. With codegen there is a crash. Let me know if a separate issue should be opened for the incorrect result.
[localhost.localdomain:21000] > set disable_codegen=1;DISABLE_CODEGEN set to 1 [localhost.localdomain:21000] > select COUNT(t1.string_col) AS int_col_1 FROM alltypestiny t1 LEFT JOIN alltypestiny t2 ON t2.date_string_col = t1.string_col LEFT JOIN alltypesagg t3 ON t3.id = t2.tinyint_col; Query: select COUNT(t1.string_col) AS int_col_1 FROM alltypestiny t1 LEFT JOIN alltypestiny t2 ON t2.date_string_col = t1.string_col LEFT JOIN alltypesagg t3 ON t3.id = t2.tinyint_col +-----------+ | int_col_1 | +-----------+ | 4 | +-----------+ Fetched 1 row(s) in 0.46s [localhost.localdomain:21000] > set disable_codegen=0;DISABLE_CODEGEN set to 0 [localhost.localdomain:21000] > select COUNT(t1.string_col) AS int_col_1 FROM alltypestiny t1 LEFT JOIN alltypestiny t2 ON t2.date_string_col = t1.string_col LEFT JOIN alltypesagg t3 ON t3.id = t2.tinyint_col; Query: select COUNT(t1.string_col) AS int_col_1 FROM alltypestiny t1 LEFT JOIN alltypestiny t2 ON t2.date_string_col = t1.string_col LEFT JOIN alltypesagg t3 ON t3.id = t2.tinyint_col [localhost.localdomain:21000] > connect localhost:21001; Error connecting: TTransportException, Could not connect to localhost:21001
If no aggregation is done or the joins are INNER the query runs without crashing.
Postgresql says the result should be 8
functional=# select COUNT(t1.string_col) AS int_col_1 FROM alltypestiny t1 LEFT JOIN alltypestiny t2 ON t2.date_string_col = t1.string_col LEFT JOIN alltypesagg t3 ON t3.id = t2.tinyint_col; int_col_1 ----------- 8 (1 row)
I tried getting a good stack trace several times but it is always
(gdb) bt #0 0x0000003a0ca32635 in raise () from /lib64/libc.so.6 #1 0x0000003a0ca33e15 in abort () from /lib64/libc.so.6 #2 0x00007f67819d3727 in os::abort(bool) () from /opt/toolchain/sun-jdk-64bit-1.6.0.31/jre/lib/amd64/server/libjvm.so #3 0x00007f6781b26cc8 in VMError::report_and_die() () from /opt/toolchain/sun-jdk-64bit-1.6.0.31/jre/lib/amd64/server/libjvm.so #4 0x00007f67819da0e5 in JVM_handle_linux_signal () from /opt/toolchain/sun-jdk-64bit-1.6.0.31/jre/lib/amd64/server/libjvm.so #5 0x00007f67819d63ee in signalHandler(int, siginfo*, void*) () from /opt/toolchain/sun-jdk-64bit-1.6.0.31/jre/lib/amd64/server/libjvm.so #6 <signal handler called> #7 0x00007f66ff756d7c in ?? () #8 0x00007f66fed50c20 in ?? () #9 0x0000003a0d203e46 in clock_gettime () from /lib64/librt.so.1 #10 0x0000000000e5b4c0 in impala::MonotonicStopWatch::Start (this=0x7f66fed50c20) at /data/9/query-gen/Impala/be/src/util/stopwatch.h:83 #11 0x00000000072cba78 in ?? () #12 0x00007f66fed50b64 in ?? () #13 0x00007f66fed50bc0 in ?? () #14 0x0000000800000008 in ?? () #15 0x00007f66fed50b5c in ?? () #16 0x00007f66fed50cb0 in ?? () #17 0x00000000072cb8c0 in ?? () #18 0x00007f66fed50b50 in ?? () #19 0x00007f66fed50cb0 in ?? () #20 0x00007f66fed50e00 in ?? () #21 0x00000000014a5e52 in impala::PartitionedAggregationNode::Open (this=Cannot access memory at address 0xfed50868 ) at /data/9/query-gen/Impala/be/src/exec/partitioned-aggregation-node.cc:231 Backtrace stopped: previous frame inner to this frame (corrupt stack?)
hs_err may be more helpful
Stack: [0x00007f66fe352000,0x00007f66fed53000], sp=0x00007f66fed50a90, free space=10234k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C 0x00007f66ff756d7c C [impalad+0x10a5e52] impala::PartitionedAggregationNode::Open(impala::RuntimeState*)+0xba6 C [impalad+0xfbe19c] impala::PlanFragmentExecutor::OpenInternal()+0x92 C [impalad+0xfbe018] impala::PlanFragmentExecutor::Open()+0x3a4 C [impalad+0xc69be8] impala::ImpalaServer::FragmentExecState::Exec()+0x26 C [impalad+0xb953ec] impala::ImpalaServer::RunExecPlanFragment(impala::ImpalaServer::FragmentExecState*)+0x4c C [impalad+0xbfaff4] boost::_mfi::mf1<void, impala::ImpalaServer, impala::ImpalaServer::FragmentExecState*>::operator()(impala::ImpalaServer*, impala::ImpalaServer::FragmentExecState*) const+0x64 C [impalad+0xbf96d7] void boost::_bi::list2<boost::_bi::value<impala::ImpalaServer*>, boost::_bi::value<impala::ImpalaServer::FragmentExecState*> >::operator()<boost::_mfi::mf1<void, impala::ImpalaServer, impala::ImpalaServer::FragmentExecState*>, boost::_bi::list0>(boost::_bi::type<void>, boost::_mfi::mf1<void, impala::ImpalaServer, impala::ImpalaServer::FragmentExecState*>&, boost::_bi::list0&, int)+0x69 C [impalad+0xbf5ad5] boost::_bi::bind_t<void, boost::_mfi::mf1<void, impala::ImpalaServer, impala::ImpalaServer::FragmentExecState*>, boost::_bi::list2<boost::_bi::value<impala::ImpalaServer*>, boost::_bi::value<impala::ImpalaServer::FragmentExecState*> > >::operator()()+0x3f C [impalad+0xbefc9f] boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<void, boost::_mfi::mf1<void, impala::ImpalaServer, impala::ImpalaServer::FragmentExecState*>, boost::_bi::list2<boost::_bi::value<impala::ImpalaServer*>, boost::_bi::value<impala::ImpalaServer::FragmentExecState*> > >, void>::invoke(boost::detail::function::function_buffer&)+0x23 C [impalad+0xb07035] boost::function0<void>::operator()() const+0x73 C [impalad+0xd3f4dc] _ZN6impala6Thread15SuperviseThreadERKSsS2_N5boost8functionIFvvEEEPNS_7PromiseIlEE+0x37c C [impalad+0xd47882] _ZN5boost3_bi5list4INS0_5valueISsEES3_NS2_INS_8functionIFvvEEEEENS2_IPN6impala7PromiseIlEEEEEclIPFvRKSsSG_S6_SB_ENS0_5list0EEEvNS0_4typeIvEERT_RT0_i+0xb0 C [impalad+0xd477c9] _ZN5boost3_bi6bind_tIvPFvRKSsS3_NS_8functionIFvvEEEPN6impala7PromiseIlEEENS0_5list4INS0_5valueISsEESF_NSE_IS6_EENSE_ISA_EEEEEclEv+0x3f C [impalad+0xd47756] _ZN5boost6detail11thread_dataINS_3_bi6bind_tIvPFvRKSsS5_NS_8functionIFvvEEEPN6impala7PromiseIlEEENS2_5list4INS2_5valueISsEESH_NSG_IS8_EENSG_ISC_EEEEEEE3runEv+0x1e