Question

I'm running ejabberd, and every so often it crashes. To figure out why it crashed, I know to look in the erl_crash.dump. The problem is, there doesn't seem to be any erl_crash.dump file. There is a core dump file though. Loading it into gdb and running "bt full," here are the top two frames:

(gdb) bt full
#0  0x000000000054df83 in prepare_crash_dump (secs=<optimized out>) at sys/unix/sys.c:735
    max = <optimized out>
    env = "\005", '\000' <repeats 15 times>"\200, \373!ڴ"
    heart_port = 0x7fb46f31eab0
    hp = 0x7fb4d6efb938
    heart_fd = {865035, -1}
    has_heart = 0
    i = <optimized out>
    envsz = <optimized out>
    heap = {4460060, 140412855877120, 1}
    list = 18446744073709551611
#1  erts_sys_prepare_crash_dump (secs=<optimized out>) at sys/unix/sys.c:780

So, it appears that it crashed while it was trying to write the crash dump, but didn't get all the way. I did some research, and it sounds a lot like a problem that had been posted earlier (https://groups.google.com/forum/#!msg/erlang-programming/XH2Uly6hsLY/aeR2Yx2UkZMJ). Heart was not enabled on the command line, which means this shouldn't be the problem, but... in the core dump, heart_port is set to something non-null. This should mean that heart is lurking somewhere, shouldn't it? If so, is there a way to tell heart to really not run?

Was it helpful?

Solution

This is the erlang VM crashing, not an erlang process crashing, so there is no erl_crash.dump generated. From my experience, I suspect it did not core in prepare_crash_dump, but that you have the wrong binaries loading into gdb. If you are not debugging on the system that crashed, you should copy the erlang binaries down and point GDB to them.

OTHER TIPS

In erts 8.0 you have: Make sure to create a crash dump when running out of memory. This was accidentally removed in the erts-7.3 release.

So in case your VM is affected by this bug and it's crashing for this reason it won't generate.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top