v.22.3Improvement

Avoid Division by Zero in Query Profiler for Linux Kernel Bug

Avoid division by zero in Query Profiler if Linux kernel has a bug. Closes #34787. #35032 (Alexey Milovidov).
Prevent division by zero errors in the Query Profiler caused by a kernel bug on Linux systems.

Why it matters

This feature addresses a rare issue where the Linux kernel bug can cause division by zero errors during profiling of queries, which otherwise might crash or disrupt ClickHouse's diagnostics. It ensures stable and reliable query profiling even on affected Linux environments.

How to use it

The fix is applied internally within ClickHouse and requires no additional configuration from users. Simply upgrade to the version containing this fix to benefit from improved stability in query profiling.