apache / doris

Apache Doris is an easy-to-use, high performance and unified analytics database.
https://doris.apache.org
Apache License 2.0
12.65k stars 3.26k forks source link

[Bug] DCHECK(_data_types[i]->is_nullable()) core #9952

Closed deardeng closed 2 years ago

deardeng commented 2 years ago

Search before asking

Version

dev1.0.1

What's Wrong?

core

I0604 10:31:51.350235 3201159 env.cpp:46] Env init successfully. Check failure stack trace: @ 0x55ccf755979d google::LogMessage::Fail() @ 0x55ccf755bcd9 google::LogMessage::SendToLog() @ 0x55ccf7559306 google::LogMessage::Flush() @ 0x55ccf755c349 google::LogMessageFatal::~LogMessageFatal() @ 0x55ccf3e6a49b doris::vectorized::MutableBlock::merge<>() @ 0x55ccf3e6349e doris::vectorized::VUnionNode::get_next_materialized() @ 0x55ccf3e66125 doris::vectorized::VUnionNode::get_next() @ 0x55ccf3d1fdeb doris::vectorized::AggregationNode::open() @ 0x55ccf23b1b9d doris::PlanFragmentExecutor::open_vectorized_internal() @ 0x55ccf23b109e doris::PlanFragmentExecutor::open() @ 0x55ccf21ac1a1 doris::FragmentExecState::execute() @ 0x55ccf21b3e8c doris::FragmentMgr::_exec_actual() @ 0x55ccf21fb01e std::invoke_impl<>() @ 0x55ccf21f9afb _ZSt10invoke_rIvRMN5doris11FragmentMgrEFvSt10shared_ptrINS0_17FragmentExecStateEESt8functionIFvPNS0_20PlanFragmentExecutorEEEEJRPS1_RS4_RS9_EENSt9enable_ifIX16is_invocable_r_vIT_T0_DpT1_EESI_E4typeEOSJDpOSK @ 0x55ccf21f7e4e _ZNSt12_Bind_resultIvFMN5doris11FragmentMgrEFvSt10shared_ptrINS0_17FragmentExecStateEESt8functionIFvPNS0_20PlanFragmentExecutorEEEEPS1_S4_S9_EE6callIvJEJLm0ELm1ELm2EEEET_OSt5tupleIJDpT0_EESt12_Index_tupleIJXspT1_EEE @ 0x55ccf21f4733 std::_Bind_result<>::operator()<>() @ 0x55ccf21ef7e6 std::invoke_impl<>() @ 0x55ccf21e7916 _ZSt10invoke_rIvRSt12_Bind_resultIvFMN5doris11FragmentMgrEFvSt10shared_ptrINS1_17FragmentExecStateEESt8functionIFvPNS1_20PlanFragmentExecutorEEEEPS2_S5_SA_EEJEENSt9enable_ifIX16is_invocable_r_vIT_T0_DpT1_EESI_E4typeEOSJDpOSK @ 0x55ccf21df7bb std::_Function_handler<>::_M_invoke() @ 0x55ccf212d494 std::function<>::operator()() @ 0x55ccf276260a doris::FunctionRunnable::run() @ 0x55ccf275d6f2 doris::ThreadPool::dispatch_thread() @ 0x55ccf277e008 std::__invoke_impl<>() @ 0x55ccf277d8a7 std::invoke<>() @ 0x55ccf277cc46 _ZNSt5_BindIFMN5doris10ThreadPoolEFvvEPS1_EE6callIvJEJLm0EEEET_OSt5tupleIJDpT0_EESt12_Index_tupleIJXspT1_EEE @ 0x55ccf277b749 std::_Bind<>::operator()<>() @ 0x55ccf27782b0 std::invoke_impl<>() @ 0x55ccf2775bd4 _ZSt10invoke_rIvRSt5_BindIFMN5doris10ThreadPoolEFvvEPS2_EEJEENSt9enable_ifIX16is_invocable_r_vIT_T0_DpT1_EESA_E4typeEOSBDpOSC @ 0x55ccf2770f25 std::_Function_handler<>::_M_invoke() @ 0x55ccf212d494 std::function<>::operator()() @ 0x55ccf2741e2c doris::Thread::supervise_thread() @ 0x7f4ff31f7450 start_thread Aborted at 1654311952 (unix time) try "date -d @1654311952" if you are using GNU date SIGABRT unkown detail explain (@0x30d887) received by PID 3201159 (TID 0x7f4f9e4c2640) from PID 3201159; stack trace: 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t, void) at /mnt/hdd01/repo_center/selectdb_dev-1.0.1/selectdb/be/src/common/signal_handler.h:420 1# 0x00007F4FF3251040 in /lib/x86_64-linux-gnu/libc.so.6 2# raise in /lib/x86_64-linux-gnu/libc.so.6 3# abort in /lib/x86_64-linux-gnu/libc.so.6 4# google::ReadFromOffset(int, void, unsigned long, long) [clone .cold] at src/symbolize.cc:146 5# 0x000055CCF755979D at src/logging.cc:1650 6# google::LogMessage::SendToLog() at src/logging.cc:1607 7# google::LogMessage::Flush() at src/logging.cc:1477 8# google::LogMessageFatal::~LogMessageFatal() at src/logging.cc:2227 9# void doris::vectorized::MutableBlock::merge(doris::vectorized::Block&&) at /mnt/hdd01/repo_center/selectdb_dev-1.0.1/selectdb/be/src/vec/core/block.h:367 10# doris::vectorized::VUnionNode::get_next_materialized(doris::RuntimeState, doris::vectorized::Block) at /mnt/hdd01/repo_center/selectdb_dev-1.0.1/selectdb/be/src/vec/exec/vunion_node.cpp:151 11# doris::vectorized::VUnionNode::get_next(doris::RuntimeState, doris::vectorized::Block, bool) at /mnt/hdd01/repo_center/selectdb_dev-1.0.1/selectdb/be/src/vec/exec/vunion_node.cpp:230 12# doris::vectorized::AggregationNode::open(doris::RuntimeState) at /mnt/hdd01/repo_center/selectdb_dev-1.0.1/selectdb/be/src/vec/exec/vaggregation_node.cpp:352 13# doris::PlanFragmentExecutor::open_vectorized_internal() at /mnt/hdd01/repo_center/selectdb_dev-1.0.1/selectdb/be/src/runtime/plan_fragment_executor.cpp:280 14# doris::PlanFragmentExecutor::open() at /mnt/hdd01/repo_center/selectdb_dev-1.0.1/selectdb/be/src/runtime/plan_fragment_executor.cpp:255 15# doris::FragmentExecState::execute() at /mnt/hdd01/repo_center/selectdb_dev-1.0.1/selectdb/be/src/runtime/fragment_mgr.cpp:241 16# doris::FragmentMgr::_exec_actual(std::shared_ptr, std::function<void (doris::PlanFragmentExecutor)>) at /mnt/hdd01/repo_center/selectdb_dev-1.0.1/selectdb/be/src/runtime/fragment_mgr.cpp:474 17# void std::__invoke_impl<void, void (doris::FragmentMgr::&)(std::shared_ptr, std::function<void (doris::PlanFragmentExecutor)>), doris::FragmentMgr&, std::shared_ptr&, std::function<void (doris::PlanFragmentExecutor)>&>(std::invoke_memfun_deref, void (doris::FragmentMgr::&)(std::shared_ptr, std::function<void (doris::PlanFragmentExecutor)>), doris::FragmentMgr&, std::shared_ptr&, std::function<void (doris::PlanFragmentExecutor)>&) in /mnt/hdd01/SELECTDB_1.0.1_ASAN/be/lib/palo_be 18# std::enable_if<is_invocable_r_v<void, void (doris::FragmentMgr::&)(std::shared_ptr, std::function<void (doris::PlanFragmentExecutor)>), doris::FragmentMgr&, std::shared_ptr&, std::function<void (doris::PlanFragmentExecutor)>&>, void>::type std::invoke_r<void, void (doris::FragmentMgr::&)(std::shared_ptr, std::function<void (doris::PlanFragmentExecutor)>), doris::FragmentMgr&, std::shared_ptr&, std::function<void (doris::PlanFragmentExecutor)>&>(void (doris::FragmentMgr::&)(std::shared_ptr, std::function<void (doris::PlanFragmentExecutor)>), doris::FragmentMgr&, std::shared_ptr&, std::function<void (doris::PlanFragmentExecutor)>&) in /mnt/hdd01/SELECTDB_1.0.1_ASAN/be/lib/palo_be 19# void std::_Bind_result<void, void (doris::FragmentMgr::(doris::FragmentMgr, std::shared_ptr, std::function<void (doris::PlanFragmentExecutor)>))(std::shared_ptr, std::function<void (doris::PlanFragmentExecutor)>)>::call<void, , 0ul, 1ul, 2ul>(std::tuple<>&&, std::_Index_tuple<0ul, 1ul, 2ul>) in /mnt/hdd01/SELECTDB_1.0.1_ASAN/be/lib/palo_be 20# void std::_Bind_result<void, void (doris::FragmentMgr::(doris::FragmentMgr, std::shared_ptr, std::function<void (doris::PlanFragmentExecutor)>))(std::shared_ptr, std::function<void (doris::PlanFragmentExecutor)>)>::operator()<>() at /var/local/ldb_toolchain/include/c++/11/functional:631 21# void std::invoke_impl<void, std::_Bind_result<void, void (doris::FragmentMgr::(doris::FragmentMgr, std::shared_ptr, std::function<void (doris::PlanFragmentExecutor)>))(std::shared_ptr, std::function<void (doris::PlanFragmentExecutor)>)>&>(std::invoke_other, std::_Bind_result<void, void (doris::FragmentMgr::(doris::FragmentMgr, std::shared_ptr, std::function<void (doris::PlanFragmentExecutor)>))(std::shared_ptr, std::function<void (doris::PlanFragmentExecutor)>)>&) in /mnt/hdd01/SELECTDB_1.0.1_ASAN/be/lib/palo_be 22# std::enable_if<is_invocable_r_v<void, std::_Bind_result<void, void (doris::FragmentMgr::(doris::FragmentMgr, std::shared_ptr, std::function<void (doris::PlanFragmentExecutor)>))(std::shared_ptr, std::function<void (doris::PlanFragmentExecutor)>)>&>, void>::type std::invoke_r<void, std::_Bind_result<void, void (doris::FragmentMgr::(doris::FragmentMgr, std::shared_ptr, std::function<void (doris::PlanFragmentExecutor)>))(std::shared_ptr, std::function<void (doris::PlanFragmentExecutor)>)>&>(std::_Bind_result<void, void (doris::FragmentMgr::(doris::FragmentMgr, std::shared_ptr, std::function<void (doris::PlanFragmentExecutor)>))(std::shared_ptr, std::function<void (doris::PlanFragmentExecutor)>)>&) in /mnt/hdd01/SELECTDB_1.0.1_ASAN/be/lib/palo_be 23# std::_Function_handler<void (), std::_Bind_result<void, void (doris::FragmentMgr::(doris::FragmentMgr, std::shared_ptr, std::function<void (doris::PlanFragmentExecutor)>))(std::shared_ptr, std::function<void (doris::PlanFragmentExecutor)>)> >::_M_invoke(std::_Any_data const&) at /var/local/ldb_toolchain/include/c++/11/bits/std_function.h:292 24# std::function<void ()>::operator()() const at /var/local/ldb_toolchain/include/c++/11/bits/std_function.h:560 25# doris::FunctionRunnable::run() at /mnt/hdd01/repo_center/selectdb_dev-1.0.1/selectdb/be/src/util/threadpool.cpp:42 26# doris::ThreadPool::dispatch_thread() at /mnt/hdd01/repo_center/selectdb_dev-1.0.1/selectdb/be/src/util/threadpool.cpp:578 27# void std::invoke_impl<void, void (doris::ThreadPool::&)(), doris::ThreadPool&>(std::invoke_memfun_deref, void (doris::ThreadPool::&)(), doris::ThreadPool&) at /var/local/ldb_toolchain/include/c++/11/bits/invoke.h:74 28# std::__invoke_result<void (doris::ThreadPool::&)(), doris::ThreadPool&>::type std::invoke<void (doris::ThreadPool::&)(), doris::ThreadPool&>(void (doris::ThreadPool::&)(), doris::ThreadPool&) at /var/local/ldb_toolchain/include/c++/11/bits/invoke.h:97 29# void std::_Bind<void (doris::ThreadPool::(doris::ThreadPool))()>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) at /var/local/ldb_toolchain/include/c++/11/functional:422 30# void std::_Bind<void (doris::ThreadPool::(doris::ThreadPool))()>::operator()<, void>() at /var/local/ldb_toolchain/include/c++/11/functional:505 31# void std::invoke_impl<void, std::_Bind<void (doris::ThreadPool::(doris::ThreadPool))()>&>(std::invoke_other, std::_Bind<void (doris::ThreadPool::(doris::ThreadPool))()>&) at /var/local/ldb_toolchain/include/c++/11/bits/invoke.h:61 32# std::enable_if<is_invocable_r_v<void, std::_Bind<void (doris::ThreadPool::(doris::ThreadPool))()>&>, void>::type std::__invoke_r<void, std::_Bind<void (doris::ThreadPool::(doris::ThreadPool))()>&>(std::_Bind<void (doris::ThreadPool::(doris::ThreadPool))()>&) at /var/local/ldb_toolchain/include/c++/11/bits/invoke.h:117 33# std::_Function_handler<void (), std::_Bind<void (doris::ThreadPool::(doris::ThreadPool))()> >::_M_invoke(std::_Any_data const&) at /var/local/ldb_toolchain/include/c++/11/bits/std_function.h:292 34# std::function<void ()>::operator()() const at /var/local/ldb_toolchain/include/c++/11/bits/std_function.h:560 35# doris::Thread::supervise_thread(void*) at /mnt/hdd01/repo_center/selectdb_dev-1.0.1/selectdb/be/src/util/thread.cpp:407 36# start_thread in /lib/x86_64-linux-gnu/libpthread.so.0 37# clone in /lib/x86_64-linux-gnu/libc.so.6

What You Expected?

no core

How to Reproduce?

use regression_test_tpcds_sf1000;

MySQL [regression_test_tpcds_sf1000]> SELECT 'web' channel , web.item , web.return_ratio , web.return_rank , web.currency_rank FROM ( SELECT item , return_ratio , currency_ratio , rank() OVER (ORDER BY return_ratio ASC) return_rank , rank() OVER (ORDER BY currency_ratio ASC) currency_rank FROM ( SELECT ws.ws_item_sk item , (CAST(sum(COALESCE(wr.wr_return_quantity, 0)) AS DECIMAL(15,4)) / CAST(sum(COALESCE(ws.ws_quantity, 0)) AS DECIMAL(15,4))) return_ratio , (CAST(sum(COALESCE(wr.wr_return_amt, 0)) AS DECIMAL(15,4)) / CAST(sum(COALESCE(ws.ws_net_paid, 0)) AS DECIMAL(15,4))) currency_ratio FROM web_sales ws LEFT JOIN web_returns wr ON (ws.ws_order_number = wr.wr_order_number) AND (ws.ws_item_sk = wr.wr_item_sk) , date_dim WHERE (wr.wr_return_amt > 10000) AND (ws.ws_net_profit > 1) AND (ws.ws_net_paid > 0) AND (ws.ws_quantity > 0) AND (ws_sold_date_sk = d_date_sk) AND (d_year = 2001) AND (d_moy = 12) GROUP BY ws.ws_item_sk ) in_web ) web WHERE (web.return_rank <= 10) OR (web.currency_rank <= 10) UNION SELECT 'catalog' channel , catalog.item , catalog.return_ratio , catalog.return_rank , catalog.currency_rank FROM ( SELECT item , return_ratio , currency_ratio , rank() OVER (ORDER BY return_ratio ASC) return_rank , rank() OVER (ORDER BY currency_ratio ASC) currency_rank FROM ( SELECT cs.cs_item_sk item , (CAST(sum(COALESCE(cr.cr_return_quantity, 0)) AS DECIMAL(15,4)) / CAST(sum(COALESCE(cs.cs_quantity, 0)) AS DECIMAL(15,4))) return_ratio , (CAST(sum(COALESCE(cr.cr_return_amount, 0)) AS DECIMAL(15,4)) / CAST(sum(COALESCE(cs.cs_net_paid, 0)) AS DECIMAL(15,4))) currency_ratio FROM catalog_sales cs LEFT JOIN catalog_returns cr ON (cs.cs_order_number = cr.cr_order_number) AND (cs.cs_item_sk = cr.cr_item_sk) , date_dim WHERE (cr.cr_return_amount > 10000) AND (cs.cs_net_profit > 1) AND (cs.cs_net_paid > 0) AND (cs.cs_quantity > 0) AND (cs_sold_date_sk = d_date_sk) AND (d_year = 2001) AND (d_moy = 12) GROUP BY cs.cs_item_sk ) in_cat ) catalog WHERE (catalog.return_rank <= 10) OR (catalog.currency_rank <= 10) UNION SELECT 'store' channel , store.item , store.return_ratio , store.return_rank , store.currency_rank FROM ( SELECT item , return_ratio , currency_ratio , rank() OVER (ORDER BY return_ratio ASC) return_rank , rank() OVER (ORDER BY currency_ratio ASC) currency_rank FROM ( SELECT sts.ss_item_sk item , (CAST(sum(COALESCE(sr.sr_return_quantity, 0)) AS DECIMAL(15,4)) / CAST(sum(COALESCE(sts.ss_quantity, 0)) AS DECIMAL(15,4))) return_ratio , (CAST(sum(COALESCE(sr.sr_return_amt, 0)) AS DECIMAL(15,4)) / CAST(sum(COALESCE(sts.ss_net_paid, 0)) AS DECIMAL(15,4))) currency_ratio FROM store_sales sts LEFT JOIN store_returns sr ON (sts.ss_ticket_number = sr.sr_ticket_number) AND (sts.ss_item_sk = sr.sr_item_sk) , date_dim WHERE (sr.sr_return_amt > 10000) AND (sts.ss_net_profit > 1) AND (sts.ss_net_paid > 0) AND (sts.ss_quantity > 0) AND (ss_sold_date_sk = d_date_sk) AND (d_year = 2001) AND (d_moy = 12) GROUP BY sts.ss_item_sk ) in_store ) store WHERE (store.return_rank <= 10) OR (store.currency_rank <= 10) ORDER BY 1 ASC, 4 ASC, 5 ASC, 2 ASC LIMIT 100; ^@^@^@^@ERROR 1105 (HY000): RpcException, msg: io.grpc.StatusRuntimeException: UNAVAILABLE: Network closed for unknown reason

Anything Else?

No response

Are you willing to submit PR?

Code of Conduct

dataroaring commented 2 years ago

This should be introduced by https://github.com/apache/incubator-doris/pull/9927. @morrySnow