773-sigill-introspection

https://github.com/benoitc/gunicorn/issues/773

This feature is intended to help analyse the state of gunicorn processes in a given point of time. This can come handy when dealing with performance issues.

A new signal handler for SIGILL would be introduced which triggers the status dump. When the signal is received workers dump their current requests with stack traces to the /tmp dir. If the signal is sent to the master it will broadcast it to its workers.
may be use the current thread and take the stack trace from this thread. iterate over sys._current_frames() and you can get the list of threads with threading.enumerate().