Hi,
Very rarely I have "worker process NNN exited on signal 11 (core not dumped)" in the error log.
I'm trying to generate a coredump, but no matter what I do it is not being generated or the size is 0 bytes.
I'm running FreeBSD and the first thing I have tried to do is enable nginx to dump core files, but no matter how big I set worker_rlimit_core the dumps are not generated. I have checked the source code and I see the following:
/usr/include/sys/signal.h:
#define SIGSEGV 11 /* segmentation violation */
/usr/include/sys/wait.h:
#define WCOREFLAG 0200
#define _W_INT(i) (i)
#define WCOREDUMP(x) (_W_INT(x) & WCOREFLAG)
nginx/src/os/unix/ngx_process.c:
ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, 0, "%s %P exited on signal %d%s", process, pid, WTERMSIG(status), WCOREDUMP(status) ? " (core dumped)" : " (core not dumped)");
This means that WCOREDUMP(11) is 0 and coredump will not be produced. So not sure what should I do.
I have also tried to enable coredumps through OS and I have set sysctl kern.sugid_coredump=1 and sysctl kern.corefile=/home/coredump/%N.core.%P and ulimit is set to unlimited. After that I see that coredump files have 0 size.
Can you suggest how to enable coredumps for signal 11?
Thanks!