crashdump(3)
π crashdump β a whole module, bestie π
okay so before we even get into it: this is crashdump(3), from the Erlang tools application, version 4.2.2, lovingly brought to you by Ericsson AB. it's an Erlang module definition, and it's literally a tool for handling Erlang crash dumps. yes, THAT kind of crash dump. the dramatic kind. π«Ά
β¨ NAME β¨
crashdump β A Tool for Handling Erlang Crash Dumps π
πΈ DESCRIPTION πΈ
so here's the vibe: this module is where you go when your Erlang crash dumps are all locked up and mysterious, and you need to get the goods out of them. π
this module contains functions for decrypting encrypted Erlang crash dumps β and ngl, that encrypted-crash-dump life only exists if you built Erlang with the --enable-encrypted-crash-dumps build flag. no flag, no encrypted dumps, no decryption needed. iykyk. π
π¦ FUNCTIONS π¦
decrypt(EncryptedFile, PrivateKey) -> {ok, erlang:iovec()} | {error, Reason}
decrypt(EncryptedFile, PrivateKey) ->
{ok, erlang:iovec()} | {error, Reason}
when
EncryptedFile :: file:name(),
PrivateKey :: public_key:private_key(),
Reason :: dynamic().
this one decrypts the Erlang crash dump at EncryptedFile using PrivateKey. that's it, that's the whole function. hand it the encrypted file, hand it the private key, get back either {ok, erlang:iovec()} or an {error, Reason}. simple. clean. iconic. β¨
decrypt(EncryptedFile, PrivateKey, DecryptedFile) -> ok | {error, Reason}
decrypt(EncryptedFile, PrivateKey, DecryptedFile) ->
ok | {error, Reason}
when
EncryptedFile :: file:name(),
PrivateKey :: public_key:private_key(),
DecryptedFile :: file:name(),
Reason :: dynamic().
same energy as before, but this time it decrypts the Erlang crash dump at EncryptedFile using PrivateKey and writes the result out to DecryptedFile so you have an actual file to look at instead of a big ol' blob in memory. returns ok, or {error, Reason} if life said no. π
pem_decrypt(EncryptedFile, KeyFile) -> {ok, erlang:iovec()} | {error, Reason}
pem_decrypt(EncryptedFile, KeyFile) ->
{ok, erlang:iovec()} | {error, Reason}
when
EncryptedFile :: file:name(),
KeyFile :: file:name(),
Reason :: dynamic().
bestie this is a convenience wrapper around crashdump:decrypt/2 β it does the whole "get the key out of this PEM file for you" thing so you don't have to. π§ you pass the encrypted file, you pass the KeyFile, and it handles key extraction from that given PEM file. returns {ok, erlang:iovec()} or {error, Reason}.
pem_decrypt(EncryptedFile, KeyFile, DecryptedFile) -> ok | {error, Reason}
pem_decrypt(EncryptedFile, KeyFile, DecryptedFile) ->
ok | {error, Reason}
when
EncryptedFile :: file:name(),
KeyFile :: file:name(),
DecryptedFile :: file:name(),
Reason :: dynamic().
and THIS one is a convenience wrapper around crashdump:decrypt/3 β again, it handles key extraction from the given PEM file, but it also writes the decrypted crash dump out to DecryptedFile for you. returns ok or {error, Reason}. the way that it just handles the PEM key extraction so you don't have to?? obsessed. ππ
π quick recap so you don't get them mixed up: four functions, two families.decrypt/2gives you the data back,decrypt/3writes it to a file.pem_decrypt/2gives you the data back but pulls the key out of a PEM file for you,pem_decrypt/3writes it to a file and also pulls the key out of a PEM file for you.decrypt= you already have apublic_key:private_key().pem_decrypt= you have a PEM file and you'd like someone else to deal with it. periodt. π
and that's the whole page, no cap. signing off with love from Ericsson AB, this is tools version 4.2.2, page crashdump(3). take care of your crash dumps bestie, they've been through a lot π«Άπβ¨
π¦ where this page comes from
- ubuntu stonking: erlang-doc 1:29.0.6+dfsg-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms