Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[BugFix] Fix array_map common-expression crash #52909

Merged
merged 1 commit into from
Nov 15, 2024

Conversation

stdpain
Copy link
Contributor

@stdpain stdpain commented Nov 14, 2024

Why I'm doing:

#0  0x000000000612b73c in starrocks::StringFunctions::split (context=0x144631f75c80, columns=...) at be/src/exprs/split.cpp:131
#1  0x00000000051e1129 in starrocks::VectorizedFunctionCallExpr::evaluate_checked (this=0x142147865c00, context=<optimized out>, ptr=0x144114bdb340) at be/src/exprs/function_call_expr.cpp:186
#2  0x0000000004a4361b in starrocks::ArrayElementExpr::evaluate_checked (this=0x142147865700, context=0x140bc3389180, chunk=0x144114bdb340) at be/src/exprs/array_element_expr.cpp:40
#3  0x00000000052a07d7 in starrocks::LambdaFunction::evaluate_checked (this=0x142147865200, context=0x140bc3389180, chunk=0x144114bdb340) at be/src/exprs/expr.h:100
#4  0x000000000497062b in starrocks::ExprContext::evaluate (this=this@entry=0x140bc3389180, e=<optimized out>, chunk=0x144114bdb340, filter=filter@entry=0x0) at be/src/exprs/expr_context.cpp:184
#5  0x00000000052aa476 in starrocks::ArrayMapExpr::evaluate_lambda_expr<false, false> (this=0x142147864d00, context=0x140bc3389180, chunk=0x14524ee8d210, input_elements=..., result_null_column=...) at be/src/common/status.h:211
#6  0x00000000052a3e5c in starrocks::ArrayMapExpr::evaluate_checked (this=0x142147864d00, context=0x140bc3389180, chunk=0x14524ee8d210) at be/src/exprs/array_map_expr.cpp:367
#7  0x000000000497062b in starrocks::ExprContext::evaluate (this=this@entry=0x140bc3389180, e=<optimized out>, chunk=chunk@entry=0x14524ee8d210, filter=filter@entry=0x0) at be/src/exprs/expr_context.cpp:184
#8  0x00000000052a9925 in starrocks::ArrayMapExpr::evaluate_lambda_expr<false, false> (this=0x142147863e00, context=0x140bc3389180, chunk=0x14524ee8d210, input_elements=..., result_null_column=...)
    at be/src/exprs/array_map_expr.cpp:72
#9  0x00000000052a3e5c in starrocks::ArrayMapExpr::evaluate_checked (this=0x142147863e00, context=0x140bc3389180, chunk=0x14524ee8d210) at be/src/exprs/array_map_expr.cpp:367
#10 0x000000000497062b in starrocks::ExprContext::evaluate (this=this@entry=0x140bc3389180, e=<optimized out>, chunk=chunk@entry=0x14524ee8d210, filter=filter@entry=0x0) at be/src/exprs/expr_context.cpp:184
#11 0x00000000051e0d75 in starrocks::VectorizedFunctionCallExpr::evaluate_checked (this=0x142147863900, context=0x140bc3389180, ptr=0x14524ee8d210) at be/src/exprs/function_call_expr.cpp:162
#12 0x0000000004a43665 in starrocks::ArrayElementExpr::evaluate_checked (this=0x1421471c7900, context=0x140bc3389180, chunk=0x14524ee8d210) at be/src/exprs/array_element_expr.cpp:41
#13 0x000000000497062b in starrocks::ExprContext::evaluate (this=this@entry=0x140bc3389180, e=<optimized out>, chunk=chunk@entry=0x14524ee8d210, filter=filter@entry=0x0) at be/src/exprs/expr_context.cpp:184
#14 0x00000000052a312c in starrocks::ArrayMapExpr::evaluate_checked (this=0x142146106c00, context=0x140bc3389180, chunk=0x14524ee8d210) at be/src/exprs/array_map_expr.cpp:250
#15 0x0000000004a4361b in starrocks::ArrayElementExpr::evaluate_checked (this=0x142146106700, context=0x140bc3389180, chunk=0x14524ee8d210) at be/src/exprs/array_element_expr.cpp:40
#16 0x0000000004a13c21 in starrocks::VectorizedArithmeticExpr<(starrocks::LogicalType)7, starrocks::SubOp>::evaluate_checked (this=0x142146106200, context=0x140bc3389180, ptr=0x14524ee8d210) at be/src/exprs/arithmetic_expr.cpp:96
#17 0x0000000004abe831 in starrocks::VectorizedBinaryPredicate<(starrocks::LogicalType)7, starrocks::BinaryPredFunc<std::greater_equal<long> > >::evaluate_checked (this=0x142146105d00, context=0x140bc3389180, ptr=0x14524ee8d210)
    at be/src/exprs/binary_predicate.cpp:104
#18 0x000000000518452e in starrocks::VectorizedOrCompoundPredicate::evaluate_checked (this=0x142146105800, context=0x140bc3389180, ptr=0x14524ee8d210) at be/src/exprs/compound_predicate.cpp:79
#19 0x000000000518452e in starrocks::VectorizedOrCompoundPredicate::evaluate_checked (this=0x142146105300, context=0x140bc3389180, ptr=0x14524ee8d210) at be/src/exprs/compound_predicate.cpp:79
#20 0x000000000518eb44 in starrocks::VectorizedIfExpr<(starrocks::LogicalType)19>::evaluate_checked (this=0x142146104e00, context=0x140bc3389180, ptr=0x14524ee8d210) at be/src/exprs/condition_expr.cpp:224
#21 0x000000000497062b in starrocks::ExprContext::evaluate (this=this@entry=0x140bc3389180, e=<optimized out>, chunk=chunk@entry=0x14524ee8d210, filter=filter@entry=0x0) at be/src/exprs/expr_context.cpp:184
#22 0x00000000051e0d75 in starrocks::VectorizedFunctionCallExpr::evaluate_checked (this=0x142146104900, context=0x140bc3389180, ptr=0x14524ee8d210) at be/src/exprs/function_call_expr.cpp:162
#23 0x0000000004ac7fc1 in starrocks::VectorizedBinaryPredicate<(starrocks::LogicalType)5, starrocks::BinaryPredFunc<std::greater<int> > >::evaluate_checked (this=0x142146104400, context=0x140bc3389180, ptr=0x14524ee8d210)
    at be/src/exprs/binary_predicate.cpp:104
#24 0x000000000497062b in starrocks::ExprContext::evaluate (this=0x140bc3389180, e=<optimized out>, chunk=0x14524ee8d210, filter=<optimized out>) at be/src/exprs/expr_context.cpp:184
#25 0x0000000004970aaf in starrocks::ExprContext::evaluate (this=<optimized out>, chunk=chunk@entry=0x14524ee8d210, filter=filter@entry=0x0) at be/src/exprs/expr_context.cpp:160
#26 0x00000000036e2a33 in starrocks::eager_prune_eval_conjuncts (ctxs=..., chunk=0x14524ee8d210) at be/src/exec/exec_node.cpp:611
#27 0x00000000036e4786 in starrocks::ExecNode::eval_conjuncts (ctxs=..., chunk=chunk@entry=0x14524ee8d210, filter_ptr=filter_ptr@entry=0x0, apply_filter=apply_filter@entry=true) at be/src/exec/exec_node.cpp:662
#28 0x0000000003a1043f in starrocks::pipeline::Operator::eval_conjuncts_and_in_filters (this=this@entry=0x1442a8059990, conjuncts=..., chunk=0x14524ee8d210, filter=filter@entry=0x0, apply_filter=apply_filter@entry=true)
    at be/src/exec/pipeline/operator.cpp:184
#29 0x0000000003af380f in starrocks::pipeline::AggregateBlockingSourceOperator::pull_chunk (this=0x1442a8059990, state=<optimized out>) at be/src/exec/aggregator.h:276
#30 0x0000000003ac36e6 in starrocks::pipeline::PipelineDriver::process (this=0x1442a807c310, runtime_state=0x144608a74000, worker_id=<optimized out>) at be/src/exec/pipeline/pipeline_driver.cpp:312
#31 0x0000000003ab55bf in starrocks::pipeline::GlobalDriverExecutor::_worker_thread (this=0x146ec8a82b00) at be/src/exec/pipeline/pipeline_driver_executor.cpp:153
#32 0x000000000302f5ec in std::function<void ()>::operator()() const (this=<optimized out>) at /opt/rh/gcc-toolset-10/root/usr/include/c++/10.3.0/bits/std_function.h:248
#33 starrocks::FunctionRunnable::run (this=<optimized out>) at be/src/util/threadpool.cpp:59

What I'm doing:

Fixes #issue

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 3.3
    • 3.2
    • 3.1
    • 3.0
    • 2.5

Signed-off-by: stdpain <drfeng08@gmail.com>
@stdpain stdpain requested a review from a team as a code owner November 14, 2024 12:28
Copy link

[Java-Extensions Incremental Coverage Report]

pass : 0 / 0 (0%)

Copy link

[FE Incremental Coverage Report]

pass : 0 / 0 (0%)

Copy link

[BE Incremental Coverage Report]

pass : 10 / 10 (100.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 be/src/exprs/array_map_expr.cpp 10 10 100.00% []

@stdpain stdpain merged commit 8bda0cb into StarRocks:main Nov 15, 2024
58 checks passed
Copy link

@Mergifyio backport branch-3.3

@github-actions github-actions bot removed the 3.3 label Nov 15, 2024
Copy link

@Mergifyio backport branch-3.2

@github-actions github-actions bot removed the 3.2 label Nov 15, 2024
Copy link
Contributor

mergify bot commented Nov 15, 2024

backport branch-3.3

✅ Backports have been created

Copy link
Contributor

mergify bot commented Nov 15, 2024

backport branch-3.2

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Nov 15, 2024
Signed-off-by: stdpain <drfeng08@gmail.com>
(cherry picked from commit 8bda0cb)
mergify bot pushed a commit that referenced this pull request Nov 15, 2024
Signed-off-by: stdpain <drfeng08@gmail.com>
(cherry picked from commit 8bda0cb)
wanpengfei-git pushed a commit that referenced this pull request Nov 15, 2024
)

Co-authored-by: stdpain <34912776+stdpain@users.noreply.github.com>
wanpengfei-git pushed a commit that referenced this pull request Nov 15, 2024
)

Co-authored-by: stdpain <34912776+stdpain@users.noreply.github.com>
@stdpain stdpain deleted the fix_array_map_crash branch December 4, 2024 07:03
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants