Welcome! Log In Create A New Profile

Advanced

Coredump is empty for signal 11

Posted by edo888 
Coredump is empty for signal 11
September 21, 2022 02:06PM
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!
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 79
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready