Xuebin Su created IMPALA-13286:
----------------------------------
Summary: Zero-sized rows in BufferTupleStream can cause impalad to
crash
Key: IMPALA-13286
URL: https://issues.apache.org/jira/browse/IMPALA-13286
Project: IMPALA
Issue Type: Bug
Reporter: Xuebin Su
When running the following query on the DEBUG build,
{code:java}
with s as (
select row_number() over (order by 1) as i
from tl as a, tl as b
)
select count(i) from s; {code}
where `tl` can be any table with millions of rows, impalad will crash with the
following error:
{code:java}
F0808 10:35:59.101099 1111686 buffered-tuple-stream.h:552]
c64e98ad45ff13ec:0eb3838c00000000] Check failed: read_page_->num_rows >=
read_page_rows_returned_ (0 vs. 4294965248)
*** Check failure stack trace: ***
@ 0x3a2760d google::LogMessage::Fail()
@ 0x3a29524 google::LogMessage::SendToLog()
@ 0x3a26fec google::LogMessage::Flush()
@ 0x3a29a49 google::LogMessageFatal::~LogMessageFatal()
@ 0x235272a impala::BufferedTupleStream::GetNextInternal<>()
@ 0x2352d8c impala::BufferedTupleStream::GetNextInternal<>()
@ 0x23500a9 impala::BufferedTupleStream::GetNext()
@ 0x1bf6c35 impala::AnalyticEvalNode::GetNextOutputBatch()
@ 0x1bfa759 impala::AnalyticEvalNode::GetNext()
@ 0x1c5637f impala::AggregationNode::Open()
@ 0x14ea9f3 impala::FragmentInstanceState::Open()
@ 0x14eec09 impala::FragmentInstanceState::Exec()
@ 0x146b528 impala::QueryState::ExecFInstance()
@ 0x146b919
_ZN5boost6detail8function26void_function_obj_invoker0IZN6impala10QueryState15StartFInstancesEvEUlvE_vE6invokeERNS1_15function_bufferE
@ 0x1a7d108 impala::Thread::SuperviseThread()
@ 0x1a7df11 boost::detail::thread_data<>::run()
@ 0x2549267 thread_proxy
@ 0x7b53ad294ac3 (unknown)
@ 0x7b53ad326850 (unknown)
Minidump in thread [1111686]exec-finstance
(finst:c64e98ad45ff13ec:0eb3838c00000000) running query
c64e98ad45ff13ec:0eb3838c00000000, fragment instance
c64e98ad45ff13ec:0eb3838c00000000 {code}
This is because the sizes of rows added to `input_stream_` of the
`AnalyticEvalNode` are all zero bytes. In that case, all rows will be added to
a single page. And if the number of rows exceeds the limit of `Page::num_rows`,
which is `INT_MAX`, `Page::num_rows` will overflow.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)