Getting coredump for daos application.
If your system is not configured to get core dumps, you are looking at the correct article (which may help you !!)
To enable core dumps for all daemon, please follow these steps:
Edit the /etc/profile and add this line:
ulimit -c unlimited >/dev/null 2>&1Make sure the following line is present under /etc/init.d/functions
ulimit -S -c ${DAEMON_COREFILE_LIMIT:-0} >/dev/null 2>&1File /etc/sysconfig/init (or) /etc/sysconfig/$daemon should have following line:
DAEMON_COREFILE_LIMIT='unlimited'Optionally, enable core dump for SUID programs:
echo 1 > /proc/sys/fs/suid_dumpableEdit the /etc/sysctl.conf and add the following:
fs.suid_dumpable = 1
kernel.core_uses_pid = 1Where to dump the file.
sysctl -w kernel.core_pattern=<core_file location>
[eg: sysctl -w kernel.core_pattern=/tmp/core.%u.%e.%p ]
- core dump file location should be writable.
Finally, perform sysctl -p to reload the settings.
Now consider your ftest program fails with segfaults ./launch.py <avocado tag : eg: iorsmall>,.
After you perform the above setup and run ftest program, you should see a core dump file under /tmp/core* location.
Thanks Ravi. In “where to dump the file” why set core_pattern twice?