```
select groupArrayResample(-9223372036854775808, 9223372036854775807, 9223372036854775807)(number, number % -9223372036854775808) FROM numbers(7)



2020.09.07 13:26:14.500093 [ 105824 ] {} <Trace> BaseDaemon: Received signal 11
2020.09.07 13:26:14.500628 [ 141421 ] {} <Fatal> BaseDaemon: ########################################
2020.09.07 13:26:14.501365 [ 141421 ] {} <Fatal> BaseDaemon: (version 20.9.1.1, build id: 9016E36283E46877) (from thread 105886) (query_id: 6121ada5-070c-4bb4-8e02-d7d17577b0a3) Received signal Segmentation fault (11)
2020.09.07 13:26:14.501616 [ 141421 ] {} <Fatal> BaseDaemon: Address: 0xd Access: write. Address not mapped to object.
2020.09.07 13:26:14.501915 [ 141421 ] {} <Fatal> BaseDaemon: Stack trace: 0x7f902eaf7789 0x7f902eaf63f9 0x7f902f4ab183 0x7f902f4ab606 0x7f901e715591 0x7f901e7167b4 0x7f901a11cb58 0x7f901a11af51 0x7f901aa68cfc 0x7f901aa68c5f 0x7f901aa68c1d 0x7f901aa68bcd 0x7f901aa68b9d 0x7f901aa67cee 0x7f90352a10d5 0x7f90352a1075 0x7f901aa66605 0x7f901aa66df9 0x7f901aa65340 0x7f901aa64916 0x7f901aa8791d 0x7f901aa87882 0x7f901aa8780d 0x7f901aa877d1 0x7f901aa877a2 0x7f901aa8769c 0x7f901aa8762d 0x7f901aa875dd
2020.09.07 13:26:14.504997 [ 141421 ] {} <Fatal> BaseDaemon: 4. /home/akuzm/ch1/ch/src/Common/PODArray.h:418: void DB::PODArray<unsigned long, 32ul, DB::MixedArenaAllocator<4096ul, Allocator<false, false>, DB::AlignedArenaAllocator<8ul>, 8ul>, 0ul, 0ul>::push_back<unsigned long const&, DB::Arena*&>(unsigned long const&, DB::Arena*&) @ 0x39bc789 in /home/akuzm/ch1/build-clang10/src/AggregateFunctions/libclickhouse_aggregate_functionsd.so
2020.09.07 13:26:14.507871 [ 141421 ] {} <Fatal> BaseDaemon: 5. /home/akuzm/ch1/ch/src/AggregateFunctions/AggregateFunctionGroupArray.h:176: DB::GroupArrayNumericImpl<unsigned long, DB::GroupArrayTrait<false, (DB::Sampler)0> >::add(char*, DB::IColumn const**, unsigned long, DB::Arena*) const @ 0x39bb3f9 in /home/akuzm/ch1/build-clang10/src/AggregateFunctions/libclickhouse_aggregate_functionsd.so
2020.09.07 13:26:14.513458 [ 141421 ] {} <Fatal> BaseDaemon: 6. /home/akuzm/ch1/ch/src/AggregateFunctions/AggregateFunctionResample.h:143: DB::AggregateFunctionResample<long>::add(char*, DB::IColumn const**, unsigned long, DB::Arena*) const @ 0x4370183 in /home/akuzm/ch1/build-clang10/src/AggregateFunctions/libclickhouse_aggregate_functionsd.so
2020.09.07 13:26:14.518903 [ 141421 ] {} <Fatal> BaseDaemon: 7. /home/akuzm/ch1/ch/src/AggregateFunctions/IAggregateFunction.h:229: DB::IAggregateFunctionHelper<DB::AggregateFunctionResample<long> >::addBatchSinglePlace(unsigned long, char*, DB::IColumn const**, DB::Arena*) const @ 0x4370606 in /home/akuzm/ch1/build-clang10/src/AggregateFunctions/libclickhouse_aggregate_functionsd.so
2020.09.07 13:26:14.519574 [ 141421 ] {} <Fatal> BaseDaemon: 8. /home/akuzm/ch1/ch/src/Interpreters/Aggregator.cpp:624: DB::Aggregator::executeWithoutKeyImpl(char*&, unsigned long, DB::Aggregator::AggregateFunctionInstruction*, DB::Arena*) @ 0xff4591 in /home/akuzm/ch1/build-clang10/src/libclickhouse_interpretersd.so
2020.09.07 13:26:14.520286 [ 141421 ] {} <Fatal> BaseDaemon: 9. /home/akuzm/ch1/ch/src/Interpreters/Aggregator.cpp:767: DB::Aggregator::executeOnBlock(std::__1::vector<COW<DB::IColumn>::immutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::immutable_ptr<DB::IColumn> > >, unsigned long, DB::AggregatedDataVariants&, std::__1::vector<DB::IColumn const*, std::__1::allocator<DB::IColumn const*> >&, std::__1::vector<std::__1::vector<DB::IColumn const*, std::__1::allocator<DB::IColumn const*> >, std::__1::allocator<std::__1::vector<DB::IColumn const*, std::__1::allocator<DB::IColumn const*> > > >&, bool&) @ 0xff57b4 in /home/akuzm/ch1/build-clang10/src/libclickhouse_interpretersd.so
2020.09.07 13:26:14.520910 [ 141421 ] {} <Fatal> BaseDaemon: 10. /home/akuzm/ch1/ch/src/Processors/Transforms/AggregatingTransform.cpp:525: DB::AggregatingTransform::consume(DB::Chunk) @ 0x22fb58 in /home/akuzm/ch1/build-clang10/src/libclickhouse_processors_transformsd.so
2020.09.07 13:26:14.521403 [ 141421 ] {} <Fatal> BaseDaemon: 11. /home/akuzm/ch1/ch/src/Processors/Transforms/AggregatingTransform.cpp:495: DB::AggregatingTransform::work() @ 0x22df51 in /home/akuzm/ch1/build-clang10/src/libclickhouse_processors_transformsd.so
2020.09.07 13:26:14.521970 [ 141421 ] {} <Fatal> BaseDaemon: 12. /home/akuzm/ch1/ch/src/Processors/Executors/PipelineExecutor.cpp:78: DB::executeJob(DB::IProcessor*) @ 0x134cfc in /home/akuzm/ch1/build-clang10/src/libclickhouse_processors_executorsd.so
2020.09.07 13:26:14.522486 [ 141421 ] {} <Fatal> BaseDaemon: 13. /home/akuzm/ch1/ch/src/Processors/Executors/PipelineExecutor.cpp:95: DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0::operator()() const @ 0x134c5f in /home/akuzm/ch1/build-clang10/src/libclickhouse_processors_executorsd.so
2020.09.07 13:26:14.523009 [ 141421 ] {} <Fatal> BaseDaemon: 14. /home/akuzm/ch1/ch/contrib/libcxx/include/type_traits:3519: decltype(std::__1::forward<DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0&>(fp)()) std::__1::__invoke<DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0&>(DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0&) @ 0x134c1d in /home/akuzm/ch1/build-clang10/src/libclickhouse_processors_executorsd.so
2020.09.07 13:26:14.523516 [ 141421 ] {} <Fatal> BaseDaemon: 15. /home/akuzm/ch1/ch/contrib/libcxx/include/__functional_base:349: void std::__1::__invoke_void_return_wrapper<void>::__call<DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0&>(DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0&) @ 0x134bcd in /home/akuzm/ch1/build-clang10/src/libclickhouse_processors_executorsd.so
2020.09.07 13:26:14.524031 [ 141421 ] {} <Fatal> BaseDaemon: 16. /home/akuzm/ch1/ch/contrib/libcxx/include/functional:1540: std::__1::__function::__alloc_func<DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0, std::__1::allocator<DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0>, void ()>::operator()() @ 0x134b9d in /home/akuzm/ch1/build-clang10/src/libclickhouse_processors_executorsd.so
2020.09.07 13:26:14.524501 [ 141421 ] {} <Fatal> BaseDaemon: 17. /home/akuzm/ch1/ch/contrib/libcxx/include/functional:1714: std::__1::__function::__func<DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0, std::__1::allocator<DB::PipelineExecutor::addJob(DB::ExecutingGraph::Node*)::$_0>, void ()>::operator()() @ 0x133cee in /home/akuzm/ch1/build-clang10/src/libclickhouse_processors_executorsd.so
2020.09.07 13:26:14.527174 [ 141421 ] {} <Fatal> BaseDaemon: 18. /home/akuzm/ch1/ch/contrib/libcxx/include/functional:1867: std::__1::__function::__value_func<void ()>::operator()() const @ 0x1cd0d5 in /home/akuzm/ch1/build-clang10/programs/server/libclickhouse-server-libd.so
2020.09.07 13:26:14.529990 [ 141421 ] {} <Fatal> BaseDaemon: 19. /home/akuzm/ch1/ch/contrib/libcxx/include/functional:2473: std::__1::function<void ()>::operator()() const @ 0x1cd075 in /home/akuzm/ch1/build-clang10/programs/server/libclickhouse-server-libd.so
2020.09.07 13:26:14.530701 [ 141421 ] {} <Fatal> BaseDaemon: 20. /home/akuzm/ch1/ch/src/Processors/Executors/PipelineExecutor.cpp:564: DB::PipelineExecutor::executeStepImpl(unsigned long, unsigned long, std::__1::atomic<bool>*) @ 0x132605 in /home/akuzm/ch1/build-clang10/src/libclickhouse_processors_executorsd.so
2020.09.07 13:26:14.531343 [ 141421 ] {} <Fatal> BaseDaemon: 21. /home/akuzm/ch1/ch/src/Processors/Executors/PipelineExecutor.cpp:477: DB::PipelineExecutor::executeSingleThread(unsigned long, unsigned long) @ 0x132df9 in /home/akuzm/ch1/build-clang10/src/libclickhouse_processors_executorsd.so
2020.09.07 13:26:14.531800 [ 141421 ] {} <Fatal> BaseDaemon: 22. /home/akuzm/ch1/ch/src/Processors/Executors/PipelineExecutor.cpp:752: DB::PipelineExecutor::executeImpl(unsigned long) @ 0x131340 in /home/akuzm/ch1/build-clang10/src/libclickhouse_processors_executorsd.so
2020.09.07 13:26:14.532171 [ 141421 ] {} <Fatal> BaseDaemon: 23. /home/akuzm/ch1/ch/src/Processors/Executors/PipelineExecutor.cpp:399: DB::PipelineExecutor::execute(unsigned long) @ 0x130916 in /home/akuzm/ch1/build-clang10/src/libclickhouse_processors_executorsd.so
2020.09.07 13:26:14.532648 [ 141421 ] {} <Fatal> BaseDaemon: 24. /home/akuzm/ch1/ch/src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:79: DB::threadFunction(DB::PullingAsyncPipelineExecutor::Data&, std::__1::shared_ptr<DB::ThreadGroupStatus>, unsigned long) @ 0x15391d in /home/akuzm/ch1/build-clang10/src/libclickhouse_processors_executorsd.so
2020.09.07 13:26:14.533101 [ 141421 ] {} <Fatal> BaseDaemon: 25. /home/akuzm/ch1/ch/src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:101: DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0::operator()() const @ 0x153882 in /home/akuzm/ch1/build-clang10/src/libclickhouse_processors_executorsd.so
2020.09.07 13:26:14.533568 [ 141421 ] {} <Fatal> BaseDaemon: 26. /home/akuzm/ch1/ch/contrib/libcxx/include/type_traits:3525: decltype(std::__1::forward<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0 const&>(fp)()) std::__1::__invoke_constexpr<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0 const&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0 const&) @ 0x15380d in /home/akuzm/ch1/build-clang10/src/libclickhouse_processors_executorsd.so
2020.09.07 13:26:14.534041 [ 141421 ] {} <Fatal> BaseDaemon: 27. /home/akuzm/ch1/ch/contrib/libcxx/include/tuple:1415: decltype(auto) std::__1::__apply_tuple_impl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0 const&, std::__1::tuple<> const&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0 const&, std::__1::tuple<> const&, std::__1::__tuple_indices<>) @ 0x1537d1 in /home/akuzm/ch1/build-clang10/src/libclickhouse_processors_executorsd.so
2020.09.07 13:26:14.534503 [ 141421 ] {} <Fatal> BaseDaemon: 28. /home/akuzm/ch1/ch/contrib/libcxx/include/tuple:1424: decltype(auto) std::__1::apply<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0 const&, std::__1::tuple<> const&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0 const&, std::__1::tuple<> const&) @ 0x1537a2 in /home/akuzm/ch1/build-clang10/src/libclickhouse_processors_executorsd.so
2020.09.07 13:26:14.534982 [ 141421 ] {} <Fatal> BaseDaemon: 29. /home/akuzm/ch1/ch/src/Common/ThreadPool.h:171: ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()::operator()() const @ 0x15369c in /home/akuzm/ch1/build-clang10/src/libclickhouse_processors_executorsd.so
2020.09.07 13:26:14.535448 [ 141421 ] {} <Fatal> BaseDaemon: 30. /home/akuzm/ch1/ch/contrib/libcxx/include/type_traits:3519: decltype(std::__1::forward<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(fp)()) std::__1::__invoke<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&) @ 0x15362d in /home/akuzm/ch1/build-clang10/src/libclickhouse_processors_executorsd.so
2020.09.07 13:26:14.535999 [ 141421 ] {} <Fatal> BaseDaemon: 31. /home/akuzm/ch1/ch/contrib/libcxx/include/__functional_base:349: void std::__1::__invoke_void_return_wrapper<void>::__call<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&...) @ 0x1535dd in /home/akuzm/ch1/build-clang10/src/libclickhouse_processors_executorsd.so
```
{
        return nested_function->hasTrivialDestructor();
    }
    size_t sizeOfData() const override
    {
        return total * size_of_data;
    }
    size_t alignOfData() const override
    {
        return align_of_data;
    }
    void create(AggregateDataPtr place) const override
    {
        for (size_t i = 0; i < total; ++i)
        {
            try
            {
                nested_function->create(place + i * size_of_data);
            }
            catch (...)
            {
                for (size_t j = 0; j < i; ++j)
                    nested_function->destroy(place + j * size_of_data);
                throw;
            }
        }
    }
    void destroy(AggregateDataPtr place) const noexcept override