摘要:
mysql/stonedb-Q16-并行执行分析
问题记录:
并行执行无法获取数据:
(gdb) bt
#0 0x0000000002d51ca8 in Tianmu::core::Filter::Block::NumOfOnesBetween (this=0x0, n1=0, n2=58971)
at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/storage/tianmu/core/filter_block.cpp:221
#1 0x0000000002d4d43b in Tianmu::core::Filter::NumOfOnesBetween (this=0x7f736c001940, n1=2007836, n2=9430619)
at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/storage/tianmu/core/filter.cpp:766
#2 0x0000000003073858 in Tianmu::core::GroupByWrapper::TuplesLeftBetween (this=0x7f736c000970, from=2007836, to=9430619)
at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/storage/tianmu/core/groupby_wrapper.cpp:648
#3 0x0000000003006f9d in Tianmu::core::AggregationAlgorithm::AggregatePackrow (this=0x7f75ba437580, gbw=..., mit=0x7f52909397d8, cur_tuple=2007836)
at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/storage/tianmu/core/aggregation_algorithm.cpp:502
#4 0x0000000003008266 in Tianmu::core::AggregationWorkerEnt::TaskAggrePacks (this=0x7f75ba436e90, taskIterator=0x7f52909397d8, dims=0x7f75ba436bd0, mit=0x7f75ba436ee0, pstart=33, pend=62,
tuple=2007836, gbw=0x7f736c000970, ci=0x7f5290913230) at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/storage/tianmu/core/aggregation_algorithm.cpp:827
#5 0x0000000003019c4b in _ZSt13__invoke_implIvRMN6Tianmu4core20AggregationWorkerEntEFvPNS1_18MIUpdatingIteratorEPNS1_15DimensionVectorEPNS1_10MIIteratorEiiiPNS1_14GroupByWrapperEPNS1_11TransactionEERPS2_IRS4_RS6_RS8_RiSL_SL_RSA_RSC_EET_St21__invoke_memfun_derefOT0_OT1_DpOT2_ (__f=
@0x7f5274002f88: (void (Tianmu::core::AggregationWorkerEnt::*)(Tianmu::core::AggregationWorkerEnt * const, Tianmu::core::MIUpdatingIterator *, Tianmu::core::DimensionVector *, Tianmu::core::MIIterator *, int, int, int, Tianmu::core::GroupByWrapper *, Tianmu::core::Transaction *)) 0x30081c8 <Tianmu::core::AggregationWorkerEnt::TaskAggrePacks(Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int, int, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*)>, __t=@0x7f5274002fd0: 0x7f75ba436e90,
__args#0=@0x7f5274002fc8: 0x7f52909397d8, __args#1=@0x7f5274002fc0: 0x7f75ba436bd0, __args#2=@0x7f5274002fb8: 0x7f75ba436ee0, __args#3=@0x7f5274002fb0: 33, __args#4=@0x7f5274002fac: 62,
__args#5=@0x7f5274002fa8: 2007836, __args#6=@0x7f5274002fa0: 0x7f736c000970, __args#7=@0x7f5274002f98: 0x7f5290913230) at /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/invoke.h:73
#6 0x0000000003019775 in std::__invoke<void (Tianmu::core::AggregationWorkerEnt::*&)(Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int, int, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*), Tianmu::core::AggregationWorkerEnt*&, Tianmu::core::MIUpdatingIterator*&, Tianmu::core::DimensionVector*&, Tianmu::core::MIIterator*&, int&, int&, int&, Tianmu::core::GroupByWrapper*&, Tianmu::core::Transaction*&> (__fn=
@0x7f5274002f88: (void (Tianmu::core::AggregationWorkerEnt::*)(Tianmu::core::AggregationWorkerEnt * const, Tianmu::core::MIUpdatingIterator *, Tianmu::core::DimensionVector *, Tianmu::core::MIIterator *, int, int, int, Tianmu::core::GroupByWrapper *, Tianmu::core::Transaction *)) 0x30081c8 <Tianmu::core::AggregationWorkerEnt::TaskAggrePacks(Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int, int, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*)>, __args#0=@0x7f5274002fd0: 0x7f75ba436e90,
__args#1=@0x7f5274002fc8: 0x7f52909397d8, __args#2=@0x7f5274002fc0: 0x7f75ba436bd0, __args#3=@0x7f5274002fb8: 0x7f75ba436ee0, __args#4=@0x7f5274002fb0: 33, __args#5=@0x7f5274002fac: 62,
__args#6=@0x7f5274002fa8: 2007836, __args#7=@0x7f5274002fa0: 0x7f736c000970, __args#8=@0x7f5274002f98: 0x7f5290913230) at /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/invoke.h:95
#7 0x000000000301915b in std::_Bind<void (Tianmu::core::AggregationWorkerEnt::*(Tianmu::core::AggregationWorkerEnt*, Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int, int, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*))(Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int, int, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*)>::__call<void, , 0ul, 1ul, 2ul, 3ul, 4ul, 5ul, 6ul, 7ul, 8ul>(std::tuple<>&&, std::_Index_tuple<0ul, 1ul, 2ul, 3ul, 4ul, 5ul, 6ul, 7ul, 8ul>) (this=0x7f5274002f88, __args=empty std::tuple) at /opt/rh/devtoolset-7/root/usr/include/c++/7/functional:467
#8 0x000000000301847e in std::_Bind<void (Tianmu::core::AggregationWorkerEnt::*(Tianmu::core::AggregationWorkerEnt*, Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int, int, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*))(Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int, int, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*)>::operator()<, void>() (this=0x7f5274002f88) at /opt/rh/devtoolset-7/root/usr/include/c++/7/functional:551
#9 0x0000000003017c31 in std::__invoke_impl<void, std::_Bind<void (Tianmu::core::AggregationWorkerEnt::*(Tianmu::core::AggregationWorkerEnt*, Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int, int, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*))(Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int, int, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*)>&>(std::__invoke_other, std::_Bind<void (Tianmu::core::AggregationWorkerEnt::*(Tianmu::core::AggregationWorkerEnt*, Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int, int, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*))(Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int, int, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*)>&) (__f=...)
at /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/invoke.h:60
#10 0x000000000301752c in std::__invoke<std::_Bind<void (Tianmu::core::AggregationWorkerEnt::*(Tianmu::core::AggregationWorkerEnt*, Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int, int, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*))(Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int, int, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*)>&>(std::_Bind<void (Tianmu::core::AggregationWorkerEnt::*(Tianmu::core::AggregationWorkerEnt*, Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int, int, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*))(Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int, int, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*)>&) (__fn=...)
at /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/invoke.h:95
---Type <return> to continue, or q <return> to quit---
#11 0x0000000003016eab in std::__future_base::_Task_state<std::_Bind<void (Tianmu::core::AggregationWorkerEnt::*(Tianmu::core::AggregationWorkerEnt*, Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int, int, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*))(Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int, int, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*)>, std::allocator<int>, void ()>::_M_run()::{lambda()#1}::operator()() const (
__closure=0x7f73867fb518) at /opt/rh/devtoolset-7/root/usr/include/c++/7/future:1421
#12 0x0000000003018525 in std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_state<std::_Bind<void (Tianmu::core::AggregationWorkerEnt::*(Tianmu::core::AggregationWorkerEnt*, Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int, int, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*))(Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int, int, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*)>, std::allocator<int>, void ()>::_M_run()::{lambda()#1}, void>::operator()() const (this=0x7f73867fb520)
at /opt/rh/devtoolset-7/root/usr/include/c++/7/future:1362
#13 0x0000000003017cb0 in std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_state<std::_Bind<void (Tianmu::core::AggregationWorkerEnt::*(Tianmu::core::AggregationWorkerEnt*, Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int, int, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*))(Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int, int, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*)>, std::allocator<int>, void ()>::_M_run()::{lambda()#1}, void> >::_M_invoke(std::_Any_data const&) (__functor=...) at /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/std_function.h:302
#14 0x0000000002d072eb in std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>::operator()() const (this=0x7f73867fb520)
at /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/std_function.h:706
#15 0x0000000002d015d3 in std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*) (this=0x7f5274002f60, __f=0x7f73867fb520, __did_set=0x7f73867fb497) at /opt/rh/devtoolset-7/root/usr/include/c++/7/future:561
#16 0x0000000002d164d7 in std::__invoke_impl<void, void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2<std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>*> (__f=
@0x7f73867fb4b0: (void (std::__future_base::_State_baseV2::*)(std::__future_base::_State_baseV2 * const, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>()> *, bool *)) 0x2d015ac <std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)>, __t=@0x7f73867fb4a8: 0x7f5274002f60, __args#0=@0x7f73867fb4a0: 0x7f73867fb520, __args#1=@0x7f73867fb498: 0x7f73867fb497)
at /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/invoke.h:73
#17 0x0000000002d0e8a3 in std::__invoke<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&) (__fn=
@0x7f73867fb4b0: (void (std::__future_base::_State_baseV2::*)(std::__future_base::_State_baseV2 * const, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>()> *, bool *)) 0x2d015ac <std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)>, __args#0=@0x7f73867fb4a8: 0x7f5274002f60, __args#1=@0x7f73867fb4a0: 0x7f73867fb520, __args#2=@0x7f73867fb498: 0x7f73867fb497)
at /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/invoke.h:95
#18 0x0000000002d06e3e in void std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&)::{lambda()#1}::operator()() const (
__closure=0x7f73867fb420) at /opt/rh/devtoolset-7/root/usr/include/c++/7/mutex:672
#19 0x0000000002d06ea9 in void std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&)::{lambda()#2}::operator()() const (
__closure=0x0) at /opt/rh/devtoolset-7/root/usr/include/c++/7/mutex:677
#20 0x0000000002d06eba in void std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::once_fla---Type <return> to continue, or q <return> to quit---
g&, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&)::{lambda()#2}::_FUN() ()
at /opt/rh/devtoolset-7/root/usr/include/c++/7/mutex:677
#21 0x00007f76095e420b in __pthread_once_slow () from /lib64/libpthread.so.0
#22 0x0000000002ce966a in __gthread_once (__once=0x7f5274002f78, __func=0x35e1400 <__once_proxy>) at /opt/rh/devtoolset-7/root/usr/include/c++/7/x86_64-redhat-linux/bits/gthr-default.h:699
#23 0x0000000002d06f64 in std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&) (__once=..., __f=
@0x7f73867fb4b0: (void (std::__future_base::_State_baseV2::*)(std::__future_base::_State_baseV2 * const, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>()> *, bool *)) 0x2d015ac <std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)>, __args#0=@0x7f73867fb4a8: 0x7f5274002f60, __args#1=@0x7f73867fb4a0: 0x7f73867fb520, __args#2=@0x7f73867fb498: 0x7f73867fb497)
at /opt/rh/devtoolset-7/root/usr/include/c++/7/mutex:684
#24 0x0000000002d01231 in std::__future_base::_State_baseV2::_M_set_result(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>, bool) (this=0x7f5274002f60, __res=..., __ignore_failure=false) at /opt/rh/devtoolset-7/root/usr/include/c++/7/future:401
#25 0x0000000003016f0a in std::__future_base::_Task_state<std::_Bind<void (Tianmu::core::AggregationWorkerEnt::*(Tianmu::core::AggregationWorkerEnt*, Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int, int, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*))(Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int, int, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*)>, std::allocator<int>, void ()>::_M_run() (this=0x7f5274002f60)
at /opt/rh/devtoolset-7/root/usr/include/c++/7/future:1423
#26 0x0000000002d1390f in std::packaged_task<void ()>::operator()() (this=0x7f529093c7d0) at /opt/rh/devtoolset-7/root/usr/include/c++/7/future:1556
#27 0x000000000300c478 in std::future<std::result_of<void (Tianmu::core::AggregationWorkerEnt::*(Tianmu::core::AggregationWorkerEnt*, Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int&, int&, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*&))(Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int, int, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*)>::type> Tianmu::utils::thread_pool::add_task<void (Tianmu::core::AggregationWorkerEnt::*)(Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int, int, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*), Tianmu::core::AggregationWorkerEnt*, Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int&, int&, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*&>(void (Tianmu::core::AggregationWorkerEnt::*&&)(Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int, int, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*), Tianmu::core::AggregationWorkerEnt*&&, Tianmu::core::MIUpdatingIterator*&&, Tianmu::core::DimensionVector*&&, Tianmu::core::MIIterator*&&, int&&, int&, int&, Tianmu::core::GroupByWrapper*&&, Tianmu::core::Transaction*&)::{lambda()#1}::operator()() const (__closure=0x7f5274003000)
at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/storage/tianmu/util/thread_pool.h:91
#28 0x00000000030124aa in std::_Function_handler<void (), std::future<std::result_of<void (Tianmu::core::AggregationWorkerEnt::*(Tianmu::core::AggregationWorkerEnt*, Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int&, int&, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*&))(Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int, int, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*)>::type> Tianmu::utils::thread_pool::add_task<void (Tianmu::core::AggregationWorkerEnt::*)(Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int, int, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*), Tianmu::core::AggregationWorkerEnt*, Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int&, int&, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*&>(void (Tianmu::core::AggregationWorkerEnt::*&&)(Tianmu::core::MIUpdatingIterator*, Tianmu::core::DimensionVector*, Tianmu::core::MIIterator*, int, int, int, Tianmu::core::GroupByWrapper*, Tianmu::core::Transaction*), Tianmu::core::AggregationWorkerEnt*&&, Tianmu::core::MIUpdatingIterator*&&, Tianmu::core::DimensionVector*&&, Tianmu::core::MIIterator*&&, int&&, int&, int&, Tianmu::core::GroupByWrapper*&&, Tianmu::core::Transaction*&)::{lambda()#1}>::_M_invoke(std::_Any_data const&) (__functor=...)
at /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/std_function.h:316
#29 0x0000000002d05cf2 in std::function<void ()>::operator()() const (this=0x7f73867fb5f0) at /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/std_function.h:706
#30 0x0000000002d01a3f in _ZZN6Tianmu5utils11thread_poolC4ERKSsmENKUlvE_clEv () at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/storage/tianmu/util/thread_pool.h:60
#31 0x0000000002d25244 in _ZSt13__invoke_implIvZN6Tianmu5utils11thread_poolC4ERKSsmEUlvE_IEET_St14__invoke_otherOT0_DpOT1_ (__f=...)
at /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/invoke.h:60
#32 0x0000000002d1e4b7 in _ZSt8__invokeIZN6Tianmu5utils11thread_poolC4ERKSsmEUlvE_IEENSt15__invoke_resultIT_IDpT0_EE4typeEOS7_DpOS8_ (__fn=...)
at /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/invoke.h:95
---Type <return> to continue, or q <return> to quit---
#33 0x0000000002d33bec in _ZNSt6thread8_InvokerISt5tupleIIZN6Tianmu5utils11thread_poolC4ERKSsmEUlvE_EEE9_M_invokeIILm0EEEEDTcl8__invokespcl10_S_declvalIXT_EEEEESt12_Index_tupleIIXspT_EEE (
this=0x7466a68) at /opt/rh/devtoolset-7/root/usr/include/c++/7/thread:234
#34 0x0000000002d3357d in _ZNSt6thread8_InvokerISt5tupleIIZN6Tianmu5utils11thread_poolC4ERKSsmEUlvE_EEEclEv (this=0x7466a68) at /opt/rh/devtoolset-7/root/usr/include/c++/7/thread:243
#35 0x0000000002d326be in _ZNSt6thread11_State_implINS_8_InvokerISt5tupleIIZN6Tianmu5utils11thread_poolC4ERKSsmEUlvE_EEEEE6_M_runEv (this=0x7466a60)
at /opt/rh/devtoolset-7/root/usr/include/c++/7/thread:186
#36 0x00000000036153af in execute_native_thread_routine ()
#37 0x00007f76095e5ea5 in start_thread () from /lib64/libpthread.so.0
#38 0x00007f760781ab0d in clone () from /lib64/libc.so.6
对比单线程执行:
(gdb) bt
#0 Tianmu::core::Filter::NumOfOnesBetween (this=0x7f6b1892cde0, n1=60972, n2=121671) at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/storage/tianmu/core/filter.cpp:760
#1 0x0000000003073858 in Tianmu::core::GroupByWrapper::TuplesLeftBetween (this=0x7f8e4554f220, from=60972, to=121671)
at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/storage/tianmu/core/groupby_wrapper.cpp:648
#2 0x0000000003006f9d in Tianmu::core::AggregationAlgorithm::AggregatePackrow (this=0x7f8e4554f580, gbw=..., mit=0x7f8e4554eee0, cur_tuple=60972)
at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/storage/tianmu/core/aggregation_algorithm.cpp:502
#3 0x0000000003005b7b in Tianmu::core::AggregationAlgorithm::MultiDimensionalGroupByScan (this=0x7f8e4554f580, gbw=..., limit=@0x7f8e4554f208: 7422784, offset=@0x7f8e4554f608: 0, sender=
0x0, limit_less_than_no_groups=false) at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/storage/tianmu/core/aggregation_algorithm.cpp:283
#4 0x00000000030053ca in Tianmu::core::AggregationAlgorithm::Aggregate (this=0x7f8e4554f580, just_distinct=false, limit=@0x7f8e4554f600: -1, offset=@0x7f8e4554f608: 0, sender=0x0)
at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/storage/tianmu/core/aggregation_algorithm.cpp:196
#5 0x0000000002df1e3e in Tianmu::core::TempTable::Materialize (this=0x7f6b1892c760, in_subq=false, sender=0x7f6b18921550, lazy=false)
at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/storage/tianmu/core/temp_table.cpp:1972
#6 0x0000000002d3a414 in Tianmu::core::Engine::Execute (this=0x7721370, thd=0x7f6b18000b70, lex=0x7f6b18002e98, result_output=0x7f6b1801e1c0, unit_for_union=0x0)
at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/storage/tianmu/core/engine_execute.cpp:426
#7 0x0000000002d395b6 in Tianmu::core::Engine::HandleSelect (this=0x7721370, thd=0x7f6b18000b70, lex=0x7f6b18002e98, result=@0x7f8e4554fd18: 0x7f6b1801e1c0, setup_tables_done_option=0,
res=@0x7f8e4554fd14: 0, optimize_after_tianmu=@0x7f8e4554fd0c: 1, tianmu_free_join=@0x7f8e4554fd10: 1, with_insert=0)
at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/storage/tianmu/core/engine_execute.cpp:232
#8 0x0000000002e21e47 in Tianmu::dbhandler::TIANMU_HandleSelect (thd=0x7f6b18000b70, lex=0x7f6b18002e98, result=@0x7f8e4554fd18: 0x7f6b1801e1c0, setup_tables_done_option=0,
res=@0x7f8e4554fd14: 0, optimize_after_tianmu=@0x7f8e4554fd0c: 1, tianmu_free_join=@0x7f8e4554fd10: 1, with_insert=0)
at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/storage/tianmu/handler/ha_rcengine.cpp:82
#9 0x0000000002462f6a in execute_sqlcom_select (thd=0x7f6b18000b70, all_tables=0x7f6b1801af98) at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/sql/sql_:5182
#10 0x000000000245c2ee in mysql_execute_command (thd=0x7f6b18000b70, first_level=true) at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/sql/sql_:2831
#11 0x0000000002463f33 in mysql_parse (thd=0x7f6b18000b70, parser_state=0x7f8e45550eb0) at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/sql/sql_:5621
#12 0x00000000024591cb in dispatch_command (thd=0x7f6b18000b70, com_data=0x7f8e45551650, command=COM_QUERY)
at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/sql/sql_:1495
#13 0x00000000024580f7 in do_command (thd=0x7f6b18000b70) at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/sql/sql_:1034
#14 0x000000000258accd in handle_connection (arg=0x9f7cfb0) at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/sql/conn_handler/connection_handler_per_:313
#15 0x0000000002c71102 in pfs_spawn_thread (arg=0x1382bdf0) at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/storage/perfschema/:2197
#16 0x00007f8e94d8aea5 in start_thread () from /lib64/libpthread.so.0
#17 0x00007f8e92fbfb0d in clone () from /lib64/libc.so.6
为blocks赋值的地方
(gdb) bt
#0 Tianmu::core::Filter::Set (this=0x7f6b189c5210, b=11, n=8804) at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/storage/tianmu/core/filter.cpp:243
#1 0x0000000002d5c465 in Tianmu::core::Filter::Set (this=0x7f6b189c5210, n=729700) at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/storage/tianmu/core/filter.h:74
#2 0x00000000030748e5 in Tianmu::core::DistinctWrapper::SetAsOmitted (this=0x7f8e4554f220, attr=3, obj=729700)
at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/storage/tianmu/core/groupby_wrapper.h:44
#3 0x000000000307302d in Tianmu::core::GroupByWrapper::DistinctlyOmitted (this=0x7f8e4554f220, attr=3, obj=729700)
at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/storage/tianmu/core/groupby_wrapper.cpp:534
#4 0x000000000300742f in Tianmu::core::AggregationAlgorithm::AggregatePackrow (this=0x7f8e4554f580, gbw=..., mit=0x7f8e4554eee0, cur_tuple=729700)
at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/storage/tianmu/core/aggregation_algorithm.cpp:582
#5 0x0000000003005b7b in Tianmu::core::AggregationAlgorithm::MultiDimensionalGroupByScan (this=0x7f8e4554f580, gbw=..., limit=@0x7f8e4554f208: 7422784, offset=@0x7f8e4554f608: 0,
sender=0x0, limit_less_than_no_groups=false) at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/storage/tianmu/core/aggregation_algorithm.cpp:283
#6 0x00000000030053ca in Tianmu::core::AggregationAlgorithm::Aggregate (this=0x7f8e4554f580, just_distinct=false, limit=@0x7f8e4554f600: -1, offset=@0x7f8e4554f608: 0, sender=0x0)
at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/storage/tianmu/core/aggregation_algorithm.cpp:196
#7 0x0000000002df1e3e in Tianmu::core::TempTable::Materialize (this=0x7f6b1892c760, in_subq=false, sender=0x7f6b18921550, lazy=false)
at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/storage/tianmu/core/temp_table.cpp:1972
#8 0x0000000002d3a414 in Tianmu::core::Engine::Execute (this=0x7721370, thd=0x7f6b18000b70, lex=0x7f6b18002e98, result_output=0x7f6b1801e1c0, unit_for_union=0x0)
at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/storage/tianmu/core/engine_execute.cpp:426
#9 0x0000000002d395b6 in Tianmu::core::Engine::HandleSelect (this=0x7721370, thd=0x7f6b18000b70, lex=0x7f6b18002e98, result=@0x7f8e4554fd18: 0x7f6b1801e1c0, setup_tables_done_option=0,
res=@0x7f8e4554fd14: 0, optimize_after_tianmu=@0x7f8e4554fd0c: 1, tianmu_free_join=@0x7f8e4554fd10: 1, with_insert=0)
at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/storage/tianmu/core/engine_execute.cpp:232
#10 0x0000000002e21e47 in Tianmu::dbhandler::TIANMU_HandleSelect (thd=0x7f6b18000b70, lex=0x7f6b18002e98, result=@0x7f8e4554fd18: 0x7f6b1801e1c0, setup_tables_done_option=0,
res=@0x7f8e4554fd14: 0, optimize_after_tianmu=@0x7f8e4554fd0c: 1, tianmu_free_join=@0x7f8e4554fd10: 1, with_insert=0)
at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/storage/tianmu/handler/ha_rcengine.cpp:82
#11 0x0000000002462f6a in execute_sqlcom_select (thd=0x7f6b18000b70, all_tables=0x7f6b1801af98) at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/sql/sql_:5182
#12 0x000000000245c2ee in mysql_execute_command (thd=0x7f6b18000b70, first_level=true) at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/sql/sql_:2831
#13 0x0000000002463f33 in mysql_parse (thd=0x7f6b18000b70, parser_state=0x7f8e45550eb0) at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/sql/sql_:5621
#14 0x00000000024591cb in dispatch_command (thd=0x7f6b18000b70, com_data=0x7f8e45551650, command=COM_QUERY)
at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/sql/sql_:1495
#15 0x00000000024580f7 in do_command (thd=0x7f6b18000b70) at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/sql/sql_:1034
#16 0x000000000258accd in handle_connection (arg=0x9f7cfb0) at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/sql/conn_handler/connection_handler_per_:313
#17 0x0000000002c71102 in pfs_spawn_thread (arg=0x1382bdf0) at /home/jenkins/workspace/stonedb5.7-zsl-centos7.9-30-119-20220805/storage/perfschema/:2197
#18 0x00007f8e94d8aea5 in start_thread () from /lib64/libpthread.so.0
#19 0x00007f8e92fbfb0d in clone () from /lib64/libc.so.6