A memory debugging tool like Valgrind is well suited to this, though it's a fair amount of work to get this up and running. You might just run it through gdb and see where you are when it crashes.
OK, so my server box is running Debian stable. I went in today to do the standard apt-get update, upgrade. The update went fine, but after the upgrade downloaded all the files, it dies with a ...
Results that may be inaccessible to you are currently showing.
Hide inaccessible results