using erlang:trace and pman together

Thomas Arts thomas@REDACTED
Thu Oct 11 17:05:20 CEST 2001


Hi all

Using Erlang version Erlang (THREADS) (BEAM) emulator version 5.0.2.11
I happened to run in a problem when tracing a process and running the
pman application. For those of you that want to try the same on a 
running system: be careful, it may crash your system.


If you start tracing function calls with the following:

  erlang:monitor(process,Pid),
  erlang:trace(Pid,true,[send,call,{tracer,self()}]),
  erlang:trace_pattern({gen_server,loop,'_'},true,[local]),

then it is expected that the process that traces this Pid
only receives trace messages that relate to a message sent 
by Pid or a call to the function gen_server:loop.
That works fine, as long as one doesn't run pman as well.

Starting pman first and then running this tracing results
in a situation in which the tracing process gets all function
calls that the process generates (and that can be quite a lot).
Hence, the system gets slower very quickly and in the end 
crashes with a memory overflow.

Regards
Thomas



More information about the erlang-questions mailing list