**Describe what's wrong**
Query in clickhouse-client may fail with options `--send_logs_level=trace --server_logs_file=-` (`--server_logs_file=-` means write server logs to stdout).

**How to reproduce**

```
while true; do clickhouse-client -q "select 1" --send_logs_level=trace --server_logs_file=- >log; done
Code: 75. DB::ErrnoException: Cannot write to file (fd = 1), errno: 14, strerror: Bad address: (in query: select 1). (CANNOT_WRITE_TO_FILE_DESCRIPTOR)

Code: 75. DB::ErrnoException: Cannot write to file (fd = 1), errno: 14, strerror: Bad address: (in query: select 1). (CANNOT_WRITE_TO_FILE_DESCRIPTOR)

Code: 75. DB::ErrnoException: Cannot write to file (fd = 1), errno: 14, strerror: Bad address: (in query: select 1). (CANNOT_WRITE_TO_FILE_DESCRIPTOR)
```

Some queries will fail periodically.


dst_column_host_name.getDataAt(dst_row),
        };
        if (auto it = rows_by_name.find(id); it != rows_by_name.end())
        {
            size_t src_row = it->second;
            if (thread_id_filter_mask.contains(src_row))
            {
                conue;
            }
            dst_array_current_time[dst_row] = src_array_current_time[src_row];
            switch (dst_array_type[dst_row])
            {
                case ProfileEvents::Type::INCREMENT:
                    dst_array_value[dst_row] += src_array_value[src_row];
                    break;
                case ProfileEvents::Type::GAUGE:
                    dst_array_value[dst_row] = src_array_value[src_row];
                    break;
            }
            rows_by_name.erase(it);
        }
    }
    /// Copy rows from src that dst does not contains.
    for (const auto & [id, pos] : rows_by_name)
    {
        if (thread_id_filter_mask.contains(pos))
        {
            conue;
        }
        for (size_t col = 0; col < src.columns(); ++col)