The GitHub Actions job "Tests (AMD)" on airflow.git/fix-virtualenv-timeout-orphaned-subprocess has failed. Run started by GitHub user roshanprabu (triggered by potiuk).
Head commit for run: 31378b02ac4db2fea72c7c54f67defefd4197cff / roshanprabu <[email protected]> Fix execution_timeout not interrupting a hung virtualenv subprocess _execute_in_subprocess used `with subprocess.Popen(...) as proc:` and relied on the timeout signal handler's exception propagating out of the block. But Popen's __exit__ only closes the pipes and calls proc.wait() again on the way out -- it does not kill the child. If the child is still running (blocked on something long, like an open network connection inside a @task.virtualenv/@task.external_python callable), that wait() blocks until the child exits on its own, silently absorbing the timeout for however long that takes -- observed as the task instance staying in "running" state indefinitely despite the timeout being logged. Verified this precisely with a standalone repro (SIGALRM firing at 1s, child sleeping 8s): the exception was only actually caught after the full 8s, not the 1s the alarm was set for. Fix: catch any exception around the read/wait, explicitly proc.kill() and proc.wait() to reap it, then re-raise -- so the timeout is honored promptly and the child doesn't linger as an orphan holding resources. Closes: #57712 Report URL: https://github.com/apache/airflow/actions/runs/31305377689 With regards, GitHub Actions via GitBox --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
