Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[BugFix] fix array_map crash (backport #55383) #55398

Open
wants to merge 1 commit into
base: branch-3.4
Choose a base branch
from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jan 24, 2025

Why I'm doing:

for BinaryColumnBase::replicate, it can allocate a huge vector, which size exceed uint32 max, so need to call upgrade_if_overflow to avoid check faild:
F20250123 12:27:53.005990 140324118660672 binary_column.cpp:36] Check failed: _bytes.size() == _offsets.back() (20624569792 vs. 3444700608)

W20250124 11:08:55.984929 140035107186240 stack_util.cpp:347] 2025-01-24 11:08:55.984899, query_id=8b99278a-da00-11ef-9066-00163e03f27c, fragment_instance_id=8b99278a-da00-11ef-9066-00163e03f284 throws exception: std::bad_alloc, trace:
     @          0x916689e  __wrap___cxa_throw
    @          0x5a4ab5e  starrocks::AllocatorFactory<starrocks::Allocator, starrocks::MemHookAllocator>::checked_alloc(unsigned long) [clone .part.0]
    @          0x5a4b449  starrocks::AllocatorFactory<starrocks::Allocator, starrocks::MemHookAllocator>::checked_alloc(unsigned long)
    @          0x5817894  std::vector<unsigned char, starrocks::raw::RawAllocator<unsigned char, 16ul, starrocks::ColumnAllocator<unsigned char> > >::_M_default_append(unsigned long)
    @          0x584bfce  starrocks::BinaryColumnBase<unsigned int>::replicate(std::vector<unsigned int, starrocks::ColumnAllocator<unsigned int> > const&)
    @          0x5867077  starrocks::NullableColumn::replicate(std::vector<unsigned int, starrocks::ColumnAllocator<unsigned int> > const&)
    @          0x83502ae  starrocks::StatusOr<std::shared_ptr<starrocks::Column> > starrocks::ArrayMapExpr::evaluate_lambda_expr<false, true>(starrocks::ExprContext*, starrocks::Chunk*, std::vector<std::shared_ptr<starrocks::Column>, std::allocator<std::shared_ptr<starrocks::Column      ^A
    @          0x8349863  starrocks::ArrayMapExpr::evaluate_checked(starrocks::ExprContext*, starrocks::Chunk*)
    @          0x5a50443  starrocks::ExprContext::evaluate(starrocks::Expr*, starrocks::Chunk*, unsigned char*)
    @          0x833ff14  starrocks::VectorizedFunctionCallExpr::evaluate_checked(starrocks::ExprContext*, starrocks::Chunk*)
    @          0x5a50443  starrocks::ExprContext::evaluate(starrocks::Expr*, starrocks::Chunk*, unsigned char*)
    @          0x5a50952  starrocks::ExprContext::evaluate(starrocks::Chunk*, unsigned char*)
    @          0x7f33a85  starrocks::pipeline::ProjectOperator::push_chunk(starrocks::RuntimeState*, std::shared_ptr<starrocks::Chunk> const&)
    @          0x579b088  starrocks::pipeline::PipelineDriver::process(starrocks::RuntimeState*, int)
    @          0x8cf53f3  starrocks::pipeline::GlobalDriverExecutor::_worker_thread()
    @          0x91a55a2  starrocks::ThreadPool::dispatch_thread()
    @          0x919d4c9  starrocks::Thread::supervise_thread(void*)
    @     0x7f5cf933bac3  (/usr/lib/x86_64-linux-gnu/libc.so.6+0x94ac2)
    @     0x7f5cf93cd850  (/usr/lib/x86_64-linux-gnu/libc.so.6+0x12684f)

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

Signed-off-by: before-Sunrise <[email protected]>
(cherry picked from commit d3f5052)
@mergify mergify bot mentioned this pull request Jan 24, 2025
24 tasks
@wanpengfei-git wanpengfei-git enabled auto-merge (squash) January 24, 2025 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant