[erlang-questions] how to get stacktraces of all processes?

Attila Rajmund Nohl <>
Fri Sep 17 11:29:46 CEST 2010


2010/9/17, mabrek <>:
> Hello.
>
> I've got application that hangs on startup.
> I tried several alternatives. Appmon doesn't show unstarted applications.
> Pman shows only start function and current function for process, but I want
> full stacktraces. i() is similar to pman. erlang:process_display gives quite
> obscure output, process_info(.., [backtrace]) is the same.
> Is there a way to get full stacktraces of all processes in VM?

I don't know any way, but the stacktrace might not be that useful
because tail recursive calls are missing from the trace.

If I were you, I'd first check for processes which have non-empty
message queues (that process probably got stuck somewhere and doesn't
get to process the message) or which have high number and quickly
increasing reductions (this indicates an infinite loop). Then I'd
check the current function of the suspicious process and try to find
out what happened. You can get this information from the process_info.

You might also turn on tracing early on in the application startup
using dbg, if you have an idea where things go wrong.


More information about the erlang-questions mailing list