v.23.12Improvement

Correct SIGRTMIN Signal Handling for Threads in ClickHouse

Correctly support system.stack_trace for threads with blocked SIGRTMIN (these threads can exist in low-quality external libraries such as Apache rdkafka). #57907 (Azat Khuzhin). Aand also send signal to the threads only if it is not blocked to avoid waiting storage_system_stack_trace_pipe_read_timeout_ms when it does not make any sense. #58136 (Azat Khuzhin).
Improved support for system.stack_trace to handle threads with blocked SIGRTMIN signals, commonly found in external libraries like Apache rdkafka.

Why it matters

This feature addresses issues where threads block the SIGRTMIN signal, which previously caused inaccurate or missing stack traces and unnecessary waiting due to signal handling timeouts. By detecting when SIGRTMIN is blocked and only sending signals to threads where it is not blocked, it enhances reliability and performance when collecting stack traces.

How to use it

No explicit user action is required; the improvements are automatic when querying system.stack_trace. The related timeout storage_system_stack_trace_pipe_read_timeout_ms is respected only when applicable, reducing unnecessary delays.