I am developing a high traffic network C server application that runs as a daemon. Under some circumstances, the app crashes (always without core). How I can debug the running daemon with gdb to find the place that generates the SIGSEGV?
Explanatory notes:
I know how to attach using gdb to a running process using attach command
After attaching to the process, it stops. If I run then "continue", gdb remains blocked if the program does not crash. If I press CTRL-C, the process is exiting and I am unable to simply detach gdb.
So the question is: is there a way to continue the process without the gdb being stuck but being able to detach if the process does not crash?
ulimit
command? And/or running a debug version? Or possibly adding more logging to narrow down the possible locations for the crash? – Lowgrade