hooiv commented on issue #70117:
URL: https://github.com/apache/airflow/issues/70117#issuecomment-5070476938

   I've tracked down the actual root cause of the missing exit status
   
   You were completely right that `dumb-init` couldn't be reaping the process 
while the parent supervisor was still alive. It turns out the culprit was 
**Celery's `billiard` library**. 
   
   Because `CeleryExecutor` runs the supervisor entrypoint directly inside the 
Celery worker process, it inherits `billiard`'s aggressive global `SIGCHLD` 
signal handler. Whenever the Airflow task subprocess finishes, `billiard` 
intercepts the signal and calls `waitpid(-1, WNOHANG)`. This silently eats the 
exit status before the Task SDK's `psutil.wait(timeout=0)` ever gets a chance 
to see it, resulting in a return value of `None`.
   
   I've updated PR #70163 with a fix that simply resets `SIGCHLD` to `SIG_DFL` 
inside `celery_executor_utils.py` right before the supervisor executes. This 
stops `billiard` from interfering and perfectly resolves the hanging supervisors


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