-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Print task backtraces on sigquit #59389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
You can alloca one, but note that it must be small, as there isn't much stack space. A few thousand elements is probably fine though, and possibly even too many. |
|
@vtjnash the one thing on that test is that race condition on the sleep. Any idea on how to make that properly reliable, without risking a zombie process? |
abf8b1d to
70e204b
Compare
Co-authored-by: Jameson Nash <[email protected]>
Co-authored-by: Jameson Nash <[email protected]>
|
Looks like this has picked up some merge conflicts :( |
(cherry picked from commit 0635285)
(cherry picked from commit 0635285)
(cherry picked from commit 0635285)
(cherry picked from commit 0635285)
| else | ||
| jl_safe_fprintf(s, "\n[%d] signal %d: %s\n", getpid(), sig, strsignal(sig)); | ||
| if (sig == SIGQUIT) { | ||
| jl_print_task_backtraces(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I must gripe that having this now conditionally smashing bt_data just 5 lines before we need to use it for useful fatal backtraces is very annoying
There is a question here, printing task backtraces (or backtraces on exit regardless) requires a ct, but only because it needs a buffer. Can we alloca that buffer (malloc is probably illegal given signal context)