https://s3.amazonaws.com/clickhouse-test-reports/41945/e40917a9c50f2a9e9e90d4a0f5e065195671f7f3/stateless_tests__release__wide_parts_enabled_.html

```
2022.10.02 02:23:19.183911 [ 10348 ] {} <Fatal> BaseDaemon: ########################################
2022.10.02 02:23:19.184022 [ 10348 ] {} <Fatal> BaseDaemon: (version 22.10.1.605, build id: 94AB863D64F2C501BD444AD6EDD20765D46E47FB) (from thread 4308) (query_id: 8aeac991-7aed-431d-8f28-359a991a125c) (query: SELECT * FROM s3('http://localhost:11111/test/{a,tsv_with_header}.tsv', 'TSV', 'c1 UInt64, c2 UInt64, c3 UInt64')) Received signal Aborted (6)
2022.10.02 02:23:19.184075 [ 10348 ] {} <Fatal> BaseDaemon: 
2022.10.02 02:23:19.184113 [ 10348 ] {} <Fatal> BaseDaemon: Stack trace: 0x7f2f1b52a00b 0x7f2f1b509859 0x1311bfd9 0x1145b4ef 0x128b7bfc 0x1300c135 0x1300bcc6 0x13027da6 0x1301bf7c 0x1301e5fd 0x79fe66c 0x7a03d7e 0x7f2f1b6e1609 0x7f2f1b606133
2022.10.02 02:23:19.184151 [ 10348 ] {} <Fatal> BaseDaemon: 2. raise @ 0x7f2f1b52a00b in ?
2022.10.02 02:23:19.184169 [ 10348 ] {} <Fatal> BaseDaemon: 3. abort @ 0x7f2f1b509859 in ?
2022.10.02 02:23:19.233583 [ 10348 ] {} <Fatal> BaseDaemon: 4. ./build_docker/../contrib/libcxxabi/src/cxa_exception.cpp:657: DB::ParallelParsingInputFormat::~ParallelParsingInputFormat() @ 0x1311bfd9 in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.02 02:23:19.261060 [ 10348 ] {} <Fatal> BaseDaemon: 5.1. inlined from ./build_docker/../contrib/libcxx/src/include/atomic_support.h:74: long std::__1::(anonymous namespace)::__libcpp_atomic_load<long>(long const*, int)
2022.10.02 02:23:19.261102 [ 10348 ] {} <Fatal> BaseDaemon: 5.2. inlined from ./build_docker/../contrib/libcxx/src/memory.cpp:102: std::__1::__shared_weak_count::__release_weak()
2022.10.02 02:23:19.261121 [ 10348 ] {} <Fatal> BaseDaemon: 5.3. inlined from ./build_docker/../contrib/libcxx/include/__memory/shared_ptr.h:217: std::__1::__shared_weak_count::__release_shared()
2022.10.02 02:23:19.261134 [ 10348 ] {} <Fatal> BaseDaemon: 5.4. inlined from ./build_docker/../contrib/libcxx/include/__memory/shared_ptr.h:703: ~shared_ptr
2022.10.02 02:23:19.261156 [ 10348 ] {} <Fatal> BaseDaemon: 5.5. inlined from ./build_docker/../contrib/libcxx/include/__memory/construct_at.h:56: void std::__1::__destroy_at<std::__1::shared_ptr<DB::IProcessor>, 0>(std::__1::shared_ptr<DB::IProcessor>*)
2022.10.02 02:23:19.261173 [ 10348 ] {} <Fatal> BaseDaemon: 5.6. inlined from ./build_docker/../contrib/libcxx/include/__memory/construct_at.h:81: void std::__1::destroy_at<std::__1::shared_ptr<DB::IProcessor>, 0>(std::__1::shared_ptr<DB::IProcessor>*)
2022.10.02 02:23:19.261192 [ 10348 ] {} <Fatal> BaseDaemon: 5.7. inlined from ./build_docker/../contrib/libcxx/include/__memory/allocator_traits.h:317: void std::__1::allocator_traits<std::__1::allocator<std::__1::shared_ptr<DB::IProcessor> > >::destroy<std::__1::shared_ptr<DB::IProcessor>, void, void>(std::__1::allocator<std::__1::shared_ptr<DB::IProcessor> >&, std::__1::shared_ptr<DB::IProcessor>*)
2022.10.02 02:23:19.261213 [ 10348 ] {} <Fatal> BaseDaemon: 5.8. inlined from ./build_docker/../contrib/libcxx/include/vector:803: std::__1::vector<std::__1::shared_ptr<DB::IProcessor>, std::__1::allocator<std::__1::shared_ptr<DB::IProcessor> > >::__base_destruct_at_end(std::__1::shared_ptr<DB::IProcessor>*)
2022.10.02 02:23:19.261226 [ 10348 ] {} <Fatal> BaseDaemon: 5.9. inlined from ./build_docker/../contrib/libcxx/include/vector:797: std::__1::vector<std::__1::shared_ptr<DB::IProcessor>, std::__1::allocator<std::__1::shared_ptr<DB::IProcessor> > >::__clear()
2022.10.02 02:23:19.261241 [ 10348 ] {} <Fatal> BaseDaemon: 5.10. inlined from ./build_docker/../contrib/libcxx/include/vector:401: ~vector
2022.10.02 02:23:19.261262 [ 10348 ] {} <Fatal> BaseDaemon: 5. ./build_docker/../src/QueryPipeline/QueryPipeline.cpp:35: DB::QueryPipeline::~QueryPipeline() @ 0x1145b4ef in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.02 02:23:19.350057 [ 10348 ] {} <Fatal> BaseDaemon: 6.1. inlined from ./build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:54: std::__1::default_delete<DB::QueryPipeline>::operator()(DB::QueryPipeline*) const
2022.10.02 02:23:19.350109 [ 10348 ] {} <Fatal> BaseDaemon: 6.2. inlined from ./build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:315: std::__1::unique_ptr<DB::QueryPipeline, std::__1::default_delete<DB::QueryPipeline> >::reset(DB::QueryPipeline*)
2022.10.02 02:23:19.350150 [ 10348 ] {} <Fatal> BaseDaemon: 6. ./build_docker/../src/Storages/StorageS3.cpp:551: DB::StorageS3Source::generate() @ 0x128b7bfc in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.02 02:23:19.361691 [ 10348 ] {} <Fatal> BaseDaemon: 7.1. inlined from ./build_docker/../src/Processors/Chunk.h:90: DB::Chunk::hasRows() const
2022.10.02 02:23:19.361755 [ 10348 ] {} <Fatal> BaseDaemon: 7.2. inlined from ./build_docker/../src/Processors/Chunk.h:92: DB::Chunk::empty() const
2022.10.02 02:23:19.361794 [ 10348 ] {} <Fatal> BaseDaemon: 7.3. inlined from ./build_docker/../src/Processors/Chunk.h:93: DB::Chunk::operator bool() const
2022.10.02 02:23:19.361817 [ 10348 ] {} <Fatal> BaseDaemon: 7. ./build_docker/../src/Processors/ISource.cpp:125: DB::ISource::tryGenerate() @ 0x1300c135 in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.02 02:23:19.372958 [ 10348 ] {} <Fatal> BaseDaemon: 8.1. inlined from ./build_docker/../contrib/libcxx/include/optional:321: std::__1::__optional_storage_base<DB::Chunk, false>::has_value() const
2022.10.02 02:23:19.373040 [ 10348 ] {} <Fatal> BaseDaemon: 8.2. inlined from ./build_docker/../contrib/libcxx/include/optional:975: std::__1::optional<DB::Chunk>::operator bool() const
2022.10.02 02:23:19.373067 [ 10348 ] {} <Fatal> BaseDaemon: 8. ./build_docker/../src/Processors/ISource.cpp:94: DB::ISource::work() @ 0x1300bcc6 in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.02 02:23:19.378588 [ 10348 ] {} <Fatal> BaseDaemon: 9.1. inlined from ./build_docker/../src/Processors/Executors/ExecutionThreadContext.cpp:0: DB::executeJob(DB::ExecutingGraph::Node*, DB::ReadProgressCallback*)
2022.10.02 02:23:19.378848 [ 10348 ] {} <Fatal> BaseDaemon: 9. ./build_docker/../src/Processors/Executors/ExecutionThreadContext.cpp:92: DB::ExecutionThreadContext::executeTask() @ 0x13027da6 in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.02 02:23:19.392970 [ 10348 ] {} <Fatal> BaseDaemon: 10. ./build_docker/../src/Processors/Executors/PipelineExecutor.cpp:228: DB::PipelineExecutor::executeStepImpl(unsigned long, std::__1::atomic<bool>*) @ 0x1301bf7c in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.02 02:23:19.427134 [ 10348 ] {} <Fatal> BaseDaemon: 11.1. inlined from ./build_docker/../src/Processors/Executors/PipelineExecutor.cpp:0: operator()
2022.10.02 02:23:19.427191 [ 10348 ] {} <Fatal> BaseDaemon: 11.2. inlined from ./build_docker/../contrib/libcxx/include/type_traits:3640: decltype(static_cast<DB::PipelineExecutor::spawnThreads()::$_0>(fp)()) std::__1::__invoke<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&>(DB::PipelineExecutor::spawnThreads()::$_0&&)
2022.10.02 02:23:19.427224 [ 10348 ] {} <Fatal> BaseDaemon: 11.3. inlined from ./build_docker/../contrib/libcxx/include/__functional/invoke.h:61: void std::__1::__invoke_void_return_wrapper<void, true>::__call<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&>(ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'()&)
2022.10.02 02:23:19.427261 [ 10348 ] {} <Fatal> BaseDaemon: 11.4. inlined from ./build_docker/../contrib/libcxx/include/__functional/function.h:230: std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()>::operator()()
2022.10.02 02:23:19.427284 [ 10348 ] {} <Fatal> BaseDaemon: 11. ./build_docker/../contrib/libcxx/include/__functional/function.h:711: void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::PipelineExecutor::spawnThreads()::$_0>(DB::PipelineExecutor::spawnThreads()::$_0&&)::'lambda'(), void ()> >(std::__1::__function::__policy_storage const*) @ 0x1301e5fd in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.02 02:23:19.440268 [ 10348 ] {} <Fatal> BaseDaemon: 12.1. inlined from ./build_docker/../base/base/../base/wide_integer_impl.h:772: bool wide::integer<128ul, unsigned int>::_impl::operator_eq<wide::integer<128ul, unsigned int> >(wide::integer<128ul, unsigned int> const&, wide::integer<128ul, unsigned int> const&)
2022.10.02 02:23:19.440324 [ 10348 ] {} <Fatal> BaseDaemon: 12.2. inlined from ./build_docker/../base/base/../base/wide_integer_impl.h:1439: bool wide::operator==<128ul, unsigned int, 128ul, unsigned int>(wide::integer<128ul, unsigned int> const&, wide::integer<128ul, unsigned int> const&)
2022.10.02 02:23:19.440348 [ 10348 ] {} <Fatal> BaseDaemon: 12.3. inlined from ./build_docker/../base/base/../base/strong_typedef.h:42: StrongTypedef<wide::integer<128ul, unsigned int>, DB::UUIDTag>::operator==(StrongTypedef<wide::integer<128ul, unsigned int>, DB::UUIDTag> const&) const
2022.10.02 02:23:19.440376 [ 10348 ] {} <Fatal> BaseDaemon: 12.4. inlined from ./build_docker/../src/Common/OpenTelemetryTraceContext.h:39: DB::OpenTelemetry::Span::isTraceEnabled() const
2022.10.02 02:23:19.440400 [ 10348 ] {} <Fatal> BaseDaemon: 12. ./build_docker/../src/Common/ThreadPool.cpp:296: ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0x79fe66c in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.02 02:23:19.460734 [ 10348 ] {} <Fatal> BaseDaemon: 13.1. inlined from ./build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:312: std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >::reset(std::__1::__thread_struct*)
2022.10.02 02:23:19.460795 [ 10348 ] {} <Fatal> BaseDaemon: 13.2. inlined from ./build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:269: ~unique_ptr
2022.10.02 02:23:19.460825 [ 10348 ] {} <Fatal> BaseDaemon: 13.3. inlined from ./build_docker/../contrib/libcxx/include/tuple:210: ~__tuple_leaf
2022.10.02 02:23:19.460844 [ 10348 ] {} <Fatal> BaseDaemon: 13.4. inlined from ./build_docker/../contrib/libcxx/include/tuple:470: ~tuple
2022.10.02 02:23:19.460879 [ 10348 ] {} <Fatal> BaseDaemon: 13.5. inlined from ./build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:54: std::__1::default_delete<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()> >::operator()(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>*) const
2022.10.02 02:23:19.460918 [ 10348 ] {} <Fatal> BaseDaemon: 13.6. inlined from ./build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:315: std::__1::unique_ptr<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>, std::__1::default_delete<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()> > >::reset(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()>*)
2022.10.02 02:23:19.460951 [ 10348 ] {} <Fatal> BaseDaemon: 13.7. inlined from ./build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:269: ~unique_ptr
2022.10.02 02:23:19.460979 [ 10348 ] {} <Fatal> BaseDaemon: 13. ./build_docker/../contrib/libcxx/include/thread:295: void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>, bool)::'lambda0'()> >(void*) @ 0x7a03d7e in /usr/lib/debug/usr/bin/clickhouse.debug
2022.10.02 02:23:19.461036 [ 10348 ] {} <Fatal> BaseDaemon: 14. ? @ 0x7f2f1b6e1609 in ?
2022.10.02 02:23:19.461076 [ 10348 ] {} <Fatal> BaseDaemon: 15. __clone @ 0x7f2f1b606133 in ?
2022.10.02 02:23:19.715861 [ 10348 ] {} <Fatal> BaseDaemon: Integrity check of the executable skipped because the reference checksum could not be read. (calculated checksum: 04D484300E9032E20175057C6F1CE880)
2022.10.02 02:23:39.607974 [ 643 ] {} <Fatal> Application: Child process was terminated by signal 6.
```

cc: @nikitamikhaylov 
#include <Processors/Formats/Impl/ParallelParsingInputFormat.h>
#include <IO/ReadHelpers.h>
#include <IO/WithFileName.h>
#include <Common/CurrentThread.h>
#include <Common/setThreadName.h>
#include <Common/scope_guard_safe.h>
namespace DB
{
void ParallelParsingInputFormat::segmentatorThreadFunction(ThreadGroupStatusPtr thread_group)
{
    SCOPE_EXIT_SAFE(
        if (thread_group)
            CurrentThread::detachQueryIfNotDetached();
    );
    if (thread_group)
        CurrentThread::attachTo(thread_group);
    setThreadName("Segmentator");
    try
    {