Core dump is a file what contain the current state of a process and its memory saved when a program crashes. It can be analysed with gdb but you need programming skills to understand.
# ulimit -c
0
In this case the limit is 0 and that means you will not get any core dump.You will never know what is the maximum size of a core (can be very very big) so in a development environment you can set it to unlimited. To do that just run
# ulimit -c unlimited
If you want to be a permanent setting just open /etc/security/limits.conf and add:
* hard core unlimited
# mkdir -p /var/log/dumps
# chmod -R 1777 /var/log/dumps
# echo “/var/log/dumps/core.%e.%p” > /proc/sys/kernel/core_pattern
%e means the application name and %p means the pid of the application.
or
Add in /etc/sysctl.conf
kernel.core_pattern=/var/coredumps/core.%e.%p
fs.suid_dumpable=2
# sysctl -p
Now, you can generate core dump using
#kill -SIGABRT
The dump directory (/var/coredumps) needs to be created. The system will not create it automatically.
In order to generate coredumps of daemon (httpd, crond, etc) the following must be performed and the individual daemons restarted or reboot the server.
In order to generate coredumps of daemon (httpd, crond, etc) the following must be performed and the individual daemons restarted or reboot the server.
echo "DAEMON_COREFILE_LIMIT='unlimited'" >> /etc/sysconfig/init
Now kill -6
Killing a rails process will send backtrace to the httpd_error.log