Logging Signals sent to processes
Is there a way of tracking what signals are sent to a process? Something fishy is happening with one of the programs im running:
Program X somehow gets a SIGSEGV. It has signal handler that should (in theory) catch the signal and start dumping the stack trace. I have verified that it works when i manually send it SIGSEFV (via kill -SEGV)
However, somewhere down the line while serving traffic, the process dies without a single line of trace in its log. Somehow in the log of the parent process, i see a process terminated segmentation fault. But why the process dies without a stack trace is beyond me.
What i would like to know is, is there a way of tracking signals being sent to processes. For example, if the kernel could somehow log all uses of the signal / raise system call, i could know that it sent SIGKILL to my process (which caused X to die before printing stack trace), or that it didn't and the problem lies elsewhere.