https://rethinkdb.com/blog/handling-stack-overflow-on-custom-stacks/

https://barrgroup.com/embedded-systems/how-to/prevent-detect-stack-overflow 

etc.
if (!TasksStatsCounters::checkIfAvailable())
    {
        LOG_INFO(log, "It looks like this system does not have procfs mounted at /proc location,"
            " neither clickhouse-server process has CAP_NET_ADMIN capability."
            " 'taskstats' performance statistics will be disabled."
            " It could happen due to incorrect ClickHouse package installation."
            " You can try to resolve the problem manually with 'sudo setcap cap_net_admin=+ep {}'."
            " Note that it will not work on 'nosuid' mounted filesystems."
            " It also doesn't work if you run clickhouse-server inside network namespace as it happens in some containers.",
            executable_path);
    }
    if (!hasLinuxCapability(CAP_SYS_NICE))
    {
        LOG_INFO(log, "It looks like the process has no CAP_SYS_NICE capability, the setting 'os_thread_priority' will have no effect."
            " It could happen due to incorrect ClickHouse package installation."
            " You could resolve the problem manually with 'sudo setcap cap_sys_nice=+ep {}'."
            " Note that it will not work on 'nosuid' mounted filesystems.",
            executable_path);
    }
#else
    LOG_INFO(log, "TaskStats is not implemented for this OS. IO accounting will be disabled.");
#endif
    std::vector<ProtocolServerAdapter> servers;
    {
        
        AsynchronousMetrics async_metrics(*global_context,
            config().getUInt("asynchronous_metrics_update_period_s", 60));
        attachSystemTablesAsync(*DatabaseCatalog::instance().getSystemDatabase(), async_metrics);
        for (const auto & listen_host : listen_hosts)
        {