qwe-kev opened a new pull request, #59657:
URL: https://github.com/apache/airflow/pull/59657

   closes: #53337
   related: #57174
   
   This PR implements proper execution timeout handling for Airflow 3.0 by 
moving timeout enforcement from the task process to the supervisor process.
   
   Previously, execution_timeout was handled inside the task process using a 
timeout decorator. This approach failed when:
   - Task process encountered SIGSEGV or other signals (#57174)
   - Native code ran in tight loops without handling Python signals
   - Process was killed before timeout could be enforced
   
   ## Changes
   - Added TaskExecutionTimeout message for worker-to-supervisor communication
   - Supervisor monitors execution time and enforces timeout with 
SIGTERM/SIGKILL
   - Removed in-process timeout decorator from task execution
   - Timeout measurement starts after DAG parsing (excludes startup overhead)
   
   ## Implementation
   1. Worker sends timeout_seconds to supervisor after DAG parsing
   2. Supervisor tracks elapsed time using monotonic clock
   3. On timeout: sends SIGTERM, then SIGKILL after 5-second grace period
   
   This ensures reliable timeout enforcement at the supervisor level, 
preventing runaway tasks even when the task process encounters errors.
   


-- 
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]

Reply via email to