-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[Bug](memory) Fix exception-unsafe in aggregation node #28483
[Bug](memory) Fix exception-unsafe in aggregation node #28483
Conversation
run buildall |
clang-tidy review says "All clean, LGTM! 👍" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR approved by anyone and no changes requested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR approved by at least one committer and no changes requested. |
(From new machine)TeamCity pipeline, clickbench performance test result: |
The alloc function may throw std::bad_alloc exception when the process memory exceed limit. be.INFO: W1214 09:14:17.434849 771103 mem_tracker_limiter.cpp:204] Memory limit exceeded:<consuming tracker:<Load#Id=28448230da1f432e-8a66597e1032 9235>, process memory used 20.41 GB exceed limit 18.76 GB or sys mem available 9.04 GB less than low water mark 1.60 GB, failed alloc siz e 1.86 MB>, executing msg:<execute:<>>. backend xx.x.x.xxx process memory used 20.41 GB, limit 18.76 GB. If query tracker exceed, set ex ec_mem_limit=8G to change limit, details see be.INFO. Process Memory Summary: OS physical memory 31.26 GB. Process memory usage 20.41 GB, limit 18.76 GB, soft limit 16.88 GB. Sys available memory 9.04 GB, low wa ter mark 1.60 GB, warning water mark 3.20 GB. Refresh interval memory growth 0 B Alloc Stacktrace: @ 0x555cd858bee9 doris::MemTrackerLimiter::print_log_usage() @ 0x555cd859a384 doris::ThreadMemTrackerMgr::exceeded() @ 0x555cd85a0ac4 malloc @ 0x555cd8fcf368 Allocator<>::alloc() @ 0x555cd8fdbdaf doris::vectorized::Arena::add_chunk() @ 0x555cd96dc0ab doris::vectorized::AggregateDataContainer::_expand() @ 0x555cd96aded8 (unknown) @ 0x555cd969fa2c doris::vectorized::AggregationNode::_pre_agg_with_serialized_key() @ 0x555cd96d1d61 std::_Function_handler<>::_M_invoke() @ 0x555cd967ab0b doris::vectorized::AggregationNode::get_next() @ 0x555cd81282a6 doris::ExecNode::get_next_after_projects() @ 0x555cd8452968 doris::PlanFragmentExecutor::get_vectorized_internal() @ 0x555cd845553b doris::PlanFragmentExecutor::open_vectorized_internal() @ 0x555cd8456a9e doris::PlanFragmentExecutor::open() @ 0x555cd842f200 doris::FragmentExecState::execute() @ 0x555cd843280e doris::FragmentMgr::_exec_actual() @ 0x555cd8432d42 _ZNSt17_Function_handlerIFvvEZN5doris11FragmentMgr18exec_plan_fragmentERKNS1_23TExecPlanFragmentParamsESt8funct ionIFvPNS1_20PlanFragmentExecutorEEEEUlvE_E9_M_invokeERKSt9_Any_data @ 0x555cd86ead05 doris::ThreadPool::dispatch_thread() @ 0x555cd86e015f doris::Thread::supervise_thread() @ 0x7f3321593ea5 start_thread @ 0x7f33218a69fd __clone @ (nil) (unknown)
The alloc function may throw std::bad_alloc exception when the process memory exceed limit. be.INFO: W1214 09:14:17.434849 771103 mem_tracker_limiter.cpp:204] Memory limit exceeded:<consuming tracker:<Load#Id=28448230da1f432e-8a66597e1032 9235>, process memory used 20.41 GB exceed limit 18.76 GB or sys mem available 9.04 GB less than low water mark 1.60 GB, failed alloc siz e 1.86 MB>, executing msg:<execute:<>>. backend xx.x.x.xxx process memory used 20.41 GB, limit 18.76 GB. If query tracker exceed, set ex ec_mem_limit=8G to change limit, details see be.INFO. Process Memory Summary: OS physical memory 31.26 GB. Process memory usage 20.41 GB, limit 18.76 GB, soft limit 16.88 GB. Sys available memory 9.04 GB, low wa ter mark 1.60 GB, warning water mark 3.20 GB. Refresh interval memory growth 0 B Alloc Stacktrace: @ 0x555cd858bee9 doris::MemTrackerLimiter::print_log_usage() @ 0x555cd859a384 doris::ThreadMemTrackerMgr::exceeded() @ 0x555cd85a0ac4 malloc @ 0x555cd8fcf368 Allocator<>::alloc() @ 0x555cd8fdbdaf doris::vectorized::Arena::add_chunk() @ 0x555cd96dc0ab doris::vectorized::AggregateDataContainer::_expand() @ 0x555cd96aded8 (unknown) @ 0x555cd969fa2c doris::vectorized::AggregationNode::_pre_agg_with_serialized_key() @ 0x555cd96d1d61 std::_Function_handler<>::_M_invoke() @ 0x555cd967ab0b doris::vectorized::AggregationNode::get_next() @ 0x555cd81282a6 doris::ExecNode::get_next_after_projects() @ 0x555cd8452968 doris::PlanFragmentExecutor::get_vectorized_internal() @ 0x555cd845553b doris::PlanFragmentExecutor::open_vectorized_internal() @ 0x555cd8456a9e doris::PlanFragmentExecutor::open() @ 0x555cd842f200 doris::FragmentExecState::execute() @ 0x555cd843280e doris::FragmentMgr::_exec_actual() @ 0x555cd8432d42 _ZNSt17_Function_handlerIFvvEZN5doris11FragmentMgr18exec_plan_fragmentERKNS1_23TExecPlanFragmentParamsESt8funct ionIFvPNS1_20PlanFragmentExecutorEEEEUlvE_E9_M_invokeERKSt9_Any_data @ 0x555cd86ead05 doris::ThreadPool::dispatch_thread() @ 0x555cd86e015f doris::Thread::supervise_thread() @ 0x7f3321593ea5 start_thread @ 0x7f33218a69fd __clone @ (nil) (unknown)
Proposed changes
Issue Number: close #xxx
The alloc function may throw std::bad_alloc exception when the process memory exceed limit.
be.INFO:
coredump:
Further comments
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...