Where does ubuntu 14.04 drop core files?

Solution 1:

I think this is a more Linux kernel thing than a specific Ubuntu thing. Check out

cat /proc/sys/kernel/core_pattern

Check out the core file man page

Solution 2:

By default, the Ubuntu kernel is configured to use apport to log coredumps. You can override this by overwriting /proc/sys/kernel/core_pattern, check the "Naming of core dump files" section in man core for details. For example:

echo '/tmp/core.%e.%p.%t' | sudo tee /proc/sys/kernel/core_pattern

Apport writes core dumps to /var/crash/_path_to_program.userid.crash, BUT it will only do so for applications installed from the main ubuntu apt repositories.

More info on apport: https://wiki.ubuntu.com/Apport

Solution 3:

On Ubuntu 16.04.3 LTS, my core dump was located at:

/var/lib/systemd/coredump/core.application-name.0.24d47e89526c4c7e90953998d2c33d1e.19672.1516049424000000000000

So, to run it in gdb, you can run:

apt install gdb gdb /path/to/your/binary/application-name /var/lib/systemd/coredump/core.application-name.0.24d47e89526c4c7e90953998d2c33d1e.19672.1516049424000000000000