我正在运行 ejabberd,但它经常崩溃。要弄清楚它崩溃的原因,我知道要查看 erl_crash.dump。问题是,似乎没有任何 erl_crash.dump 文件。虽然有一个核心转储文件。将其加载到 gdb 并运行“bt full”,这是前两帧:
(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
因此,它似乎在尝试编写故障转储时崩溃了,但并没有完全成功。我做了一些研究,这听起来很像之前发布的问题(https://groups.google.com/forum/#!msg/erlang-programming/XH2Uly6hsLY/aeR2Yx2UkZMJ)。Heart 未在命令行上启用,这意味着这不应该是问题,但是......在核心转储中,heart_port 设置为非空值。这应该意味着心脏潜伏在某个地方,不是吗?如果是这样,有没有办法告诉心脏真的不要跑?