Skip to content

Instantly share code, notes, and snippets.

View studzien's full-sized avatar

Rafał Studnicki studzien

  • Whatnot Inc.
  • Kraków, Poland
View GitHub Profile
@studzien
studzien / beam.md
Created September 9, 2015 11:38
An example analysis of a BEAM process core dump

This post shows an example of a BEAM process' core dump analysis to backtrack what was the root cause of its crash.

Start gdb by pointing out the BEAM executable that generated the core dump and the core dump file. Optionally, you can provide a directory with the VM's source code:

gdb erts-6.3/bin/beam.smp -core core.14747 -d /home/azureuser/otp_src_17.4/erts/emulator

gdb should tell you what caused the crash and where in code this happened:

\lstdefinestyle{erlang}{
belowcaptionskip=1\baselineskip,
breaklines=true,
frame=L,
xleftmargin=\parindent,
language=C,
showstringspaces=false,
showlines=true,
basicstyle=\footnotesize\ttfamily,
keywordstyle=\bfseries\color{green!40!black},