```
2022.12.30 15:54:52.590484 [ 55 ] {} <Fatal> BaseDaemon: Code: 75. DB::ErrnoException: Cannot write to file (fd = 421), errno: 11, strerror: Resource temporarily unavailable. (CANNOT_WRITE_TO_FILE_DESCRIPTOR), Stack trace (when copying this message, always include the lines below):
2022.12.30 15:54:52.590503 [ 55 ] {} <Fatal> BaseDaemon: 
2022.12.30 15:54:52.590517 [ 55 ] {} <Fatal> BaseDaemon: 0. DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, int, bool) @ 0xd9cea7a in /usr/bin/clickhouse
2022.12.30 15:54:52.590537 [ 55 ] {} <Fatal> BaseDaemon: 1. DB::throwFromErrnoWithPath(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, int, int) @ 0xd9cfaaf in /usr/bin/clickhouse
2022.12.30 15:54:52.590559 [ 55 ] {} <Fatal> BaseDaemon: 2. DB::WriteBufferFromFileDescriptor::nextImpl() @ 0xda2d0db in /usr/bin/clickhouse
2022.12.30 15:54:52.590574 [ 55 ] {} <Fatal> BaseDaemon: 3. DB::TraceCollector::stop() @ 0x13627461 in /usr/bin/clickhouse
2022.12.30 15:54:52.590587 [ 55 ] {} <Fatal> BaseDaemon: 4. DB::TraceCollector::~TraceCollector() @ 0x136270b3 in /usr/bin/clickhouse
2022.12.30 15:54:52.590601 [ 55 ] {} <Fatal> BaseDaemon: 5. ? @ 0x12c813d4 in /usr/bin/clickhouse
2022.12.30 15:54:52.590613 [ 55 ] {} <Fatal> BaseDaemon: 6. DB::Context::shutdown() @ 0x12c80d4f in /usr/bin/clickhouse
2022.12.30 15:54:52.590625 [ 55 ] {} <Fatal> BaseDaemon: 7. ? @ 0xda6a99e in /usr/bin/clickhouse
2022.12.30 15:54:52.590639 [ 55 ] {} <Fatal> BaseDaemon: 8. DB::Server::main(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&) @ 0xda5de90 in /usr/bin/clickhouse
2022.12.30 15:54:52.590654 [ 55 ] {} <Fatal> BaseDaemon: 9. Poco::Util::Application::run() @ 0x171fa242 in /usr/bin/clickhouse
2022.12.30 15:54:52.590668 [ 55 ] {} <Fatal> BaseDaemon: 10. DB::Server::run() @ 0xda4873c in /usr/bin/clickhouse
2022.12.30 15:54:52.590679 [ 55 ] {} <Fatal> BaseDaemon: 11. Poco::Util::ServerApplication::run(int, char**) @ 0x1720e59a in /usr/bin/clickhouse
2022.12.30 15:54:52.590692 [ 55 ] {} <Fatal> BaseDaemon: 12. mainEntryClickHouseServer(int, char**) @ 0xda451a9 in /usr/bin/clickhouse
2022.12.30 15:54:52.590707 [ 55 ] {} <Fatal> BaseDaemon: 13. main @ 0x7d705f3 in /usr/bin/clickhouse
2022.12.30 15:54:52.590719 [ 55 ] {} <Fatal> BaseDaemon: 14. __libc_start_main @ 0x7f999e2a2083 in ?
2022.12.30 15:54:52.590731 [ 55 ] {} <Fatal> BaseDaemon: 15. _start @ 0x7a70aee in /usr/bin/clickhouse
2022.12.30 15:54:52.590745 [ 55 ] {} <Fatal> BaseDaemon:  (version 22.11.1.19280 (official build))
2022.12.30 15:54:52.590899 [ 7666 ] {} <Fatal> BaseDaemon: ########################################
2022.12.30 15:54:52.590939 [ 7666 ] {} <Fatal> BaseDaemon: (version 22.11.1.19280 (official build), build id: BA0E04D78F678A9752916B0BE48527A1143C6AA8) (from thread 53) (no query) Received signal Aborted (6)
2022.12.30 15:54:52.590959 [ 7666 ] {} <Fatal> BaseDaemon: 
2022.12.30 15:54:52.590982 [ 7666 ] {} <Fatal> BaseDaemon: Stack trace: 0x7f999e2c100b 0x7f999e2a0859 0xdbfecbc 0x19e24983 0x19e248ee 0x7d70aab 0x13627390 0x12c813d4 0x12c80d4f 0xda6a99e 0xda5de90 0x171fa242 0xda4873c 0x1720e59a 0xda451a9 0x7d705f3 0x7f999e2a2083 0x7a70aee
2022.12.30 15:54:52.591004 [ 7666 ] {} <Fatal> BaseDaemon: 2. gsignal @ 0x7f999e2c100b in ?
2022.12.30 15:54:52.591021 [ 7666 ] {} <Fatal> BaseDaemon: 3. abort @ 0x7f999e2a0859 in ?
2022.12.30 15:54:52.591051 [ 7666 ] {} <Fatal> BaseDaemon: 4. ? @ 0xdbfecbc in /usr/bin/clickhouse
2022.12.30 15:54:52.591067 [ 7666 ] {} <Fatal> BaseDaemon: 5. ? @ 0x19e24983 in ?
2022.12.30 15:54:52.591083 [ 7666 ] {} <Fatal> BaseDaemon: 6. std::terminate() @ 0x19e248ee in ?
2022.12.30 15:54:52.591101 [ 7666 ] {} <Fatal> BaseDaemon: 7. ? @ 0x7d70aab in /usr/bin/clickhouse
2022.12.30 15:54:52.591117 [ 7666 ] {} <Fatal> BaseDaemon: 8. ? @ 0x13627390 in /usr/bin/clickhouse
2022.12.30 15:54:52.591131 [ 7666 ] {} <Fatal> BaseDaemon: 9. ? @ 0x12c813d4 in /usr/bin/clickhouse
2022.12.30 15:54:52.591148 [ 7666 ] {} <Fatal> BaseDaemon: 10. DB::Context::shutdown() @ 0x12c80d4f in /usr/bin/clickhouse
2022.12.30 15:54:52.591167 [ 7666 ] {} <Fatal> BaseDaemon: 11. ? @ 0xda6a99e in /usr/bin/clickhouse
2022.12.30 15:54:52.591191 [ 7666 ] {} <Fatal> BaseDaemon: 12. DB::Server::main(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&) @ 0xda5de90 in /usr/bin/clickhouse
2022.12.30 15:54:52.591219 [ 7666 ] {} <Fatal> BaseDaemon: 13. Poco::Util::Application::run() @ 0x171fa242 in /usr/bin/clickhouse
2022.12.30 15:54:52.591239 [ 7666 ] {} <Fatal> BaseDaemon: 14. DB::Server::run() @ 0xda4873c in /usr/bin/clickhouse
2022.12.30 15:54:52.591257 [ 7666 ] {} <Fatal> BaseDaemon: 15. Poco::Util::ServerApplication::run(int, char**) @ 0x1720e59a in /usr/bin/clickhouse
2022.12.30 15:54:52.591273 [ 7666 ] {} <Fatal> BaseDaemon: 16. mainEntryClickHouseServer(int, char**) @ 0xda451a9 in /usr/bin/clickhouse
2022.12.30 15:54:52.591288 [ 7666 ] {} <Fatal> BaseDaemon: 17. main @ 0x7d705f3 in /usr/bin/clickhouse
2022.12.30 15:54:52.591301 [ 7666 ] {} <Fatal> BaseDaemon: 18. __libc_start_main @ 0x7f999e2a2083 in ?
2022.12.30 15:54:52.591316 [ 7666 ] {} <Fatal> BaseDaemon: 19. _start @ 0x7a70aee in /usr/bin/clickhouse
```
{
    WriteBufferFromFileDescriptor out(TraceSender::pipe.fds_rw[1]);
    writeChar(true, out);
    out.next();
    thread.join();
}
void TraceCollector::run()
{
    setThreadName("TraceCollector");
    ReadBufferFromFileDescriptor in(TraceSender::pipe.fds_rw[0]);
    while (true)
    {
        char is_last;
        readChar(is_last, in);
        if (is_last)
            break;
        std::string query_id;
        UInt8 query_id_size = 0;
        readBinary(query_id_size, in);
        query_id.resize(query_id_size);
        in.readStrict(query_id.data(), query_id_size);
        UInt8 trace_size = 0;
        readIntBinary(trace_size, in);
        Array trace;
        trace.reserve(trace_size);
        for (size_t i = 0; i < trace_size; ++i)