https://s3.amazonaws.com/clickhouse-test-reports/0/8ea7b9c9784f7014dccb4fe0dfd269265126a30d/stress_test__msan_.html

Post-processed traces: https://pastila.nl/?0006a09d/4a3864799d8b23c3998deeefcdca5d8f
Post-processed traces without boring threads: https://pastila.nl/?0006a09d/f342d95a823d513df62d68a5d8a1a50b

Explanation: https://pastila.nl/?000fcc82/3a48f372d3410a8691d50cb5647b2c20
const auto replace_running_query_max_wait_ms = settings.replace_running_query_max_wait_ms.totalMilliseconds();
                    if (!replace_running_query_max_wait_ms || !have_space.wait_for(lock, std::chrono::milliseconds(replace_running_query_max_wait_ms),
                        [&]
                        {
                            running_query = user_process_list->second.queries.find(client_info.current_query_id);
                            if (running_query == user_process_list->second.queries.end())
                                return true;
                            running_query->second->is_killed.store(true, std::memory_order_relaxed);
                            return false;
                        }))
                    {
                        throw Exception("Query with id = " + client_info.current_query_id + " is already running and can't be stopped",
                            ErrorCodes::QUERY_WITH_SAME_ID_IS_ALREADY_RUNNING);
                    }
                 }
            }
        }
        
        for (const auto & user_process_list : user_to_queries)
        {
            if (user_process_list.first == client_info.current_user)
                continue;
            if (auto running_query = user_process_list.second.queries.find(client_info.current_query_id); running_query != user_process_list.second.queries.end())
                throw Exception("Query with id = " + client_info.current_query_id + " is already running by user " + user_process_list.first,
                    ErrorCodes::QUERY_WITH_SAME_ID_IS_ALREADY_RUNNING);
        }
        auto user_process_list_it = user_to_queries.find(client_info.current_user);
        if (user_process_list_it == user_to_queries.end())
            user_process_list_it = user_to_queries.emplace(client_info.current_user, this).first;
        ProcessListForUser & user_process_list = user_process_list_it->second;