How to reproduce: run stateful test `00149_quantiles_timing_distributed.sql` with setting `max_block_size=63169`.
Stacktrace:
```
[avogar-dev] 2022.03.17 11:42:08.251619 [ 1185081 ] {be327e35-1f8c-4d51-82a7-01b91b8c9f9a} <Fatal> : Logical error: 'Chunk info was not set for chunk in GroupingAggregatedTransform.'.
[avogar-dev] 2022.03.17 11:42:08.303491 [ 1185133 ] <Fatal> BaseDaemon: ########################################
[avogar-dev] 2022.03.17 11:42:08.321337 [ 1185133 ] <Fatal> BaseDaemon: (version 22.3.1.1, build id: 9CD160A3B57C0E72) (from thread 1185081) (query_id: be327e35-1f8c-4d51-82a7-01b91b8c9f9a) (query: SELECT sum(cityHash64(*)) FROM (SELECT CounterID, quantileTiming(0.5)(SendTiming), count() FROM remote('127.0.0.{1,2,3,4,5,6,7,8,9,10}', test.hits) WHERE SendTiming != -1 GROUP BY CounterID) SETTINGS optimize_aggregation_in_order = 1;) Received signal Aborted (6)
[avogar-dev] 2022.03.17 11:42:08.330091 [ 1185133 ] <Fatal> BaseDaemon:
[avogar-dev] 2022.03.17 11:42:08.330539 [ 1185133 ] <Fatal> BaseDaemon: Stack trace: 0x7f499585303b 0x7f4995832859 0x7f499801f1f9 0x7f499801f309 0x7f496d675879 0x7f496d675719 0x7f496d67709f 0x7f497ce707de 0x7f496e3181d7 0x7f496e33b03f 0x7f496e33b257 0x7f496e33ca1f 0x7f496e33c99d 0x7f496e33c941 0x7f496e33c852 0x7f496e33c71b 0x7f496e33c5dd 0x7f496e33c59d 0x7f496e33c575 0x7f496e33c540 0x7f49981406c6 0x7f4998137695 0x7f4998137055 0x7f499813d7c4 0x7f499813d73d 0x7f499813d665 0x7f499813cfc2 0x7f4995bb9609 0x7f499592f163
[avogar-dev] 2022.03.17 11:42:10.330330 [ 1185133 ] <Fatal> BaseDaemon: 4. raise @ 0x8f6b03b in /home/avogar/ClickHouse/build/src/AggregateFunctions/libclickhouse_aggregate_functionsd.so
[avogar-dev] 2022.03.17 11:42:10.778651 [ 1185133 ] <Fatal> BaseDaemon: 5. abort @ 0x8f4a859 in /home/avogar/ClickHouse/build/src/AggregateFunctions/libclickhouse_aggregate_functionsd.so
[avogar-dev] 2022.03.17 11:42:10.969595 [ 1185133 ] <Fatal> BaseDaemon: 6. ./build/../src/Common/Exception.cpp:52: DB::handle_error_code(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool, std::__1::vector<void*, std::__1::allocator<void*> > const&) @ 0x34b1f9 in /home/avogar/ClickHouse/build/src/libclickhouse_common_iod.so
[avogar-dev] 2022.03.17 11:42:11.103438 [ 1185133 ] <Fatal> BaseDaemon: 7. ./build/../src/Common/Exception.cpp:59: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0x34b309 in /home/avogar/ClickHouse/build/src/libclickhouse_common_iod.so
[avogar-dev] 2022.03.17 11:42:11.358595 [ 1185133 ] <Fatal> BaseDaemon: 8. ./build/../src/Processors/Transforms/MergingAggregatedMemoryEfficientTransform.cpp:251: DB::GroupingAggregatedTransform::addChunk(DB::Chunk, unsigned long) @ 0x38e879 in /home/avogar/ClickHouse/build/src/libclickhouse_processors_transformsd.so
[avogar-dev] 2022.03.17 11:42:11.557263 [ 1185133 ] <Fatal> BaseDaemon: 9. ./build/../src/Processors/Transforms/MergingAggregatedMemoryEfficientTransform.cpp:48: DB::GroupingAggregatedTransform::readFromAllInputs() @ 0x38e719 in /home/avogar/ClickHouse/build/src/libclickhouse_processors_transformsd.so
[avogar-dev] 2022.03.17 11:42:11.751340 [ 1185133 ] <Fatal> BaseDaemon: 10. ./build/../src/Processors/Transforms/MergingAggregatedMemoryEfficientTransform.cpp:138: DB::GroupingAggregatedTransform::prepare() @ 0x39009f in /home/avogar/ClickHouse/build/src/libclickhouse_processors_transformsd.so
[avogar-dev] 2022.03.17 11:42:11.980718 [ 1185133 ] <Fatal> BaseDaemon: 11. ./build/../src/Processors/IProcessor.h:186: DB::IProcessor::prepare(std::__1::vector<unsigned long, std::__1::allocator<unsigned long> > const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> > const&) @ 0x186d7de in /home/avogar/ClickHouse/build/src/Dictionaries/libclickhouse_dictionariesd.so
[avogar-dev] 2022.03.17 11:42:12.143256 [ 1185133 ] <Fatal> BaseDaemon: 12. ./build/../src/Processors/Executors/ExecutingGraph.cpp:266: DB::ExecutingGraph::updateNode(unsigned long, std::__1::queue<DB::ExecutingGraph::Node*, std::__1::deque<DB::ExecutingGraph::Node*, std::__1::allocator<DB::ExecutingGraph::Node*> > >&, std::__1::queue<DB::ExecutingGraph::Node*, std::__1::deque<DB::ExecutingGraph::Node*, std::__1::allocator<DB::ExecutingGraph::Node*> > >&) @ 0x881d7 in /home/avogar/ClickHouse/build/src/libclickhouse_processors_executorsd.so
[avogar-dev] 2022.03.17 11:42:12.287327 [ 1185133 ] <Fatal> BaseDaemon: 13. ./build/../src/Processors/Executors/PipelineExecutor.cpp:232: DB::PipelineExecutor::executeStepImpl(unsigned long, std::__1::atomic<bool>*) @ 0xab03f in /home/avogar/ClickHouse/build/src/libclickhouse_processors_executorsd.so
[avogar-dev] 2022.03.17 11:42:12.431441 [ 1185133 ] <Fatal> BaseDaemon: 14. ./build/../src/Processors/Executors/PipelineExecutor.cpp:178: DB::PipelineExecutor::executeSingleThread(unsigned long) @ 0xab257 in /home/avogar/ClickHouse/build/src/libclickhouse_processors_executorsd.so
[avogar-dev] 2022.03.17 11:42:12.593159 [ 1185133 ] <Fatal> BaseDaemon: 15. ./build/../src/Processors/Executors/PipelineExecutor.cpp:306: DB::PipelineExecutor::executeImpl(unsigned long)::$_1::operator()() const @ 0xaca1f in /home/avogar/ClickHouse/build/src/libclickhouse_processors_executorsd.so
[avogar-dev] 2022.03.17 11:42:12.761330 [ 1185133 ] <Fatal> BaseDaemon: 16. ./build/../contrib/libcxx/include/type_traits:3682: decltype(std::__1::forward<DB::PipelineExecutor::executeImpl(unsigned long)::$_1&>(fp)()) std::__1::__invoke_constexpr<DB::PipelineExecutor::executeImpl(unsigned long)::$_1&>(DB::PipelineExecutor::executeImpl(unsigned long)::$_1&) @ 0xac99d in /home/avogar/ClickHouse/build/src/libclickhouse_processors_executorsd.so
[avogar-dev] 2022.03.17 11:42:12.930381 [ 1185133 ] <Fatal> BaseDaemon: 17. ./build/../contrib/libcxx/include/tuple:1415: decltype(auto) std::__1::__apply_tuple_impl<DB::PipelineExecutor::executeImpl(unsigned long)::$_1&, std::__1::tuple<>&>(DB::PipelineExecutor::executeImpl(unsigned long)::$_1&, std::__1::tuple<>&, std::__1::__tuple_indices<>) @ 0xac941 in /home/avogar/ClickHouse/build/src/libclickhouse_processors_executorsd.so
[avogar-dev] 2022.03.17 11:42:13.098570 [ 1185133 ] <Fatal> BaseDaemon: 18. ./build/../contrib/libcxx/include/tuple:1424: decltype(auto) std::__1::apply<DB::PipelineExecutor::executeImpl(unsigned long)::$_1&, std::__1::tuple<>&>(DB::PipelineExecutor::executeImpl(unsigned long)::$_1&, std::__1::tuple<>&) @ 0xac852 in /home/avogar/ClickHouse/build/src/libclickhouse_processors_executorsd.so
[avogar-dev] 2022.03.17 11:42:13.232209 [ 1185133 ] <Fatal> BaseDaemon: 19. ./build/../src/Common/ThreadPool.h:188: ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PipelineExecutor::executeImpl(unsigned long)::$_1>(DB::PipelineExecutor::executeImpl(unsigned long)::$_1&&)::'lambda'()::operator()() @ 0xac71b in /home/avogar/ClickHouse/build/src/libclickhouse_processors_executorsd.so
[avogar-dev] 2022.03.17 11:42:13.400329 [ 1185133 ] <Fatal> BaseDaemon: 20. ./build/../contrib/libcxx/include/type_traits:3676: decltype(std::__1::forward<DB::PipelineExecutor::executeImpl(unsigned long)::$_1>(fp)()) std::__1::__invoke<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PipelineExecutor::executeImpl(unsigned long)::$_1>(DB::PipelineExecutor::executeImpl(unsigned long)::$_1&&)::'lambda'()&>(DB::PipelineExecutor::executeImpl(unsigned long)::$_1&&) @ 0xac5dd in /home/avogar/ClickHouse/build/src/libclickhouse_processors_executorsd.so
[avogar-dev] 2022.03.17 11:42:13.561591 [ 1185133 ] <Fatal> BaseDaemon: 21. ./build/../contrib/libcxx/include/__functional_base:349: void std::__1::__invoke_void_return_wrapper<void>::__call<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PipelineExecutor::executeImpl(unsigned long)::$_1>(DB::PipelineExecutor::executeImpl(unsigned long)::$_1&&)::'lambda'()&>(DB::PipelineExecutor::executeImpl(unsigned long)::$_1&&...) @ 0xac59d in /home/avogar/ClickHouse/build/src/libclickhouse_processors_executorsd.so
[avogar-dev] 2022.03.17 11:42:13.723703 [ 1185133 ] <Fatal> BaseDaemon: 22. ./build/../contrib/libcxx/include/functional:1608: std::__1::__function::__default_alloc_func<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PipelineExecutor::executeImpl(unsigned long)::$_1>(DB::PipelineExecutor::executeImpl(unsigned long)::$_1&&)::'lambda'(), void ()>::operator()() @ 0xac575 in /home/avogar/ClickHouse/build/src/libclickhouse_processors_executorsd.so
[avogar-dev] 2022.03.17 11:42:13.885360 [ 1185133 ] <Fatal> BaseDaemon: 23. ./build/../contrib/libcxx/include/functional:2089: void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PipelineExecutor::executeImpl(unsigned long)::$_1>(DB::PipelineExecutor::executeImpl(unsigned long)::$_1&&)::'lambda'(), void ()> >(std::__1::__function::__policy_storage const*) @ 0xac540 in /home/avogar/ClickHouse/build/src/libclickhouse_processors_executorsd.so
^C[avogar-dev] 2022.03.17 11:42:14.011632 [ 1185133 ] <Fatal> BaseDaemon: 24. ./build/../contrib/libcxx/include/functional:2221: std::__1::__function::__policy_func<void ()>::operator()() const @ 0x46c6c6 in /home/avogar/ClickHouse/build/src/libclickhouse_common_iod.so
```

Was found in https://github.com/ClickHouse/ClickHouse/pull/35047
Pipe & pipe,
    AggregatingTransformParamsPtr params,
    size_t num_merging_processors)
{
    pipe.addTransform(std::make_shared<GroupingAggregatedTransform>(pipe.getHeader(), pipe.numOutputPorts(), params));
    if (num_merging_processors <= 1)
    {
        
        pipe.addTransform(std::make_shared<MergingAggregatedBucketTransform>(params));
        return;
    }
    
    
    
    pipe.resize(num_merging_processors);
    pipe.addSimpleTransform([params](const Block &)
    {
        return std::make_shared<MergingAggregatedBucketTransform>(params);
    });
    pipe.addTransform(std::make_shared<SortingAggregatedTransform>(num_merging_processors, params));
}
}