jacktengg opened a new pull request, #17297: URL: https://github.com/apache/doris/pull/17297
# Proposed changes Issue Number: close #xxx ## Problem summary min_by decimal type cause BE to coredump in release build: ``` select id, min_by (amount, time) pay_amount FROM t GROUP BY id ``` coredump callstack: ``` start time: Wed Mar 1 15:15:33 CST 2023 WARNING: Logging before InitGoogleLogging() is written to STDERR I0301 15:15:33.988014 1130487 env.cpp:46] Env init successfully. I0000 00:00:00.000000 1130487 vlog_is_on.cc:197] RAW: Set VLOG level for "*" to 10 *** Query id: 0-0 *** *** Aborted at 1677654998 (unix time) try "date -d @1677654998" if you are using GNU date *** *** SIGSEGV unkown detail explain (@0x0) received by PID 1130487 (TID 0x7efb363b1700) from PID 0; stack trace: *** 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /mnt/disk1/tengjianping/doris-1.1/be/src/common/signal_handler.h:428 1# 0x00007F485CEE7400 in /lib64/libc.so.6 2# void doris::AggregateFunctions::maxminby_merge<doris_udf::DecimalV2Val, doris_udf::BigIntVal, false>(doris_udf::FunctionContext*, doris_udf::StringVal const&, doris_udf::StringVal*) at /mnt/disk1/tengjianping/doris-1.1/be/src/exprs/aggregate_functions.cpp:603 3# doris::NewAggFnEvaluator::Update(doris::TupleRow const*, doris::Tuple*, void*) at /mnt/disk1/tengjianping/doris-1.1/be/src/exprs/new_agg_fn_evaluator.cc:403 4# doris::Status doris::PartitionedAggregationNode::ProcessBatch<false>(doris::RowBatch*, doris::PartitionedHashTableCtx*) at /mnt/disk1/tengjianping/doris-1.1/be/src/exec/partitioned_aggregation_node.cc:1457 5# doris::PartitionedAggregationNode::open(doris::RuntimeState*) at /mnt/disk1/tengjianping/doris-1.1/be/src/exec/partitioned_aggregation_node.cc:316 6# doris::HashJoinNode::open(doris::RuntimeState*) at /mnt/disk1/tengjianping/doris-1.1/be/src/exec/hash_join_node.cpp:273 7# doris::PartitionedAggregationNode::open(doris::RuntimeState*) at /mnt/disk1/tengjianping/doris-1.1/be/src/exec/partitioned_aggregation_node.cc:249 8# doris::PlanFragmentExecutor::open_internal() at /mnt/disk1/tengjianping/doris-1.1/be/src/runtime/plan_fragment_executor.cpp:370 9# doris::PlanFragmentExecutor::open() at /mnt/disk1/tengjianping/doris-1.1/be/src/runtime/plan_fragment_executor.cpp:261 ``` The reason is that `DecimalV2Val` uses __int128, and assignment of __int128 in -O3 release build has aliagnment problem. ## Checklist(Required) * [ ] Does it affect the original behavior * [ ] Has unit tests been added * [ ] Has document been added or modified * [ ] Does it need to update dependencies * [ ] Is this PR support rollback (If NO, please explain WHY) ## Further comments If this is a relatively large or complex change, kick off the discussion at [d...@doris.apache.org](mailto:d...@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc... -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org