查询导致BE崩溃,稳定复现

表的结构为:
CREATE TABLE yd_lake_loan (
loanacno varchar(64) NOT NULL COMMENT “”,
begindate datetime NULL COMMENT “”,
tcapi decimal(20, 2) NULL COMMENT “”,
bal decimal(20, 2) NULL COMMENT “”
) ENGINE=OLAP
PRIMARY KEY(loanacno)
DISTRIBUTED BY HASH(loanacno) BUCKETS 9
PROPERTIES (
“compression” = “LZ4”,
“enable_persistent_index” = “false”,
“fast_schema_evolution” = “false”,
“replicated_storage” = “true”,
“replication_num” = “3”
);

执行的查询语句为:
SELECT * FROM yd_lake_loan WHERE CAST (left(REVERSE(tcapi),1) as int) >0 and begindate >= ‘2020-01-01’ LIMIT 0, 200;

在3.3.21版本中执行后be.out的日志为:
3.3.21 RELEASE (build 20149de distro centos arch x86_64)
query_id:94a71264-3247-11f1-adbf-00163e0a63de, fragment_instance:94a71264-3247-11f1-adbf-00163e0a63e1
tracker:process consumption: 24014441616
tracker:jemalloc_metadata consumption: 1113175504
tracker:query_pool consumption: 418987424
tracker:query_pool/connector_scan consumption: 0
tracker:load consumption: 0
tracker:metadata consumption: 3442820379
tracker:tablet_metadata consumption: 77339476
tracker:rowset_metadata consumption: 26701671
tracker:segment_metadata consumption: 258640729
tracker:column_metadata consumption: 3080138503
tracker:tablet_schema consumption: 7705164
tracker:segment_zonemap consumption: 16280553
tracker:short_key_index consumption: 236939186
tracker:column_zonemap_index consumption: 629246855
tracker:ordinal_index consumption: 2171066232
tracker:bitmap_index consumption: 317600
tracker:bloom_filter_index consumption: 490488
tracker:compaction consumption: 0
tracker:schema_change consumption: 0
tracker:column_pool consumption: 0
tracker:page_cache consumption: 10774394384
tracker:jit_cache consumption: 0
tracker:update consumption: 5259398415
tracker:chunk_allocator consumption: 0
tracker:passthrough consumption: 0
tracker:clone consumption: 0
tracker:consistency consumption: 0
tracker:datacache consumption: 0
tracker:replication consumption: 0
*** Aborted at 1775541845 (unix time) try “date -d @1775541845” if you are using GNU date ***
std::length_error’
what(): cannot create std::vector larger than max_size()PC: @ 0x2b9538733387 __GI_raise
*** SIGABRT (@0x79ab) received by PID 31147 (TID 0x2b957ffd3700) from PID 31147; stack trace: ***
@ 0x2b9537bbf20b __pthread_once_slow

@          0x7d2b0c0 google::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*)
@     0x2b9537bc8630 (/usr/lib64/libpthread-2.17.so+0xf62f)
@     0x2b9538733387 __GI_raise
@     0x2b9538734a78 __GI_abort
@          0xc40a282 __gnu_cxx::__verbose_terminate_handler()
@          0xc408c86 __cxxabiv1::__terminate(void (*)())
@          0xc408cf1 std::terminate()
@          0xc408e44 __cxa_throw
@          0x36faf61 __wrap___cxa_throw
@          0x330e007 std::__throw_length_error(char const*)
@          0x70bee39 void std::vector<unsigned int, std::allocator<unsigned int> >::_M_assign_aux<__gnu_cxx::__normal_iterator<unsigned int*, std::vector<unsigned int, std::allocator<unsigned int> > > >(__gnu_cxx::__normal_iterator<unsigned int*, std::vector<unsigned int, std:����
@          0x70fa7fb std::shared_ptr<starrocks::Column> starrocks::ReverseFunction::evaluate<(starrocks::LogicalType)17, (starrocks::LogicalType)17>(std::shared_ptr<starrocks::Column> const&)
@          0x70faefd std::shared_ptr<starrocks::Column> starrocks::DealNullableColumnUnaryFunction<starrocks::UnpackConstColumnUnaryFunction<starrocks::ReverseFunction> >::evaluate<(starrocks::LogicalType)17, (starrocks::LogicalType)17>(std::shared_ptr<starrocks::Column> const����
@          0x70e5519 starrocks::StringFunctions::reverse(starrocks::FunctionContext*, std::vector<std::shared_ptr<starrocks::Column>, std::allocator<std::shared_ptr<starrocks::Column> > > const&)
@          0x5ee7a1b starrocks::VectorizedFunctionCallExpr::evaluate_checked(starrocks::ExprContext*, starrocks::Chunk*)
@          0x5e55467 starrocks::VectorizedCastToStringExpr<(starrocks::LogicalType)48, false>::evaluate_checked(starrocks::ExprContext*, starrocks::Chunk*)
@          0x538abeb starrocks::ExprContext::evaluate(starrocks::Expr*, starrocks::Chunk*, unsigned char*)
@          0x5ee7814 starrocks::VectorizedFunctionCallExpr::evaluate_checked(starrocks::ExprContext*, starrocks::Chunk*)
@          0x5e61376 starrocks::VectorizedCastExpr<(starrocks::LogicalType)17, (starrocks::LogicalType)5, false>::evaluate_checked(starrocks::ExprContext*, starrocks::Chunk*)
@          0x5570be4 starrocks::VectorizedBinaryPredicate<(starrocks::LogicalType)5, starrocks::BinaryPredFunc<std::greater<int> > >::evaluate_checked(starrocks::ExprContext*, starrocks::Chunk*)
@          0x538abeb starrocks::ExprContext::evaluate(starrocks::Expr*, starrocks::Chunk*, unsigned char*)
@          0x538b06f starrocks::ExprContext::evaluate(starrocks::Chunk*, unsigned char*)
@          0x6b073b4 starrocks::ColumnExprPredicate::evaluate(starrocks::Column const*, unsigned char*, unsigned short, unsigned short) const
@          0x6b07a79 starrocks::ColumnExprPredicate::evaluate_and(starrocks::Column const*, unsigned char*, unsigned short, unsigned short) const
@          0x62d0e57 starrocks::ConjunctivePredicates::evaluate(starrocks::Chunk const*, unsigned char*, unsigned short, unsigned short) const
@          0x47740dc starrocks::pipeline::OlapChunkSource::_read_chunk_from_storage(starrocks::RuntimeState*, starrocks::Chunk*)
@          0x47746c1 starrocks::pipeline::OlapChunkSource::_read_chunk(starrocks::RuntimeState*, std::shared_ptr<starrocks::Chunk>*)
@          0x476a888 starrocks::pipeline::ChunkSource::buffer_next_batch_chunks_blocking(starrocks::RuntimeState*, unsigned long, starrocks::workgroup::WorkGroup const*)
@          0x443e45d auto starrocks::pipeline::ScanOperator::_trigger_next_scan(starrocks::RuntimeState*, int)::{lambda(auto:1&)#1}::operator()<starrocks::workgroup::YieldContext>(starrocks::workgroup::YieldContext&) const [clone .constprop.0]
@          0x4539a6b starrocks::workgroup::ScanExecutor::worker_thread()
@          0x3966ca3 starrocks::ThreadPool::dispatch_thread()

[1775541845.640][thread:47921097422592] je_mallctl execute purge success
[1775541845.640][thread:47921097422592] je_mallctl execute dontdump success

3.4.8执行后的be.out的日志为:
3.4.8 RELEASE (build d507a53 distro centos arch x86_64)
query_id:99602e8d-36d4-11f1-9d1d-00505699c6a0, fragment_instance:99602e8d-36d4-11f1-9d1d-00505699c6a3
*** Aborted at 1776042216 (unix time) try “date -d @1776042216” if you are using GNU date ***
PC: @ 0x2b3267c423d7 __GI_raise
*** SIGABRT (@0x522c) received by PID 21036 (TID 0x2b3289861700) from PID 21036; stack trace: ***
@ 0x2b326590120b __pthread_once_slow
@ 0xb58e894 google::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*)
terminate called recursively
@ 0x2b326590a630 (/usr/lib64/libpthread-2.17.so+0xf62f)
@ 0x2b3267c423d7 __GI_raise
@ 0x2b3267c43ac8 __GI_abort
terminate called recursively
@ 0x388ee3d __gnu_cxx::__verbose_terminate_handler() [clone .cold]
@ 0xec37d96 __cxxabiv1::__terminate(void ()())
@ 0x388ecd5 std::terminate()
@ 0xec37f33 __cxa_throw
@ 0x38908de std::__throw_length_error(char const
)
@ 0x346fa9c void std::vector<unsigned int, starrocks::ColumnAllocator >::_M_assign_aux<__gnu_cxx::__normal_iterator<unsigned int*, std::vector<unsigned int, starrocks::ColumnAllocator > > >(__gnu_cxx::__normal_iterator<unsigned int*, std::v@
@ 0x80b820e std::shared_ptrstarrocks::Column starrocks::UnpackConstColumnUnaryFunctionstarrocks::ReverseFunction::evaluate<(starrocks::LogicalType)17, (starrocks::LogicalType)17>(std::shared_ptrstarrocks::Column const&)
@ 0x80b8b79 std::shared_ptrstarrocks::Column starrocks::DealNullableColumnUnaryFunction<starrocks::UnpackConstColumnUnaryFunctionstarrocks::ReverseFunction >::evaluate<(starrocks::LogicalType)17, (starrocks::LogicalType)17>(std::shared_ptrstarrocks::Column const@
@ 0x80a7118 starrocks::StringFunctions::reverse(starrocks::FunctionContext*, std::vector<std::shared_ptrstarrocks::Column, std::allocator<std::shared_ptrstarrocks::Column > > const&)
@ 0x7cae7ba std::_Function_handler<starrocks::StatusOr<std::shared_ptrstarrocks::Column > (starrocks::FunctionContext*, std::vector<std::shared_ptrstarrocks::Column, std::allocator<std::shared_ptrstarrocks::Column > > const&), starrocks::StatusOr<std::shared_ptr@
@ 0x6ba0156 starrocks::VectorizedFunctionCallExpr::evaluate_checked(starrocks::ExprContext*, starrocks::Chunk*)
@ 0x6a7766e starrocks::VectorizedCastToStringExpr<(starrocks::LogicalType)49, false>::evaluate_checked(starrocks::ExprContext*, starrocks::Chunk*)
@ 0x5d41d9b starrocks::ExprContext::evaluate(starrocks::Expr*, starrocks::Chunk*, unsigned char*)
@ 0x6b9fdf7 starrocks::VectorizedFunctionCallExpr::evaluate_checked(starrocks::ExprContext*, starrocks::Chunk*)
@ 0x6af76cb starrocks::VectorizedCastExpr<(starrocks::LogicalType)17, (starrocks::LogicalType)5, false>::evaluate_checked(starrocks::ExprContext*, starrocks::Chunk*)
@ 0x5f95677 starrocks::VectorizedBinaryPredicate<(starrocks::LogicalType)5, starrocks::BinaryPredFunc<std::greater > >::evaluate_checked(starrocks::ExprContext*, starrocks::Chunk*)
@ 0x5d41d9b starrocks::ExprContext::evaluate(starrocks::Expr*, starrocks::Chunk*, unsigned char*)
@ 0x5d421eb starrocks::ExprContext::evaluate(starrocks::Chunk*, unsigned char*)
@ 0x79bed8b starrocks::ColumnExprPredicate::evaluate(starrocks::Column const*, unsigned char*, unsigned short, unsigned short) const
@ 0x705b4de starrocks::PredicateColumnNode::evaluate(std::vector<starrocks::CompoundNodeContext, std::allocatorstarrocks::CompoundNodeContext >&, starrocks::Chunk const*, unsigned char*, unsigned short, unsigned short) const
@ 0x705ba37 starrocks::PredicateCompoundNode<(starrocks::CompoundNodeType)0>::evaluate(std::vector<starrocks::CompoundNodeContext, std::allocatorstarrocks::CompoundNodeContext >&, starrocks::Chunk const*, unsigned char*, unsigned short, unsigned short) const
@ 0x705df6b starrocks::PredicateTree::evaluate(starrocks::Chunk const*, unsigned char*, unsigned short, unsigned short) const
@ 0x6fe04b6 starrocks::SegmentIterator::_filter_by_expr_predicates(starrocks::Chunk*, std::vector<unsigned int, std::allocator >)
@ 0x6fe55ef starrocks::SegmentIterator::_do_get_next(starrocks::Chunk
, std::vector<unsigned int, std::allocator >)
@ 0x6ff1811 starrocks::SegmentIterator::do_get_next(starrocks::Chunk
)
@ 0x7070d25 starrocks::ProjectionIterator::do_get_next(starrocks::Chunk*)
@ 0x7a7fa85 starrocks::SegmentIteratorWrapper::do_get_next(starrocks::Chunk*)
[1776042216.907][thread: 47496055625472] je_mallctl execute purge success
[1776042216.907][thread: 47496055625472] je_mallctl execute dontdump success

执行后be均立即崩溃

我来解决下这个问题

1赞