wolfier opened a new issue, #47084: URL: https://github.com/apache/airflow/issues/47084
### Description When a SIGUSR2 signal is received, the scheduler prints metadata information regarding the executors. I would like it to also print the call stack. ### Use case/motivation Sometimes the scheduler gets stuck but there is no way of knowing where is the stack it is stuck without root permissions to attach to the running process. This will allow someone to see the call stack like how [LocalTaskJobRunner](https://github.com/apache/airflow/blob/main/airflow/jobs/local_task_job_runner.py#L135-L143) reacts to SIGUSR2 signals. ``` import sys import threading import traceback self.log.info("Stack dump for the scheduler") id2name = {th.ident: th.name for th in threading.enumerate()} for threadId, stack in sys._current_frames().items(): self.log.info(id2name[threadId]) traceback.print_stack(f=stack) self.log.info("-" * 80) ``` ### Related issues _No response_ ### Are you willing to submit a PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md) -- 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]
