Print async stack trace in signal handler
Summary: If there is an active async operation on the current thread, then the signal handler will also print the async stack trace as well. Note that an async stack trace can have a mix of both non-async and async frames. This is an example of what an async stack trace might print: ``` funcF <- non async, top of stack funcE <- non async co_funcD <- async funcC <- non async, blocking call. Second async stack root here co_funcB <- async co_funcA <- async main <- non async. First async stack root here ``` If there is no async operation in progress, there is no change in behavior (only normal stack trace is printed). This also adds a helper `getAsyncStackTraceStr()` to easily dump the async stack trace on demand. This helper is NOT async-signal-safe and is only meant for debugging purposes. Reviewed By: yfeldblum, andriigrynenko Differential Revision: D26661006 fbshipit-source-id: f6e913910eb45c438a3e1e29d231e224eed15ef2
Showing
Please register or sign in to comment