cuddly-jelly-27016
08/08/2025, 4:21 PM$ cat > x.py
import faulthandler
import signal
faulthandler.register(signal.SIGUSR1)
import asyncio
asyncio.run(asyncio.sleep(100))
^C
$ python x.py &
[1] 68306
$ kill -USR1 68306
Current thread 0x00000001f8b74c80 (most recent call first):
File "/Users/ytong/.local/share/uv/python/cpython-3.13.1-macos-aarch64-none/lib/python3.13/selectors.py", line 548 in select
File % "/Users/ytong/.local/share/uv/python/cpython-3.13.1-macos-aarch64-none/lib/python3.13/asyncio/base_events.py", line 1995 in _run_once
File "/Users/ytong/.local/share/uv/python/cpython-3.13.1-macos-aarch64-none/lib/python3.13/asyncio/base_events.py", line 678 in run_forever
File "/Users/ytong/.local/share/uv/python/cpython-3.13.1-macos-aarch64-none/lib/python3.13/asyncio/base_events.py", line 707 in run_until_complete
File "/Users/ytong/.local/share/uv/python/cpython-3.13.1-macos-aarch64-none/lib/python3.13/asyncio/runners.py", line 118 in run
File "/Users/ytong/.local/share/uv/python/cpython-3.13.1-macos-aarch64-none/lib/python3.13/asyncio/runners.py", line 194 in run
File "/Users/ytong/x.py", line 5 in <module>
### Setup process
### Screenshots
## Check all the applicable boxes
• I updated the documentation accordingly.
• All new and existing tests passed.
• All commits are signed-off.
## Related PRs
## Docs link
https://bito.ai#summarystart|
### Summary by Bito
This pull request enhances signal handling in the Flytekit library by registering the faulthandler for SIGUSR1, enabling stack trace capture for better debugging when tasks hang or are terminated.
flyteorg/flytekitcuddly-jelly-27016
08/21/2025, 8:04 PM