Andrushika opened a new pull request, #72493: URL: https://github.com/apache/airflow/pull/72493
## Why `execution_timeout` is only enforced by a SIGALRM handler inside the task process. When that process is stuck in native code, deadlocked on a lock inherited across fork, or hit by SIGSEGV, the handler never runs and the task stays running forever (#57174, #57712, #45930, #71707). ## What The task process sends a new `SetExecutionTimeout` message to the supervisor right before it arms its own alarm, so both clocks start at the same point. If the task has not reported a terminal state within 5 seconds after the timeout, the supervisor sends SIGTERM to the process group, and SIGKILL 5 seconds later. This keeps the task runner's SIGALRM handler instead of "moving it", which is a bit different from what #53337 asks for. The reason is that `on_kill`, the retry policy and the failure callbacks can only run inside the task process, and dropping the handler would skip them on every timeout. closes: #53337 related: #57174, #57712, #45930, #71707 --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Fable 5.1) Generated-by: Claude Code (Fable 5.1) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
