I am currently observing traces of Erlang programs (using the Erlang:trace function), specifically the YAWS web server, although my problem may not be limited to this particular program.
Basically, when I attempt to trace some processes and output these traces, the following errors are displayed:
=ERROR REPORT==== 30-Mar-2014::15:48:25 ===
Failed to open trace "trace.<0.4084.0>.traffic": "I/O error"
=ERROR REPORT==== 30-Mar-2014::15:48:25 ===
Failed to open trace "trace.<0.4085.0>.traffic": "I/O error"
=ERROR REPORT==== 30-Mar-2014::15:48:26 ===
Failed to open trace "trace.<0.4086.0>.traffic": "I/O error"
I would appreciate any insight into why this error is occurring and how it can be solved.
Thanks!
EDIT:
This is the code I am using:
looper()->
receive
P-> io:format(" trace msg: ~p ~n", [P])
end,
looper().
tracer2(Pid)->
erlang:trace(Pid,true,[set_on_spawn, send, 'receive']),
looper().
In the cmd, I first enter: ybed_sup:start_link()
, then enter tracer2(PID)
passing the PID of the process executing the function yaws_server:acceptor
as a parameter.
At first, traces are printed correctly, but then this process dies and new processes with the functon yaws_server:acceptor
are spawned, after which only the error messages show.