Preprocessed traces: https://pastila.nl/?0006a09d/f3f1725be8a2ec8787b2d5c8b1eb6532
Report: https://s3.amazonaws.com/clickhouse-test-reports/40506/f2be18b3a644debbb882b8a9e8396b0375461b36/stress_test__undefined_.html
: picked_tracker(nullptr)
    , cancellation_state(QueryCancellationState::NONE)
    , global_mutex(global_mutex_)
    , freed_memory(0)
    , required_memory(0)
    , next_id(0)
    , id_to_release(0)
    , allow_release(true)
{}
OvercommitResult OvercommitTracker::needToStopQuery(MemoryTracker * tracker, Int64 amount)
{
    DENY_ALLOCATIONS_IN_SCOPE;
    if (OvercommitTrackerBlockerInThread::isBlocked())
        return OvercommitResult::NONE;
    
    
    
    
    
    
    std::unique_lock<std::mutex> global_lock(global_mutex);
    std::unique_lock<std::mutex> lk(overcommit_m);
    size_t id = next_id++;
    auto max_wait_time = tracker->getOvercommitWaitingTime();
    if (max_wait_time == ZERO_MICROSEC)
        return OvercommitResult::DISABLED;
    pickQueryToExclude();