core dump

Finding Your Core Dumps

Admit it, you and every other developer hates debugging other developer’s code, especially when it core dumps. Can it get any worse than hearing them say “works for me” when it dumps 100% of the time for you? Regular readers of this blog will know I’ve written about core dumps before. I’ve written about Ubuntu too many times to count. If some other Linux desktop distro would actually test with Nvidia drivers prior to shipping I would most definitely use them.

core dump

Where did my core dump go?

The Nanny State has gotten to be too much to deal with. Ubuntu/Canonical thinks nothing of including software that launches hundreds, possibly thousands of threads which are never or rarely used. God forbid something would want to write to the disk or the screen though! QtCreator had this inexplicable change some time ago, turned off debug output because, who would ever want to see debug output in an IDE? Rather than figure out proper core dump file management, Ubuntu/Canonical simply took it away from users. The Nanny State rides again!

For those who want to cut and paste

sudo nano /etc/security/limits.conf

Change the bottom of the file to have the two lines shown in white. The default for mere mortal users is 0.

Everybody says to log out then back in. I always reboot. Why? So all root processes now have unlimited instead of just the new ones. Never know when what you are running will secretly run a few things as root. After you bounce the box, open a terminal and try the following.

Verify apport is running

Lots of old and incorrect documentation online saying this isn’t supported. Perhaps at some point that was true, just not true today.

Lots of people are online telling you to check this.

If you happen to keep a copy of this handy, it might be of some use.

Avoid all of the misdirection

I cannot tell you now many posts I stumble into telling people to look in /var/crash. The system stuff goes there sometimes, yes. Your application that you wrote and are testing will not land in that paradise.

Where your core dumps go

That’s correct people. Your dumps will be in /var/lib/apport/coredump if you have everything configured correctly. They will not pollute /var/crash.

With Great Limits Comes Great Responsibility

Now that you know where they are, be sure to purge this directory ever so often. Don’t be a stubborn fool trying to run something that keeps crashing with a core dump and not clean this up. Your fantabulous spacious disk will fill up fast.

Those three dump files took up a lot of space!

One thought on “Finding Your Core Dumps

Comments are closed.