Stuff Goes Bad:Erlang In Anger

Chapter 6 Reading Crash Dumps

读懂 Crash Dumps

Whenever an Erlang node crashes, it will generate a crash dump 1.
 The format is mostly documented in Erlang’s official documentation 2, and anyone willing to dig deeper inside of it will likely be able to figure out what data means by looking at that documentation. There will be specific data that is hard to understand without also understanding the part of the VM they refer to, but that might be too complex for this document.
 The crash dump is going to be named erl_crash.dump and be located wherever the Erlang process was running by default. This behaviour (and the file name) can be overridden by specifying the ERL_CRASH_DUMP environment variable 3.

不管Erlang节点何时崩溃,都会生成一个crash dump1文件。


[1] If it isn’t killed by the OS for violating ulimits while dumping or didn’t segfault.
[3] Heroku’s Routing and Telemetry teams use the heroku_crashdumps app to set the path and name of the crash dumps. It can be added to a project to name the dumps by boot time and put them in a pre-set location

[1] 如果它不是被OS在dumping时暴力终结或段错误(didn't segfault).
[3] Heroku和Telemetry团队就是使用heroku_crashdumps 来设置这个路径和名称的环境变量。这个可以在项目启动时把他们预先设置好。