runtime: debug output for fatal signal during signal handling. #50952
Labels
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone
#50936 is a crash due to SIGSEGV while in the SIGPROF signal handler. Since our signal handlers have all signals masked, the SIGSEGV is handled via the default termination action by the kernel, exit via signal 11. This results in no output to stderr at all to aid in debugging.
I think we should try to get a bit more debug info out of such crashes.
One approach may be to unmask some signals during signal handling to detect nested signals. Something like:
This approach keeps all signals masked in the sigaction, which limits the risk of infinite signal recursion. The downside being an extra syscall required in the signal handler.
(Edit: What we should do with C signal handlers is unclear. Do we unmask prior to calling a C signal handler? (I'd lean against this)).
cc @aclements @cherrymui @mknyszek
The text was updated successfully, but these errors were encountered: