Found in stress test: https://gist.github.com/alesapin/5cd6b8901488a1f170d5ef389900a534
Report: https://s3.amazonaws.com/clickhouse-test-reports/31158/7fb9a42b119b6c3eba1784caaabde51c1ded3384/stress_tests__debug__actions_.html
{
    if (cur_block_size && is_consume_finished)
    {
        params->aggregator.addSingleKeyToAggregateColumns(variants, res_aggregate_columns);
        variants.without_key = nullptr;
    }
    Block res = res_header.cloneEmpty();
    for (size_t i = 0; i < res_key_columns.size(); ++i)
        res.getByPosition(i).column = std::move(res_key_columns[i]);
    for (size_t i = 0; i < res_aggregate_columns.size(); ++i)
        res.getByPosition(i + res_key_columns.size()).column = std::move(res_aggregate_columns[i]);
    to_push_chunk = convertToChunk(res);
    
    
    variants.aggregates_pools = { std::make_shared<Arena>() };
    variants.aggregates_pool = variants.aggregates_pools.at(0).get();
    
    to_push_chunk.setChunkInfo(std::make_shared<ChunkInfoWithAllocatedBytes>(cur_block_bytes));
    cur_block_bytes = 0;
    cur_block_size = 0;
    res_rows += to_push_chunk.getNumRows();
    need_generate = false;
}
}