Core dump

to nginx.conf is enough. Then run gdb to obtain backtrace as usual, e.g.

gdb/path/to/nginx /path/to/cores/nginx.core
backtrace full

If your gdb backtrace warns that No symbol table info available. then you will need to recompile Nginx with the appropriate compiler flags for debugging symbols.

The exact flags required depend on the compiler used. If you use GCC, the flag -g enables the inclusion of debugging symbols. Additionally disabling compiler optimization using -O0 will make the debugger output easier to understand.

CFLAGS="-g -O0" ./configure ....

Socket leaks

Sometimes socket leaks happen. This usually results in "[alert] 15248#0: open socket #123 left in connection 456" messages in error log on nginx reload/restart/shutdown. To debug add