We have an in-house daemon running on a few RHEL 5 boxes which periodically segfaults. Our developers want a core file to help with debugging but I can't provoke it into producing one.
$ sudo grep segfault /var/log/messages.1 Aug 11 21:04:13 pal108 kernel: brokend: segfault at 00000000000000a8 rip 00000031d020f908 rsp 00007fff9c60f3f0 error 4
The daemon is started using
/etc/init.d/functions, so adding
sysconfig file should set
ulimit accordingly. This seems to be the case, according to
$ sudo grep core /proc/$(cat /var/run/brokend.pid)/limits Max core file size unlimited unlimited bytes
And the core file pattern points to a location that exists:
$ cat /proc/sys/kernel/core_pattern "/tmp/core_%p_%e_%t"
Yet it still won't produce a core file. Any ideas what might could be stopping this? Does a segfault always mean the OS will attempt to produce a core file or does it rely on some application-specific coding to do so?