Skip to content

[Bug](date) Fix BE crash caused by function datediff#16397

Merged
yiguolei merged 2 commits intoapache:masterfrom
Gabriel39:fix_datediff
Feb 4, 2023
Merged

[Bug](date) Fix BE crash caused by function datediff#16397
yiguolei merged 2 commits intoapache:masterfrom
Gabriel39:fix_datediff

Conversation

@Gabriel39
Copy link
Contributor

@Gabriel39 Gabriel39 commented Feb 3, 2023

Proposed changes

** Current BE git commitID: dbbb417 ***
*** SIGABRT unkown detail explain (@0x43c000a1ed5) received by PID 663253 (TID 663525 OR 0x7e8a62717700) from PID 663253; stack trace: ***
0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /mnt/disk2/tengjianping/doris/be/src/common/signal_handler.h:428
1# 0x00007F37EB3E2C20 in /lib64/libpthread.so.0
2# __GI_raise in /lib64/libc.so.6
3# __GI_abort in /lib64/libc.so.6
4# 0x000056540ACBB109 in /mnt/disk2/tengjianping/doris/output/be/lib/doris_be
5# 0x000056540ACB071D in /mnt/disk2/tengjianping/doris/output/be/lib/doris_be
6# google::LogMessage::SendToLog() in /mnt/disk2/tengjianping/doris/output/be/lib/doris_be
7# google::LogMessage::Flush() in /mnt/disk2/tengjianping/doris/output/be/lib/doris_be
8# google::LogMessageFatal::~LogMessageFatal() in /mnt/disk2/tengjianping/doris/output/be/lib/doris_be
9# doris::vectorized::DateTimeOp<long, long, int, doris::vectorized::DateDiffImpl<doris::vectorized::DataTypeDateTime, doris::vectorized::DataTypeDateTime> >::constant_vector(long const&, doris::vectorized::PODArray<int, 4096ul, Allocator<false, false>, 15ul, 16ul>&, doris::vectorized::PODArray<long, 4096ul, Allocator<false, false>, 15ul, 16ul> const&) at /mnt/disk2/tengjianping/doris/be/src/vec/functions/function_date_or_datetime_computation.h:439
10# doris::vectorized::DateTimeAddIntervalImpl<long, doris::vectorized::DateDiffImpl<doris::vectorized::DataTypeDateTime, doris::vectorized::DataTypeDateTime>, long>::execute(doris::vectorized::Block&, std::vector<unsigned long, std::allocator > const&, unsigned long, unsigned long) at /mnt/disk2/tengjianping/doris/be/src/vec/functions/function_date_or_datetime_computation.h:550
11# doris::vectorized::FunctionDateOrDateTimeComputation<doris::vectorized::DateDiffImpl<doris::vectorized::DataTypeDateTime, doris::vectorized::DataTypeDateTime> >::execute_impl(doris_udf::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator > const&, unsigned long, unsigned long) at /mnt/disk2/tengjianping/doris/be/src/vec/functions/function_date_or_datetime_computation.h:717
12# doris::vectorized::DefaultExecutable::execute_impl(doris_udf::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator > const&, unsigned long, unsigned long) at /mnt/disk2/tengjianping/doris/be/src/vec/functions/function.h:478
13# doris::vectorized::PreparedFunctionImpl::execute_without_low_cardinality_columns(doris_udf::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator > const&, unsigned long, unsigned long, bool) at /mnt/disk2/tengjianping/doris/be/src/vec/functions/function.cpp:252
14# doris::vectorized::PreparedFunctionImpl::execute(doris_udf::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator > const&, unsigned long, unsigned long, bool) at /mnt/disk2/tengjianping/doris/be/src/vec/functions/function.cpp:274
15# doris::vectorized::IFunctionBase::execute(doris_udf::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator > const&, unsigned long, unsigned long, bool) at /mnt/disk2/tengjianping/doris/be/src/vec/functions/function.h:147
16# doris::vectorized::VectorizedFnCall::execute(doris::vectorized::VExprContext*, doris::vectorized::Block*, int*) at /mnt/disk2/tengjianping/doris/be/src/vec/exprs/vectorized_fn_call.cpp:108
17# doris::vectorized::VectorizedFnCall::execute(doris::vectorized::VExprContext*, doris::vectorized::Block*, int*) at /mnt/disk2/tengjianping/doris/be/src/vec/exprs/vectorized_fn_call.cpp:92
18# doris::vectorized::VExprContext::execute(doris::vectorized::Block*, int*) at /mnt/disk2/tengjianping/doris/be/src/vec/exprs/vexpr_context.cpp:44
19# doris::vectorized::VDataStreamSender::get_partition_column_result(doris::vectorized::Block*, int*) const at /mnt/disk2/tengjianping/doris/be/src/vec/sink/vdata_stream_sender.h:98
20# doris::vectorized::VDataStreamSender::send(doris::RuntimeState*, doris::vectorized::Block*, bool) at /mnt/disk2/tengjianping/doris/be/src/vec/sink/vdata_stream_sender.cpp:513
21# doris::PlanFragmentExecutor::open_vectorized_internal() at /mnt/disk2/tengjianping/doris/be/src/runtime/plan_fragment_executor.cpp:295
22# doris::PlanFragmentExecutor::open() at /mnt/disk2/tengjianping/doris/be/src/runtime/plan_fragment_executor.cpp:237
23# doris::FragmentExecState::execute() at /mnt/disk2/tengjianping/doris/be/src/runtime/fragment_mgr.cpp:250
24# doris::FragmentMgr::_exec_actual(std::shared_ptrdoris::FragmentExecState, std::function<void (doris::RuntimeState*, doris::Status*)>) at /mnt/disk2/tengjianping/doris/be/src/runtime/fragment_mgr.cpp:490

Problem summary

Describe your changes.

Checklist(Required)

  1. Does it affect the original behavior:
    • Yes
    • No
    • I don't know
  2. Has unit tests been added:
    • Yes
    • No
    • No Need
  3. Has document been added or modified:
    • Yes
    • No
    • No Need
  4. Does it need to update dependencies:
    • Yes
    • No
  5. Are there any changes that cannot be rolled back:
    • Yes (If Yes, please explain WHY)
    • No

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...

@github-actions github-actions bot added area/sql/function Issues or PRs related to the SQL functions area/vectorization kind/test labels Feb 3, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2023

clang-tidy review says "All clean, LGTM! 👍"

@hello-stephen
Copy link
Contributor

TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 34.11 seconds
load time: 485 seconds
storage size: 17170997935 Bytes
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230203112121_clickbench_pr_90105.html

Copy link
Contributor

@yiguolei yiguolei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Contributor

@yiguolei yiguolei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@yiguolei yiguolei merged commit 918004c into apache:master Feb 4, 2023
morningman pushed a commit that referenced this pull request Feb 5, 2023
* [Bug](date) Fix BE crash caused by function `datediff`

* update
dutyu pushed a commit to dutyu/doris that referenced this pull request Feb 6, 2023
* [Bug](date) Fix BE crash caused by function `datediff`

* update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants