If you have any issues with programs segfaulting, it can be useful to allow coredumps in order to see what happened.
You first have to allow coredumps
* – core 100000
@users – core 0
core is measured in kbytes, and core files can be fairly large (the simple script below generates a 350kb file). Do not set this to unlimited for regular users!
echo 1 > /proc/sys/kernel/core_uses_pid
echo “/tmp/core/dump” > /proc/sys/kernel/core_pattern
ulimit -c 100000
To test it let’s create a script that will cause a coredump.
kill -s $$
chmod +x core_dump.sh
To view the corefile, you need gdb.
apt-get install gdb
gdb -c dump.13594