https://s3.amazonaws.com/clickhouse-test-reports/43987/3725cf4aa7a9aa022b11d08b2f8e4f7f0dd70283/stress_test__ubsan_/gdb.log
#else
    
    if (!hasPHDRCache())
        throw Exception("QueryProfiler cannot be used without PHDR cache, that is not available for TSan build", ErrorCodes::NOT_IMPLEMENTED);
    
    if (period < 1000000)
        period = 1000000;
    struct sigaction sa{};
    sa.sa_sigaction = ProfilerImpl::signalHandler;
    sa.sa_flags = SA_SIGINFO | SA_RESTART;
    if (sigemptyset(&sa.sa_mask))
        throwFromErrno("Failed to clean signal mask for query profiler", ErrorCodes::CANNOT_MANIPULATE_SIGSET);
    if (sigaddset(&sa.sa_mask, pause_signal))
        throwFromErrno("Failed to add signal to mask for query profiler", ErrorCodes::CANNOT_MANIPULATE_SIGSET);
    if (sigaction(pause_signal, &sa, nullptr))
        throwFromErrno("Failed to setup signal handler for query profiler", ErrorCodes::CANNOT_SET_SIGNAL_HANDLER);
    try
    {
        struct sigevent sev {};
        sev.sigev_notify = SIGEV_THREAD_ID;
        sev.sigev_signo = pause_signal;
#if defined(OS_FREEBSD)
        sev._sigev_un._threadid = static_cast<pid_t>(thread_id);
#elif defined(USE_MUSL)
        sev.sigev_notify_thread_id = static_cast<pid_t>(thread_id);
#else
        sev._sigev_un._tid = static_cast<pid_t>(thread_id);
#endif
        timer_t local_timer_id;
        if (timer_create(clock_type, &sev, &local_timer_id))