sduzh opened a new issue #3874: URL: https://github.com/apache/incubator-doris/issues/3874
**Describe the bug** BE crashed when running the [sqlancer](https://github.com/sqlancer/sqlancer). **To Reproduce** ```SQL CREATE TABLE t0(c0 BIGINT , c1 TINYINT )DUPLICATE KEY(c0) DISTRIBUTED BY HASH(c0) BUCKETS 1 PROPERTIES("replication_num"="1"); SELECT t0.c0 FROM t0 GROUP BY t0.c1, t0.c0, (CASE 1861006235 WHEN 'F' THEN CAST(1204979723 AS BIGINT) ELSE CAST((CASE 1.114336248E9 WHEN t0.c0 THEN t0.c1 WHEN 1537846137 THEN t0.c1 ELSE 0.8768657399836599 END ) AS DATE) END ); ``` **Expected behavior** Query success **Real behavior** ``` ./bin/start_be.sh: line 96: 168749 Segmentation fault ``` stack frames ``` (gdb) bt #0 operator= (__x=std::vector of length 1, capacity 1 = {...}, this=0x100) at /home/disk1/doris-deps/toolchain/installed/gcc-7.5.0/include/c++/7.5.0/bits/vector.tcc:204 #1 doris::FunctionContextImpl::set_constant_args (this=0x0, constant_args=std::vector of length 1, capacity 1 = {...}) at /home/disk1/zhuming/incubator-doris/be/src/udf/udf.cpp:140 #2 0x0000000000d3ea68 in doris::ScalarFnCall::open (this=0x7195c00, state=<optimized out>, ctx=0x65e7a40, scope=<optimized out>) at /home/disk1/zhuming/incubator-doris/be/src/exprs/scalar_fn_call.cpp:188 #3 0x0000000000d20a42 in doris::Expr::open (this=this@entry=0x9898000, state=state@entry=0x9798700, context=context@entry=0x65e7a40, scope=doris_udf::FunctionContext::FRAGMENT_LOCAL) at /home/disk1/zhuming/incubator-doris/be/src/exprs/expr.cpp:571 #4 0x0000000000dbd6f5 in doris::CaseExpr::open (this=0x9898000, state=0x9798700, ctx=0x65e7a40, scope=<optimized out>) at /home/disk1/zhuming/incubator-doris/be/src/exprs/case_expr.cpp:53 #5 0x0000000000d29a44 in doris::ExprContext::open (this=<optimized out>, state=state@entry=0x9798700) at /home/disk1/zhuming/incubator-doris/be/src/exprs/expr_context.cpp:74 #6 0x000000000152c45f in doris::PartitionedHashTableCtx::Open (this=0x979ef00, state=state@entry=0x9798700) at /home/disk1/zhuming/incubator-doris/be/src/exec/partitioned_hash_table.cc:163 #7 0x00000000014e7a92 in doris::PartitionedAggregationNode::open (this=0x6729b80, state=0x9798700) at /home/disk1/zhuming/incubator-doris/be/src/exec/partitioned_aggregation_node.cc:275 #8 0x0000000001023575 in doris::PlanFragmentExecutor::open_internal (this=this@entry=0x97788b0) at /home/disk1/zhuming/incubator-doris/be/src/runtime/plan_fragment_executor.cpp:275 #9 0x0000000001023c2c in doris::PlanFragmentExecutor::open (this=this@entry=0x97788b0) at /home/disk1/zhuming/incubator-doris/be/src/runtime/plan_fragment_executor.cpp:259 #10 0x0000000000fb75e7 in doris::FragmentExecState::execute (this=0x9778840) at /home/disk1/zhuming/incubator-doris/be/src/runtime/fragment_mgr.cpp:212 #11 0x0000000000fb90c6 in doris::FragmentMgr::exec_actual(std::shared_ptr<doris::FragmentExecState>, std::function<void (doris::PlanFragmentExecutor*)>) (this=0x68c5c00, exec_state=std::shared_ptr<doris::FragmentExecState> (use count 4, weak count 0) = {...}, cb=...) at /home/disk1/zhuming/incubator-doris/be/src/runtime/fragment_mgr.cpp:399 #12 0x0000000000fbfd74 in operator() (a2=<error reading variable: access outside bounds of object referenced via synthetic pointer>, a1=..., p=<optimized out>, this=<optimized out>) at /home/disk1/zhuming/incubator-doris/thirdparty/installed/include/boost/bind/mem_fn_template.hpp:280 #13 operator()<boost::_mfi::mf2<void, doris::FragmentMgr, std::shared_ptr<doris::FragmentExecState>, std::function<void(doris::PlanFragmentExecutor*)> >, boost::_bi::list0> (a=<synthetic pointer>, f=..., this=<optimized out>) at /home/disk1/zhuming/incubator-doris/thirdparty/installed/include/boost/bind/bind.hpp:398 #14 operator() (this=<optimized out>) at /home/disk1/zhuming/incubator-doris/thirdparty/installed/include/boost/bind/bind.hpp:1294 #15 boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<void, boost::_mfi::mf2<void, doris::FragmentMgr, std::shared_ptr<doris::FragmentExecState>, std::function<void (doris::PlanFragmentExecutor*)> >, boost::_bi::list3<boost::_bi::value<doris::FragmentMgr*>, boost::_bi::value<std::shared_ptr<doris::FragmentExecState> >, boost::_bi::value<std::function<void (doris::PlanFragmentExecutor*)> > > >, void>::invoke(boost::detail::function::function_buffer&) (function_obj_ptr=...) at /home/disk1/zhuming/incubator-doris/thirdparty/installed/include/boost/function/function_template.hpp:159 #16 0x0000000000f8bb95 in operator() (this=0x7fa7ef5a77e8) at /home/disk1/zhuming/incubator-doris/thirdparty/installed/include/boost/function/function_template.hpp:759 #17 doris::PriorityThreadPool::work_thread (this=0x68c5c80, thread_id=<optimized out>) at /home/disk1/zhuming/incubator-doris/be/src/util/priority_thread_pool.hpp:138 #18 0x0000000001a40fdd in thread_proxy () #19 0x00007fa81b5feea5 in start_thread () from /lib64/libpthread.so.0 #20 0x00007fa81aa038dd in clone () from /lib64/libc.so.6 ``` ---------------------------------------------------------------- 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. 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