console执行某些查询后,graphd 崩溃退出

  • nebula 版本:2.0GA
  • 部署方式:4台分布式 ,3台storage 单台graph
  • 硬件信息
    • 磁盘( 推荐使用 SSD)
    • CPU、内存信息
  • 问题的具体描述

在尝试编写gql语句时,使用一些函数,如 sum(collect(x)) 进行判断计算之类的操作,可能由于语法不正确,但是graphd进程直接崩溃退出。

  • 相关的 meta / storage / graph info 日志信息
    storage和graph没有产生任何日志信息,graphd进程直接崩溃。

    例如下边的语句
match (v:email)-[:emailid]->(mid:id)<-[:phoneid]-(phone:phone)-[:phoneid]->(ids:id) \
where id(v)=="xxxx" and sum(ids.isblack) > 0 return v

将语句修改成下边的则可以正常执行

match (v:email)-[:emailid]->(mid:id)<-[:phoneid]-(phone:phone)-[:phoneid]->(ids:id) where id(v)=="xxxx" with  v, sum(ids.isblack) as black where black > 0 return v

你贴下logs下面的 stderr.log 内容贴下

E0401 14:26:03.133814 215759 QueryInstance.cpp:103] SyntaxError: syntax error near `, sum([ '
E0401 14:26:24.038070 215759 QueryInstance.cpp:103] SyntaxError: syntax error near `|i in id'
*** Aborted at 1617258492 (unix time) try "date -d @1617258492" if you are using GNU date ***
PC: @          0x1a4e283 _ZNSt17_Function_handlerIFvPN6nebula7AggDataERKNS0_5ValueEEZNS0_18AggFunctionManagerC4EvEUlS2_S5_E9_E9_M_invokeERKSt9_Any_dataOS2_S5_
*** SIGSEGV (@0xa0) received by PID 215681 (TID 0x7f3c350fe700) from PID 160; stack trace: ***
    @          0x1e5f9c1 (unknown)
    @     0x7f3c6004762f (unknown)
    @          0x1a4e283 _ZNSt17_Function_handlerIFvPN6nebula7AggDataERKNS0_5ValueEEZNS0_18AggFunctionManagerC4EvEUlS2_S5_E9_E9_M_invokeERKSt9_Any_dataOS2_S5_
    @          0x13585a6 nebula::AggregateExpression::apply()
    @          0x1358d69 nebula::AggregateExpression::eval()
    @          0x1358caa nebula::AggregateExpression::eval()
    @          0x1340a20 nebula::RelationalExpression::eval()
    @          0x1356029 nebula::LogicalExpression::evalAnd()
    @          0x1356394 nebula::LogicalExpression::eval()
    @          0x1212d24 nebula::graph::FilterExecutor::execute()
    @          0x1315c8e nebula::graph::Scheduler::execute()
    @          0x1318a2b _ZN5folly6detail8function14FunctionTraitsIFvONS_3TryIN6nebula6StatusEEEEE9callSmallIZNS_7futures6detail10FutureBaseIS5_E18thenImplementationINS4_5graph9Scheduler8ExecTaskIZNSH_10doScheduleEPNSG_8ExecutorEEUlS5_E3_EENSC_14callableResultIS5_SM_EELb0EJOS5_EEENSt9enable_ifIXsrNT0_13ReturnsFutureE5valueENSR_6ReturnEE4typeEOT_NSC_9argResultIXT1_ESW_JDpT2_EEEEUlS7_E_EEvRNS1_4DataES7_
    @          0x10c4629 _ZN5folly6detail8function14FunctionTraitsIFvvEE9callSmallIZNS_7futures6detail4CoreIN6nebula6StatusEE10doCallbackEvEUlvE_EEvRNS1_4DataE
    @          0x10c4bcb folly::futures::detail::Core<>::doCallback()
    @          0x131590b _ZN5folly6detail8function14FunctionTraitsIFvONS_3TryISt6vectorIN6nebula6StatusESaIS6_EEEEEE9callSmallIZNS_7futures6detail10FutureBaseIS8_E18thenImplementationIZNS5_5graph9Scheduler18doScheduleParallelERKSt3setIPNSJ_8ExecutorESt4lessISN_ESaISN_EEEUlS8_E_NSF_14callableResultIS8_SU_EELb0EJOS8_EEENSt9enable_ifIXntsrNT0_13ReturnsFutureE5valueENSZ_6ReturnEE4typeEOT_NSF_9argResultIXT1_ES14_JDpT2_EEEEUlSA_E_EEvRNS1_4DataESA_
    @          0x131a9d1 _ZN5folly6detail8function14FunctionTraitsIFvvEE9callSmallIZNS_7futures6detail4CoreISt6vectorIN6nebula6StatusESaISB_EEE10doCallbackEvEUlvE_EEvRNS1_4DataE
    @          0x131baae folly::futures::detail::Core<>::doCallback()
    @          0x131d0d3 std::_Sp_counted_ptr_inplace<>::_M_dispose()
    @          0x1098367 std::_Sp_counted_base<>::_M_release()
    @          0x131a1a7 _ZN5folly6detail8function9execSmallIZNS_7collectIN9__gnu_cxx17__normal_iteratorIPNS_6FutureIN6nebula6StatusEEESt6vectorIS9_SaIS9_EEEEEENS6_ISB_INSt15iterator_traitsIT_E10value_type10value_typeESaISJ_EEEESG_SG_EUlONS_3TryIS8_EEE_EEbNS1_2OpEPNS1_4DataEST_
    @          0x10bf88a folly::futures::detail::Core<>::CoreAndCallbackReference::detach()
    @          0x10c4ce1 folly::futures::detail::Core<>::doCallback()
    @          0x10c4d5c folly::futures::detail::Core<>::doCallback()
    @          0x1318993 _ZN5folly6detail8function14FunctionTraitsIFvONS_3TryIN6nebula6StatusEEEEE9callSmallIZNS_7futures6detail10FutureBaseIS5_E18thenImplementationINS4_5graph9Scheduler8ExecTaskIZNSH_10doScheduleEPNSG_8ExecutorEEUlS5_E3_EENSC_14callableResultIS5_SM_EELb0EJOS5_EEENSt9enable_ifIXsrNT0_13ReturnsFutureE5valueENSR_6ReturnEE4typeEOT_NSC_9argResultIXT1_ESW_JDpT2_EEEEUlS7_E_EEvRNS1_4DataES7_
    @          0x10c4629 _ZN5folly6detail8function14FunctionTraitsIFvvEE9callSmallIZNS_7futures6detail4CoreIN6nebula6StatusEE10doCallbackEvEUlvE_EEvRNS1_4DataE
    @          0x10c4bcb folly::futures::detail::Core<>::doCallback()
    @          0x131590b _ZN5folly6detail8function14FunctionTraitsIFvONS_3TryISt6vectorIN6nebula6StatusESaIS6_EEEEEE9callSmallIZNS_7futures6detail10FutureBaseIS8_E18thenImplementationIZNS5_5graph9Scheduler18doScheduleParallelERKSt3setIPNSJ_8ExecutorESt4lessISN_ESaISN_EEEUlS8_E_NSF_14callableResultIS8_SU_EELb0EJOS8_EEENSt9enable_ifIXntsrNT0_13ReturnsFutureE5valueENSZ_6ReturnEE4typeEOT_NSF_9argResultIXT1_ES14_JDpT2_EEEEUlSA_E_EEvRNS1_4DataESA_
    @          0x131a9d1 _ZN5folly6detail8function14FunctionTraitsIFvvEE9callSmallIZNS_7futures6detail4CoreISt6vectorIN6nebula6StatusESaISB_EEE10doCallbackEvEUlvE_EEvRNS1_4DataE
    @          0x131baae folly::futures::detail::Core<>::doCallback()
    @          0x131d0d3 std::_Sp_counted_ptr_inplace<>::_M_dispose()
    @          0x1098367 std::_Sp_counted_base<>::_M_release()
    @          0x131a1a7 _ZN5folly6detail8function9execSmallIZNS_7collectIN9__gnu_cxx17__normal_iteratorIPNS_6FutureIN6nebula6StatusEEESt6vectorIS9_SaIS9_EEEEEENS6_ISB_INSt15iterator_traitsIT_E10value_type10value_typeESaISJ_EEEESG_SG_EUlONS_3TryIS8_EEE_EEbNS1_2OpEPNS1_4DataEST_
*** Aborted at 1617258679 (unix time) try "date -d @1617258679" if you are using GNU date ***
PC: @          0x1a4e283 _ZNSt17_Function_handlerIFvPN6nebula7AggDataERKNS0_5ValueEEZNS0_18AggFunctionManagerC4EvEUlS2_S5_E9_E9_M_invokeERKSt9_Any_dataOS2_S5_
*** SIGSEGV (@0xa0) received by PID 170650 (TID 0x7f51061ff700) from PID 160; stack trace: ***
    @          0x1e5f9c1 (unknown)
    @     0x7f513c8c162f (unknown)
    @          0x1a4e283 _ZNSt17_Function_handlerIFvPN6nebula7AggDataERKNS0_5ValueEEZNS0_18AggFunctionManagerC4EvEUlS2_S5_E9_E9_M_invokeERKSt9_Any_dataOS2_S5_
    @          0x13585a6 nebula::AggregateExpression::apply()
    @          0x1358d69 nebula::AggregateExpression::eval()
    @          0x1358caa nebula::AggregateExpression::eval()
    @          0x1340a20 nebula::RelationalExpression::eval()
    @          0x1356029 nebula::LogicalExpression::evalAnd()
    @          0x1356394 nebula::LogicalExpression::eval()
    @          0x1212d24 nebula::graph::FilterExecutor::execute()
    @          0x1315c8e nebula::graph::Scheduler::execute()
    @          0x1318a2b _ZN5folly6detail8function14FunctionTraitsIFvONS_3TryIN6nebula6StatusEEEEE9callSmallIZNS_7futures6detail10FutureBaseIS5_E18thenImplementationINS4_5graph9Scheduler8ExecTaskIZNSH_10doScheduleEPNSG_8ExecutorEEUlS5_E3_EENSC_14callableResultIS5_SM_EELb0EJOS5_EEENSt9enable_ifIXsrNT0_13ReturnsFutureE5valueENSR_6ReturnEE4typeEOT_NSC_9argResultIXT1_ESW_JDpT2_EEEEUlS7_E_EEvRNS1_4DataES7_
    @          0x10c4629 _ZN5folly6detail8function14FunctionTraitsIFvvEE9callSmallIZNS_7futures6detail4CoreIN6nebula6StatusEE10doCallbackEvEUlvE_EEvRNS1_4DataE
    @          0x10c4bcb folly::futures::detail::Core<>::doCallback()
    @          0x131590b _ZN5folly6detail8function14FunctionTraitsIFvONS_3TryISt6vectorIN6nebula6StatusESaIS6_EEEEEE9callSmallIZNS_7futures6detail10FutureBaseIS8_E18thenImplementationIZNS5_5graph9Scheduler18doScheduleParallelERKSt3setIPNSJ_8ExecutorESt4lessISN_ESaISN_EEEUlS8_E_NSF_14callableResultIS8_SU_EELb0EJOS8_EEENSt9enable_ifIXntsrNT0_13ReturnsFutureE5valueENSZ_6ReturnEE4typeEOT_NSF_9argResultIXT1_ES14_JDpT2_EEEEUlSA_E_EEvRNS1_4DataESA_
    @          0x131a9d1 _ZN5folly6detail8function14FunctionTraitsIFvvEE9callSmallIZNS_7futures6detail4CoreISt6vectorIN6nebula6StatusESaISB_EEE10doCallbackEvEUlvE_EEvRNS1_4DataE
    @          0x131baae folly::futures::detail::Core<>::doCallback()
    @          0x131d0d3 std::_Sp_counted_ptr_inplace<>::_M_dispose()
    @          0x1098367 std::_Sp_counted_base<>::_M_release()
    @          0x131a1a7 _ZN5folly6detail8function9execSmallIZNS_7collectIN9__gnu_cxx17__normal_iteratorIPNS_6FutureIN6nebula6StatusEEESt6vectorIS9_SaIS9_EEEEEENS6_ISB_INSt15iterator_traitsIT_E10value_type10value_typeESaISJ_EEEESG_SG_EUlONS_3TryIS8_EEE_EEbNS1_2OpEPNS1_4DataEST_
    @          0x10bf88a folly::futures::detail::Core<>::CoreAndCallbackReference::detach()
    @          0x10c4ce1 folly::futures::detail::Core<>::doCallback()
    @          0x10c4d5c folly::futures::detail::Core<>::doCallback()
    @          0x1318993 _ZN5folly6detail8function14FunctionTraitsIFvONS_3TryIN6nebula6StatusEEEEE9callSmallIZNS_7futures6detail10FutureBaseIS5_E18thenImplementationINS4_5graph9Scheduler8ExecTaskIZNSH_10doScheduleEPNSG_8ExecutorEEUlS5_E3_EENSC_14callableResultIS5_SM_EELb0EJOS5_EEENSt9enable_ifIXsrNT0_13ReturnsFutureE5valueENSR_6ReturnEE4typeEOT_NSC_9argResultIXT1_ESW_JDpT2_EEEEUlS7_E_EEvRNS1_4DataES7_
    @          0x10c4629 _ZN5folly6detail8function14FunctionTraitsIFvvEE9callSmallIZNS_7futures6detail4CoreIN6nebula6StatusEE10doCallbackEvEUlvE_EEvRNS1_4DataE
    @          0x10c4bcb folly::futures::detail::Core<>::doCallback()
    @          0x131590b _ZN5folly6detail8function14FunctionTraitsIFvONS_3TryISt6vectorIN6nebula6StatusESaIS6_EEEEEE9callSmallIZNS_7futures6detail10FutureBaseIS8_E18thenImplementationIZNS5_5graph9Scheduler18doScheduleParallelERKSt3setIPNSJ_8ExecutorESt4lessISN_ESaISN_EEEUlS8_E_NSF_14callableResultIS8_SU_EELb0EJOS8_EEENSt9enable_ifIXntsrNT0_13ReturnsFutureE5valueENSZ_6ReturnEE4typeEOT_NSF_9argResultIXT1_ES14_JDpT2_EEEEUlSA_E_EEvRNS1_4DataESA_
    @          0x131a9d1 _ZN5folly6detail8function14FunctionTraitsIFvvEE9callSmallIZNS_7futures6detail4CoreISt6vectorIN6nebula6StatusESaISB_EEE10doCallbackEvEUlvE_EEvRNS1_4DataE
    @          0x131baae folly::futures::detail::Core<>::doCallback()
    @          0x131d0d3 std::_Sp_counted_ptr_inplace<>::_M_dispose()
    @          0x1098367 std::_Sp_counted_base<>::_M_release()
    @          0x131a1a7 _ZN5folly6detail8function9execSmallIZNS_7collectIN9__gnu_cxx17__normal_iteratorIPNS_6FutureIN6nebula6StatusEEESt6vectorIS9_SaIS9_EEEEEENS6_ISB_INSt15iterator_traitsIT_E10value_type10value_typeESaISJ_EEEESG_SG_EUlONS_3TryIS8_EEE_EEbNS1_2OpEPNS1_4DataEST_
E0401 14:32:45.169212 171067 QueryInstance.cpp:103] SemanticError: Aggregate function nesting is not allowed: `sum(collect(ids.isblack))'
E0401 14:33:42.256481 171065 QueryInstance.cpp:103] SyntaxError: syntax error near `|i in id'
*** Aborted at 1617259076 (unix time) try "date -d @1617259076" if you are using GNU date ***
PC: @          0x1a4e283 _ZNSt17_Function_handlerIFvPN6nebula7AggDataERKNS0_5ValueEEZNS0_18AggFunctionManagerC4EvEUlS2_S5_E9_E9_M_invokeERKSt9_Any_dataOS2_S5_
*** SIGSEGV (@0xa0) received by PID 170943 (TID 0x7f7aeafff700) from PID 160; stack trace: ***
    @          0x1e5f9c1 (unknown)
    @     0x7f7b2149262f (unknown)
    @          0x1a4e283 _ZNSt17_Function_handlerIFvPN6nebula7AggDataERKNS0_5ValueEEZNS0_18AggFunctionManagerC4EvEUlS2_S5_E9_E9_M_invokeERKSt9_Any_dataOS2_S5_
    @          0x13585a6 nebula::AggregateExpression::apply()
    @          0x1358d69 nebula::AggregateExpression::eval()
    @          0x1368d0d nebula::ReduceExpression::eval()
    @          0x1229349 nebula::graph::ProjectExecutor::execute()
    @          0x1315c8e nebula::graph::Scheduler::execute()
    @          0x1318a2b _ZN5folly6detail8function14FunctionTraitsIFvONS_3TryIN6nebula6StatusEEEEE9callSmallIZNS_7futures6detail10FutureBaseIS5_E18thenImplementationINS4_5graph9Scheduler8ExecTaskIZNSH_10doScheduleEPNSG_8ExecutorEEUlS5_E3_EENSC_14callableResultIS5_SM_EELb0EJOS5_EEENSt9enable_ifIXsrNT0_13ReturnsFutureE5valueENSR_6ReturnEE4typeEOT_NSC_9argResultIXT1_ESW_JDpT2_EEEEUlS7_E_EEvRNS1_4DataES7_
    @          0x10c4629 _ZN5folly6detail8function14FunctionTraitsIFvvEE9callSmallIZNS_7futures6detail4CoreIN6nebula6StatusEE10doCallbackEvEUlvE_EEvRNS1_4DataE
    @          0x10c4bcb folly::futures::detail::Core<>::doCallback()
    @          0x131590b _ZN5folly6detail8function14FunctionTraitsIFvONS_3TryISt6vectorIN6nebula6StatusESaIS6_EEEEEE9callSmallIZNS_7futures6detail10FutureBaseIS8_E18thenImplementationIZNS5_5graph9Scheduler18doScheduleParallelERKSt3setIPNSJ_8ExecutorESt4lessISN_ESaISN_EEEUlS8_E_NSF_14callableResultIS8_SU_EELb0EJOS8_EEENSt9enable_ifIXntsrNT0_13ReturnsFutureE5valueENSZ_6ReturnEE4typeEOT_NSF_9argResultIXT1_ES14_JDpT2_EEEEUlSA_E_EEvRNS1_4DataESA_
    @          0x131a9d1 _ZN5folly6detail8function14FunctionTraitsIFvvEE9callSmallIZNS_7futures6detail4CoreISt6vectorIN6nebula6StatusESaISB_EEE10doCallbackEvEUlvE_EEvRNS1_4DataE
    @          0x131baae folly::futures::detail::Core<>::doCallback()
    @          0x131d0d3 std::_Sp_counted_ptr_inplace<>::_M_dispose()
    @          0x1098367 std::_Sp_counted_base<>::_M_release()
    @          0x131a1a7 _ZN5folly6detail8function9execSmallIZNS_7collectIN9__gnu_cxx17__normal_iteratorIPNS_6FutureIN6nebula6StatusEEESt6vectorIS9_SaIS9_EEEEEENS6_ISB_INSt15iterator_traitsIT_E10value_type10value_typeESaISJ_EEEESG_SG_EUlONS_3TryIS8_EEE_EEbNS1_2OpEPNS1_4DataEST_
    @          0x10bf88a folly::futures::detail::Core<>::CoreAndCallbackReference::detach()
    @          0x10c4ce1 folly::futures::detail::Core<>::doCallback()
    @          0x10c4d5c folly::futures::detail::Core<>::doCallback()
    @          0x1318993 _ZN5folly6detail8function14FunctionTraitsIFvONS_3TryIN6nebula6StatusEEEEE9callSmallIZNS_7futures6detail10FutureBaseIS5_E18thenImplementationINS4_5graph9Scheduler8ExecTaskIZNSH_10doScheduleEPNSG_8ExecutorEEUlS5_E3_EENSC_14callableResultIS5_SM_EELb0EJOS5_EEENSt9enable_ifIXsrNT0_13ReturnsFutureE5valueENSR_6ReturnEE4typeEOT_NSC_9argResultIXT1_ESW_JDpT2_EEEEUlS7_E_EEvRNS1_4DataES7_
    @          0x10c4629 _ZN5folly6detail8function14FunctionTraitsIFvvEE9callSmallIZNS_7futures6detail4CoreIN6nebula6StatusEE10doCallbackEvEUlvE_EEvRNS1_4DataE
    @          0x10c4bcb folly::futures::detail::Core<>::doCallback()
    @          0x131590b _ZN5folly6detail8function14FunctionTraitsIFvONS_3TryISt6vectorIN6nebula6StatusESaIS6_EEEEEE9callSmallIZNS_7futures6detail10FutureBaseIS8_E18thenImplementationIZNS5_5graph9Scheduler18doScheduleParallelERKSt3setIPNSJ_8ExecutorESt4lessISN_ESaISN_EEEUlS8_E_NSF_14callableResultIS8_SU_EELb0EJOS8_EEENSt9enable_ifIXntsrNT0_13ReturnsFutureE5valueENSZ_6ReturnEE4typeEOT_NSF_9argResultIXT1_ES14_JDpT2_EEEEUlSA_E_EEvRNS1_4DataESA_
    @          0x131a9d1 _ZN5folly6detail8function14FunctionTraitsIFvvEE9callSmallIZNS_7futures6detail4CoreISt6vectorIN6nebula6StatusESaISB_EEE10doCallbackEvEUlvE_EEvRNS1_4DataE
    @          0x131baae folly::futures::detail::Core<>::doCallback()
    @          0x131d0d3 std::_Sp_counted_ptr_inplace<>::_M_dispose()
    @          0x1098367 std::_Sp_counted_base<>::_M_release()
    @          0x131a1a7 _ZN5folly6detail8function9execSmallIZNS_7collectIN9__gnu_cxx17__normal_iteratorIPNS_6FutureIN6nebula6StatusEEESt6vectorIS9_SaIS9_EEEEEENS6_ISB_INSt15iterator_traitsIT_E10value_type10value_typeESaISJ_EEEESG_SG_EUlONS_3TryIS8_EEE_EEbNS1_2OpEPNS1_4DataEST_
    @          0x10bf88a folly::futures::detail::Core<>::CoreAndCallbackReference::detach()
    @          0x10c4ce1 folly::futures::detail::Core<>::doCallback()
    @          0x10c4d5c folly::futures::detail::Core<>::doCallback()
*** Aborted at 1617259433 (unix time) try "date -d @1617259433" if you are using GNU date ***
PC: @          0x1a4d4b2 _ZNSt17_Function_handlerIFvPN6nebula7AggDataERKNS0_5ValueEEZNS0_18AggFunctionManagerC4EvEUlS2_S5_E1_E9_M_invokeERKSt9_Any_dataOS2_S5_
*** SIGSEGV (@0xa0) received by PID 171776 (TID 0x7f2c92bff700) from PID 160; stack trace: ***
    @          0x1e5f9c1 (unknown)
    @     0x7f2cc928b62f (unknown)
    @          0x1a4d4b2 _ZNSt17_Function_handlerIFvPN6nebula7AggDataERKNS0_5ValueEEZNS0_18AggFunctionManagerC4EvEUlS2_S5_E1_E9_M_invokeERKSt9_Any_dataOS2_S5_
    @          0x13585a6 nebula::AggregateExpression::apply()
    @          0x1358d69 nebula::AggregateExpression::eval()
    @          0x1340a20 nebula::RelationalExpression::eval()
    @          0x1356029 nebula::LogicalExpression::evalAnd()
    @          0x1356394 nebula::LogicalExpression::eval()
    @          0x1212d24 nebula::graph::FilterExecutor::execute()
    @          0x1315c8e nebula::graph::Scheduler::execute()
    @          0x1318a2b _ZN5folly6detail8function14FunctionTraitsIFvONS_3TryIN6nebula6StatusEEEEE9callSmallIZNS_7futures6detail10FutureBaseIS5_E18thenImplementationINS4_5graph9Scheduler8ExecTaskIZNSH_10doScheduleEPNSG_8ExecutorEEUlS5_E3_EENSC_14callableResultIS5_SM_EELb0EJOS5_EEENSt9enable_ifIXsrNT0_13ReturnsFutureE5valueENSR_6ReturnEE4typeEOT_NSC_9argResultIXT1_ESW_JDpT2_EEEEUlS7_E_EEvRNS1_4DataES7_
    @          0x10c4629 _ZN5folly6detail8function14FunctionTraitsIFvvEE9callSmallIZNS_7futures6detail4CoreIN6nebula6StatusEE10doCallbackEvEUlvE_EEvRNS1_4DataE
    @          0x10c4bcb folly::futures::detail::Core<>::doCallback()
    @          0x131590b _ZN5folly6detail8function14FunctionTraitsIFvONS_3TryISt6vectorIN6nebula6StatusESaIS6_EEEEEE9callSmallIZNS_7futures6detail10FutureBaseIS8_E18thenImplementationIZNS5_5graph9Scheduler18doScheduleParallelERKSt3setIPNSJ_8ExecutorESt4lessISN_ESaISN_EEEUlS8_E_NSF_14callableResultIS8_SU_EELb0EJOS8_EEENSt9enable_ifIXntsrNT0_13ReturnsFutureE5valueENSZ_6ReturnEE4typeEOT_NSF_9argResultIXT1_ES14_JDpT2_EEEEUlSA_E_EEvRNS1_4DataESA_
    @          0x131a9d1 _ZN5folly6detail8function14FunctionTraitsIFvvEE9callSmallIZNS_7futures6detail4CoreISt6vectorIN6nebula6StatusESaISB_EEE10doCallbackEvEUlvE_EEvRNS1_4DataE
    @          0x131baae folly::futures::detail::Core<>::doCallback()
    @          0x131d0d3 std::_Sp_counted_ptr_inplace<>::_M_dispose()
    @          0x1098367 std::_Sp_counted_base<>::_M_release()
    @          0x131a1a7 _ZN5folly6detail8function9execSmallIZNS_7collectIN9__gnu_cxx17__normal_iteratorIPNS_6FutureIN6nebula6StatusEEESt6vectorIS9_SaIS9_EEEEEENS6_ISB_INSt15iterator_traitsIT_E10value_type10value_typeESaISJ_EEEESG_SG_EUlONS_3TryIS8_EEE_EEbNS1_2OpEPNS1_4DataEST_
    @          0x10bf88a folly::futures::detail::Core<>::CoreAndCallbackReference::detach()
    @          0x10c4ce1 folly::futures::detail::Core<>::doCallback()
    @          0x10c4d5c folly::futures::detail::Core<>::doCallback()
    @          0x1318993 _ZN5folly6detail8function14FunctionTraitsIFvONS_3TryIN6nebula6StatusEEEEE9callSmallIZNS_7futures6detail10FutureBaseIS5_E18thenImplementationINS4_5graph9Scheduler8ExecTaskIZNSH_10doScheduleEPNSG_8ExecutorEEUlS5_E3_EENSC_14callableResultIS5_SM_EELb0EJOS5_EEENSt9enable_ifIXsrNT0_13ReturnsFutureE5valueENSR_6ReturnEE4typeEOT_NSC_9argResultIXT1_ESW_JDpT2_EEEEUlS7_E_EEvRNS1_4DataES7_
    @          0x10c4629 _ZN5folly6detail8function14FunctionTraitsIFvvEE9callSmallIZNS_7futures6detail4CoreIN6nebula6StatusEE10doCallbackEvEUlvE_EEvRNS1_4DataE
    @          0x10c4bcb folly::futures::detail::Core<>::doCallback()
    @          0x131590b _ZN5folly6detail8function14FunctionTraitsIFvONS_3TryISt6vectorIN6nebula6StatusESaIS6_EEEEEE9callSmallIZNS_7futures6detail10FutureBaseIS8_E18thenImplementationIZNS5_5graph9Scheduler18doScheduleParallelERKSt3setIPNSJ_8ExecutorESt4lessISN_ESaISN_EEEUlS8_E_NSF_14callableResultIS8_SU_EELb0EJOS8_EEENSt9enable_ifIXntsrNT0_13ReturnsFutureE5valueENSZ_6ReturnEE4typeEOT_NSF_9argResultIXT1_ES14_JDpT2_EEEEUlSA_E_EEvRNS1_4DataESA_
    @          0x131a9d1 _ZN5folly6detail8function14FunctionTraitsIFvvEE9callSmallIZNS_7futures6detail4CoreISt6vectorIN6nebula6StatusESaISB_EEE10doCallbackEvEUlvE_EEvRNS1_4DataE
    @          0x131baae folly::futures::detail::Core<>::doCallback()
    @          0x131d0d3 std::_Sp_counted_ptr_inplace<>::_M_dispose()
    @          0x1098367 std::_Sp_counted_base<>::_M_release()
    @          0x131a1a7 _ZN5folly6detail8function9execSmallIZNS_7collectIN9__gnu_cxx17__normal_iteratorIPNS_6FutureIN6nebula6StatusEEESt6vectorIS9_SaIS9_EEEEEENS6_ISB_INSt15iterator_traitsIT_E10value_type10value_typeESaISJ_EEEESG_SG_EUlONS_3TryIS8_EEE_EEbNS1_2OpEPNS1_4DataEST_
    @          0x10bf88a folly::futures::detail::Core<>::CoreAndCallbackReference::detach()
*** Aborted at 1617259817 (unix time) try "date -d @1617259817" if you are using GNU date ***
PC: @          0x1a4d4b2 _ZNSt17_Function_handlerIFvPN6nebula7AggDataERKNS0_5ValueEEZNS0_18AggFunctionManagerC4EvEUlS2_S5_E1_E9_M_invokeERKSt9_Any_dataOS2_S5_
*** SIGSEGV (@0xa0) received by PID 172940 (TID 0x7fc882dff700) from PID 160; stack trace: ***
    @          0x1e5f9c1 (unknown)
    @     0x7fc8b988c62f (unknown)
    @          0x1a4d4b2 _ZNSt17_Function_handlerIFvPN6nebula7AggDataERKNS0_5ValueEEZNS0_18AggFunctionManagerC4EvEUlS2_S5_E1_E9_M_invokeERKSt9_Any_dataOS2_S5_
    @          0x13585a6 nebula::AggregateExpression::apply()
    @          0x1358d69 nebula::AggregateExpression::eval()
    @          0x1340a20 nebula::RelationalExpression::eval()
    @          0x1356029 nebula::LogicalExpression::evalAnd()
    @          0x1356394 nebula::LogicalExpression::eval()
    @          0x1212d24 nebula::graph::FilterExecutor::execute()
    @          0x1315c8e nebula::graph::Scheduler::execute()
    @          0x1318a2b _ZN5folly6detail8function14FunctionTraitsIFvONS_3TryIN6nebula6StatusEEEEE9callSmallIZNS_7futures6detail10FutureBaseIS5_E18thenImplementationINS4_5graph9Scheduler8ExecTaskIZNSH_10doScheduleEPNSG_8ExecutorEEUlS5_E3_EENSC_14callableResultIS5_SM_EELb0EJOS5_EEENSt9enable_ifIXsrNT0_13ReturnsFutureE5valueENSR_6ReturnEE4typeEOT_NSC_9argResultIXT1_ESW_JDpT2_EEEEUlS7_E_EEvRNS1_4DataES7_
    @          0x10c4629 _ZN5folly6detail8function14FunctionTraitsIFvvEE9callSmallIZNS_7futures6detail4CoreIN6nebula6StatusEE10doCallbackEvEUlvE_EEvRNS1_4DataE
    @          0x10c4bcb folly::futures::detail::Core<>::doCallback()
    @          0x131590b _ZN5folly6detail8function14FunctionTraitsIFvONS_3TryISt6vectorIN6nebula6StatusESaIS6_EEEEEE9callSmallIZNS_7futures6detail10FutureBaseIS8_E18thenImplementationIZNS5_5graph9Scheduler18doScheduleParallelERKSt3setIPNSJ_8ExecutorESt4lessISN_ESaISN_EEEUlS8_E_NSF_14callableResultIS8_SU_EELb0EJOS8_EEENSt9enable_ifIXntsrNT0_13ReturnsFutureE5valueENSZ_6ReturnEE4typeEOT_NSF_9argResultIXT1_ES14_JDpT2_EEEEUlSA_E_EEvRNS1_4DataESA_
    @          0x131a9d1 _ZN5folly6detail8function14FunctionTraitsIFvvEE9callSmallIZNS_7futures6detail4CoreISt6vectorIN6nebula6StatusESaISB_EEE10doCallbackEvEUlvE_EEvRNS1_4DataE
    @          0x131baae folly::futures::detail::Core<>::doCallback()
    @          0x131d0d3 std::_Sp_counted_ptr_inplace<>::_M_dispose()
    @          0x1098367 std::_Sp_counted_base<>::_M_release()
    @          0x131a1a7 _ZN5folly6detail8function9execSmallIZNS_7collectIN9__gnu_cxx17__normal_iteratorIPNS_6FutureIN6nebula6StatusEEESt6vectorIS9_SaIS9_EEEEEENS6_ISB_INSt15iterator_traitsIT_E10value_type10value_typeESaISJ_EEEESG_SG_EUlONS_3TryIS8_EEE_EEbNS1_2OpEPNS1_4DataEST_
    @          0x10bf88a folly::futures::detail::Core<>::CoreAndCallbackReference::detach()
    @          0x10c4ce1 folly::futures::detail::Core<>::doCallback()
    @          0x10c4d5c folly::futures::detail::Core<>::doCallback()
    @          0x1318993 _ZN5folly6detail8function14FunctionTraitsIFvONS_3TryIN6nebula6StatusEEEEE9callSmallIZNS_7futures6detail10FutureBaseIS5_E18thenImplementationINS4_5graph9Scheduler8ExecTaskIZNSH_10doScheduleEPNSG_8ExecutorEEUlS5_E3_EENSC_14callableResultIS5_SM_EELb0EJOS5_EEENSt9enable_ifIXsrNT0_13ReturnsFutureE5valueENSR_6ReturnEE4typeEOT_NSC_9argResultIXT1_ESW_JDpT2_EEEEUlS7_E_EEvRNS1_4DataES7_
    @          0x10c4629 _ZN5folly6detail8function14FunctionTraitsIFvvEE9callSmallIZNS_7futures6detail4CoreIN6nebula6StatusEE10doCallbackEvEUlvE_EEvRNS1_4DataE
    @          0x10c4bcb folly::futures::detail::Core<>::doCallback()
    @          0x131590b _ZN5folly6detail8function14FunctionTraitsIFvONS_3TryISt6vectorIN6nebula6StatusESaIS6_EEEEEE9callSmallIZNS_7futures6detail10FutureBaseIS8_E18thenImplementationIZNS5_5graph9Scheduler18doScheduleParallelERKSt3setIPNSJ_8ExecutorESt4lessISN_ESaISN_EEEUlS8_E_NSF_14callableResultIS8_SU_EELb0EJOS8_EEENSt9enable_ifIXntsrNT0_13ReturnsFutureE5valueENSZ_6ReturnEE4typeEOT_NSF_9argResultIXT1_ES14_JDpT2_EEEEUlSA_E_EEvRNS1_4DataESA_
    @          0x131a9d1 _ZN5folly6detail8function14FunctionTraitsIFvvEE9callSmallIZNS_7futures6detail4CoreISt6vectorIN6nebula6StatusESaISB_EEE10doCallbackEvEUlvE_EEvRNS1_4DataE
    @          0x131baae folly::futures::detail::Core<>::doCallback()
    @          0x131d0d3 std::_Sp_counted_ptr_inplace<>::_M_dispose()
    @          0x1098367 std::_Sp_counted_base<>::_M_release()
    @          0x131a1a7 _ZN5folly6detail8function9execSmallIZNS_7collectIN9__gnu_cxx17__normal_iteratorIPNS_6FutureIN6nebula6StatusEEESt6vectorIS9_SaIS9_EEEEEENS6_ISB_INSt15iterator_traitsIT_E10value_type10value_typeESaISJ_EEEESG_SG_EUlONS_3TryIS8_EEE_EEbNS1_2OpEPNS1_4DataEST_
    @          0x10bf88a folly::futures::detail::Core<>::CoreAndCallbackReference::detach()
E0401 14:51:21.567793 173569 QueryInstance.cpp:103] SemanticError: Alias used but not defined: `v'
E0401 15:12:45.093705 173571 QueryInstance.cpp:103] SyntaxError: syntax error near `) as bla'
E0401 15:36:33.567204 173569 QueryInstance.cpp:103] SyntaxError: syntax error near `index'
E0401 15:36:43.798588 173569 QueryInstance.cpp:103] SyntaxError: syntax error near `stats'
E0401 15:36:52.509517 173569 QueryInstance.cpp:103] SyntaxError: syntax error near `INDEX'

看时间是14:51的,应该是这点

cc @kyle

matchwhere 都没有做 aggregate 的能力,只能在 with 子句之后可以对 aggregate 结果做过滤,可以参考一下 cypher 的文档: cypher-with-clause

上述第一条语句应该报错的,会尽快加上。

@jude-zhu win-win

想在请教一个问题,我执行一个三度的match查询语句,运行了大概10分钟出结果,查看cpu只使用了一个核,内存使用了100G+。想提高cpu的使用率,来减少运行时长,尝试修改了配置但是没有生效,请问这个怎么修改。

看你的 query 是什么样的,你可以用 explain format=“dot” + quey 语句看执行计划的结构是否可以并行。如果执行计划中的执行结点不能并行,本质上就是在使用单线程计算,所以调整外部的参数不能起作用。

这个问题目前在着手优化,其中一个方向是并行化某些场景,比如 match 中从中间向两边拓展的时候。还有一个方向是进行数据切片,然后并行化,这个还未启动。

你可以把 dump 出来的执行计划贴到这个网站,生成图片后分享在这里,我们再帮你看看。

1 个赞
(root@nebula) [cmis_test]> EXPLAIN format="dot" match (v:email)-[:emailid]->(mid:id)<-[:phoneid]-(phone:phone)-[:phoneid]->(ids:id) with v, count(distinct phone) as pnum,count(distinct mid) as midnum,count(distinct ids) as idsnum , sum(ids.isblack) as black  where pnum > 2 and midnum>5 and midnum < 100 and idsnum > 5 and idsnum < 300 and black > 0 return v.value1, true as result
Execution succeeded (time spent 1614/3030 us)

Execution Plan (optimize time 344 us)

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  plan                                                                                                                                                                                                                                                                                            
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  digraph exec_plan {                                                                                                                                                                                                                                                                             
      rankdir=BT;                                                                                                                                                                                                                                                                                 
      "Project_32"[label="{Project_32|outputVar: \[\{\"colNames\":\[\"v.value1\",\"result\"\],\"name\":\"__Project_32\",\"type\":\"DATASET\"\}\]|inputVar: __Filter_31}", shape=Mrecord];                                                                                                         
      "Filter_31"->"Project_32";                                                                                                                                                                                                                                                                  
      "Filter_31"[label="{Filter_31|outputVar: \[\{\"colNames\":\[\"v\",\"pnum\",\"midnum\",\"idsnum\",\"black\"\],\"name\":\"__Filter_31\",\"type\":\"DATASET\"\}\]|inputVar: __Aggregate_30}", shape=Mrecord];                                                                                  
      "Aggregate_30"->"Filter_31";                                                                                                                                                                                                                                                                
      "Aggregate_30"[label="{Aggregate_30|outputVar: \[\{\"colNames\":\[\"v\",\"pnum\",\"midnum\",\"idsnum\",\"black\"\],\"name\":\"__Aggregate_30\",\"type\":\"DATASET\"\}\]|inputVar: __Filter_29}", shape=Mrecord];                                                                            
      "Filter_29"->"Aggregate_30";                                                                                                                                                                                                                                                                
      "Filter_29"[label="{Filter_29|outputVar: \[\{\"colNames\":\[\"v\",\"mid\",\"phone\",\"ids\",\"__COL_0\"\],\"name\":\"__Filter_29\",\"type\":\"DATASET\"\}\]|inputVar: __Project_28}", shape=Mrecord];                                                                                       
      "Project_28"->"Filter_29";                                                                                                                                                                                                                                                                  
      "Project_28"[label="{Project_28|outputVar: \[\{\"colNames\":\[\"v\",\"mid\",\"phone\",\"ids\",\"__COL_0\"\],\"name\":\"__Project_28\",\"type\":\"DATASET\"\}\]|inputVar: __InnerJoin_27}", shape=Mrecord];                                                                                  
      "InnerJoin_27"->"Project_28";                                                                                                                                                                                                                                                               
      "InnerJoin_27"[label="{InnerJoin_27|outputVar: \[\{\"colNames\":\[\"_path_0\",\"_path_1\",\"_path_2\",\"_path_3\"\],\"name\":\"__InnerJoin_27\",\"type\":\"DATASET\"\}\]|inputVar: \{\"rightVar\":\{\"__Project_26\":\"0\"\},\"leftVar\":\{\"__InnerJoin_21\":\"0\"\}\}}", shape=Mrecord];  
      "Project_26"->"InnerJoin_27";                                                                                                                                                                                                                                                               
      "Project_26"[label="{Project_26|outputVar: \[\{\"colNames\":\[\"_path\"\],\"name\":\"__Project_26\",\"type\":\"DATASET\"\}\]|inputVar: __Filter_25}", shape=Mrecord];                                                                                                                       
      "Filter_25"->"Project_26";                                                                                                                                                                                                                                                                  
      "Filter_25"[label="{Filter_25|outputVar: \[\{\"colNames\":\[\],\"name\":\"__Filter_25\",\"type\":\"DATASET\"\}\]|inputVar: __GetVertices_24}", shape=Mrecord];                                                                                                                              
      "GetVertices_35"->"Filter_25";                                                                                                                                                                                                                                                              
      "GetVertices_35"[label="{GetVertices_35|outputVar: \[\{\"colNames\":\[\],\"name\":\"__GetVertices_24\",\"type\":\"DATASET\"\}\]|inputVar: __InnerJoin_21}", shape=Mrecord];                                                                                                                 
      "InnerJoin_21"->"GetVertices_35";                                                                                                                                                                                                                                                           
      "InnerJoin_21"[label="{InnerJoin_21|outputVar: \[\{\"colNames\":\[\"_path_0\",\"_path_1\",\"_path_2\"\],\"name\":\"__InnerJoin_21\",\"type\":\"DATASET\"\}\]|inputVar: \{\"rightVar\":\{\"__Filter_20\":\"0\"\},\"leftVar\":\{\"__InnerJoin_14\":\"0\"\}\}}", shape=Mrecord];               
      "Filter_20"->"InnerJoin_21";                                                                                                                                                                                                                                                                
      "Filter_20"[label="{Filter_20|outputVar: \[\{\"colNames\":\[\"_path\"\],\"name\":\"__Filter_20\",\"type\":\"DATASET\"\}\]|inputVar: __Project_19}", shape=Mrecord];                                                                                                                         
      "Project_19"->"Filter_20";                                                                                                                                                                                                                                                                  
      "Project_19"[label="{Project_19|outputVar: \[\{\"colNames\":\[\"_path\"\],\"name\":\"__Project_19\",\"type\":\"DATASET\"\}\]|inputVar: __Filter_18}", shape=Mrecord];                                                                                                                       
      "Filter_18"->"Project_19";                                                                                                                                                                                                                                                                  
      "Filter_18"[label="{Filter_18|outputVar: \[\{\"colNames\":\[\],\"name\":\"__Filter_18\",\"type\":\"DATASET\"\}\]|inputVar: __GetNeighbors_17}", shape=Mrecord];                                                                                                                             
      "GetNeighbors_41"->"Filter_18";                                                                                                                                                                                                                                                             
      "GetNeighbors_41"[label="{GetNeighbors_41|outputVar: \[\{\"colNames\":\[\],\"name\":\"__GetNeighbors_17\",\"type\":\"DATASET\"\}\]|inputVar: __InnerJoin_14}", shape=Mrecord];                                                                                                              
      "InnerJoin_14"->"GetNeighbors_41";                                                                                                                                                                                                                                                          
      "InnerJoin_14"[label="{InnerJoin_14|outputVar: \[\{\"colNames\":\[\"_path_0\",\"_path_1\"\],\"name\":\"__InnerJoin_14\",\"type\":\"DATASET\"\}\]|inputVar: \{\"rightVar\":\{\"__Filter_13\":\"0\"\},\"leftVar\":\{\"__Filter_7\":\"0\"\}\}}", shape=Mrecord];                               
      "Filter_13"->"InnerJoin_14";                                                                                                                                                                                                                                                                
      "Filter_13"[label="{Filter_13|outputVar: \[\{\"colNames\":\[\"_path\"\],\"name\":\"__Filter_13\",\"type\":\"DATASET\"\}\]|inputVar: __Project_12}", shape=Mrecord];                                                                                                                         
      "Project_12"->"Filter_13";                                                                                                                                                                                                                                                                  
      "Project_12"[label="{Project_12|outputVar: \[\{\"colNames\":\[\"_path\"\],\"name\":\"__Project_12\",\"type\":\"DATASET\"\}\]|inputVar: __Filter_11}", shape=Mrecord];                                                                                                                       
      "Filter_11"->"Project_12";                                                                                                                                                                                                                                                                  
      "Filter_11"[label="{Filter_11|outputVar: \[\{\"colNames\":\[\],\"name\":\"__Filter_11\",\"type\":\"DATASET\"\}\]|inputVar: __GetNeighbors_10}", shape=Mrecord];                                                                                                                             
      "GetNeighbors_40"->"Filter_11";                                                                                                                                                                                                                                                             
      "GetNeighbors_40"[label="{GetNeighbors_40|outputVar: \[\{\"colNames\":\[\],\"name\":\"__GetNeighbors_10\",\"type\":\"DATASET\"\}\]|inputVar: __Filter_7}", shape=Mrecord];                                                                                                                  
      "Filter_7"->"GetNeighbors_40";                                                                                                                                                                                                                                                              
      "Filter_7"[label="{Filter_7|outputVar: \[\{\"colNames\":\[\"_path\"\],\"name\":\"__Filter_7\",\"type\":\"DATASET\"\}\]|inputVar: __Project_6}", shape=Mrecord];                                                                                                                             
      "Project_6"->"Filter_7";                                                                                                                                                                                                                                                                    
      "Project_6"[label="{Project_6|outputVar: \[\{\"colNames\":\[\"_path\"\],\"name\":\"__Project_6\",\"type\":\"DATASET\"\}\]|inputVar: __Filter_5}", shape=Mrecord];                                                                                                                           
      "Filter_5"->"Project_6";                                                                                                                                                                                                                                                                    
      "Filter_5"[label="{Filter_5|outputVar: \[\{\"colNames\":\[\],\"name\":\"__Filter_5\",\"type\":\"DATASET\"\}\]|inputVar: __GetNeighbors_4}", shape=Mrecord];                                                                                                                                 
      "GetNeighbors_39"->"Filter_5";                                                                                                                                                                                                                                                              
      "GetNeighbors_39"[label="{GetNeighbors_39|outputVar: \[\{\"colNames\":\[\],\"name\":\"__GetNeighbors_4\",\"type\":\"DATASET\"\}\]|inputVar: __IndexScan_1}", shape=Mrecord];                                                                                                                
      "IndexScan_33"->"GetNeighbors_39";                                                                                                                                                                                                                                                          
      "IndexScan_33"[label="{IndexScan_33|outputVar: \[\{\"colNames\":\[\"_vid\"\],\"name\":\"__IndexScan_1\",\"type\":\"DATASET\"\}\]|inputVar: }", shape=Mrecord];                                                                                                                              
      "Start_0"->"IndexScan_33";                                                                                                                                                                                                                                                                  
      "Start_0"[label="{Start_0|outputVar: \[\{\"colNames\":\[\],\"name\":\"__Start_0\",\"type\":\"DATASET\"\}\]|inputVar: }", shape=Mrecord];                                                                                                                                                    
  }                                                                                                                                                                                                                                                                                               
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Thu, 01 Apr 2021 19:50:22 CST


图片好像没法调大。。。

非常感谢你提供的场景,你遇到的问题目前还不能通过调参的方式解决,不过分析计划有了一些优化的思路,后面我会做些验证,好的话会更新到这里。

2 个赞

Fixed in https://github.com/vesoft-inc/nebula-graph/pull/919

test:

(czp@nebula) [nba]> match (v:player) where id(v)=="Tim Duncan" and sum(v.age)>3 return v
[ERROR (-7)]: SyntaxError: Invalid use of aggregating function in this context. near `where id(v)=="Tim Duncan" and sum(v.age)>3'

:+1: :+1:

该主题在最后一个回复创建后7天后自动关闭。不再允许新的回复。

浙ICP备20010487号