On Ubuntu 15.10 I can not find the core files dumped by my program. ulimit is set to unlimited. After uninstalling the apport service, the /proc/sys/kernel/core_pattern file only contains core which should just create a file called core in the same directory of my failing executable. Unfortunately that's not the case.

share|improve this question
up vote 3 down vote accepted

the solution was to set ulimit -c unlimited

Here is my full solution that puts all the core files in /tmp/cores with an explicit name for those files:

sudo apt-get remove apport
ulimit -u unlimited
sudo bash -c 'echo "* hard core unlimited" >> /etc/security/limits.conf'
sudo bash -c 'echo "* soft core unlimited" >> /etc/security/limits.conf'
sudo bash -c 'echo "kernel.core_pattern=/tmp/cores/core.%e.%p.%h.%t" >> /etc/sysctl.conf'
sudo sysctl -p /etc/sysctl.conf

Then you need to logout or reboot to make it all work.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.