Tim Armstrong created IMPALA-5867:
-------------------------------------
Summary: Some dates with yy month format can crash Impala
Key: IMPALA-5867
URL: https://issues.apache.org/jira/browse/IMPALA-5867
Project: IMPALA
Issue Type: Bug
Components: Backend
Affects Versions: Impala 2.10.0
Reporter: Tim Armstrong
Priority: Critical
This happens on master - commit c1c4815049ca3deab7465070b1207446cb3a1645
{code}
[localhost:21000] > select from_unixtime(unix_timestamp("85-12-01",
"yy-mm-dd"));
Query: select from_unixtime(unix_timestamp("85-12-01", "yy-mm-dd"))
Query submitted at: 2017-08-30 12:23:57 (Coordinator:
http://tarmstrong-box:25000)
Error communicating with impalad: TSocket read 0 bytes
{code}
{code}
terminate called after throwing an instance of
'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::gregorian::bad_month>
>'
what(): Month number is out of range 1..12
{code}
{code}
(gdb) bt
#0 0x00007f8d126d1428 in __GI_raise (sig=sig@entry=6) at
../sysdeps/unix/sysv/linux/raise.c:54
#1 0x00007f8d126d302a in __GI_abort () at abort.c:89
#2 0x00007f8d1323184d in __gnu_cxx::__verbose_terminate_handler() () from
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3 0x00007f8d1322f6b6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007f8d1322f701 in std::terminate() () from
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007f8d1322f919 in __cxa_throw () from
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x00000000012645da in boost::throw_exception<boost::gregorian::bad_month>
(e=...) at toolchain/boost-1.57.0-p3/include/boost/throw_exception.hpp:69
#7 0x00000000012632e0 in boost::CV::simple_exception_policy<unsigned short,
(unsigned short)1, (unsigned short)12, boost::gregorian::bad_month>::on_error ()
at
toolchain/boost-1.57.0-p3/include/boost/date_time/constrained_value.hpp:110
#8 0x0000000001261748 in
boost::CV::constrained_value<boost::CV::simple_exception_policy<unsigned short,
(unsigned short)1, (unsigned short)12, boost::gregorian::bad_month> >::assign
(this=0x7f8cb345d600,
value=0) at
toolchain/boost-1.57.0-p3/include/boost/date_time/constrained_value.hpp:69
#9 0x0000000001260250 in
boost::CV::constrained_value<boost::CV::simple_exception_policy<unsigned short,
(unsigned short)1, (unsigned short)12, boost::gregorian::bad_month>
>::constrained_value (
this=0x7f8cb345d600, value=0) at
toolchain/boost-1.57.0-p3/include/boost/date_time/constrained_value.hpp:48
#10 0x000000000125f324 in boost::gregorian::greg_month::greg_month
(this=0x7f8cb345d600, theMonth=0) at
toolchain/boost-1.57.0-p3/include/boost/date_time/gregorian/greg_month.hpp:64
#11 0x0000000001413324 in impala::TimestampParser::ParseDateTime (str=0x7dac030
"85-12-01", str_len=8, dt_ctx=..., dt_result=0x7f8cb345d700) at
be/src/runtime/timestamp-parse-util.cc:556
#12 0x000000000141196a in impala::TimestampParser::Parse (str=0x7dac030
"85-12-01", len=8, dt_ctx=..., d=0x7f8cb345d998, t=0x7f8cb345d990) at
be/src/runtime/timestamp-parse-util.cc:312
#13 0x000000000141828f in impala::TimestampValue::Parse (str=0x7dac030
"85-12-01", len=8, dt_ctx=...) at be/src/runtime/timestamp-value.cc:72
#14 0x00000000019b7dc2 in impala::TimestampFunctions::ToTimestamp
(context=0x55b3fa0, date=..., fmt=...) at
be/src/exprs/timestamp-functions-ir.cc:167
#15 0x00000000019b797e in impala::TimestampFunctions::Unix (context=0x55b3fa0,
string_val=..., fmt=...) at be/src/exprs/timestamp-functions-ir.cc:101
#16 0x00000000019eca56 in
impala::ScalarFnCall::InterpretEval<impala_udf::BigIntVal> (this=0xa431c00,
eval=0xb39bf80, row=0x0) at be/src/exprs/scalar-fn-call.cc:489
#17 0x00000000019dd27f in impala::ScalarFnCall::GetBigIntVal (this=0xa431c00,
eval=0xb39bf80, row=0x0) at be/src/exprs/scalar-fn-call.cc:576
#18 0x000000000199d82f in impala::ScalarExprEvaluator::GetValue
(this=0xb39bf80, expr=..., row=0x0) at be/src/exprs/scalar-expr-evaluator.cc:298
#19 0x000000000199d611 in impala::ScalarExprEvaluator::GetValue
(this=0xb39bf80, row=0x0) at be/src/exprs/scalar-expr-evaluator.cc:268
#20 0x00000000015094a1 in
Java_org_apache_impala_service_FeSupport_NativeEvalExprsWithoutRow
(env=0x9f469e0, caller_class=0x7f8cb345ea10, thrift_expr_batch=0x7f8cb345ea28,
thrift_query_ctx_bytes=0x7f8cb345ea20)
at be/src/service/fe-support.cc:231
{code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)