[erlang-questions] fprof problem in 19.1?

Lukas Larsson lukas@REDACTED
Thu Oct 13 09:28:34 CEST 2016


This seems to be a bug in fprof. There should be a clause handling
the send_to_non_existing_process trace event. The same fault can be
triggered with using this:

4>  fprof:trace([start, {file, "/tmp/ergw.trace"}, verbose, {procs,all}]).
ok
5> Pid = spawn(fun() -> ok end).
<0.69.0>
6> Pid ! hej.
hej
7> fprof:trace([stop]).
ok
8> fprof:profile({file, "/tmp/ergw.trace"}).
Reading trace data...
..........
End of erroneous trace!
{error,
    {incorrect_trace_data,fprof,1714,
        [{trace_ts,<0.60.0>,send_to_non_existing_process,hej,
             <0.69.0>,
             {1476,338902,646909}}]}}

To fix it, this clause:
https://github.com/erlang/otp/blob/maint/lib/tools/src/fprof.erl#L1700
should to be change to allow send_to_non_existing_process.

Feel free to sumbit a PR with the fix, if not I'll do a fix soon (tm).

Lukas




On Tue, Oct 11, 2016 at 7:25 PM, Andreas Schultz <aschultz@REDACTED> wrote:

> Hi,
>
> I'm not sure whether if it's my fault or if something wrong with fprof.
>
> Running a trace on rather busy system (trace file is 250MB), I get this
> error (full output):
>
> Erlang/OTP 19 [erts-8.1] [source] [64-bit] [async-threads:10]
> [kernel-poll:false]
>
> Eshell V8.1  (abort with ^G)
> (ergw-gtp-c-node@REDACTED)1> fprof:trace([start, {file,
> "/tmp/ergw.trace"}, verbose, {procs,all}]).
> ok
> (ergw-gtp-c-node@REDACTED)2> fprof:trace([stop]).
> ok
> (ergw-gtp-c-node@REDACTED)3> fprof:profile({file, "/tmp/ergw.trace"}).
> Reading trace data...
> ..................................................
> .................................................,
> ..................................................
> .................................................,
> ..................................................
> .................................................,
> ..................................................
> .................................................,
> ..................................................
> ......................................
> End of erroneous trace!
> {error,{incorrect_trace_data,fprof,1714,
>                              [{trace_ts,#Port<0.692>,send_
> to_non_existing_process,
>                                         {inet_reply,#Port<0.692>,ok},
>                                         [],
>                                         {1476,206371,694992}}]}}
>
>
> Any idea what's going on here?
>
> Regards
> Andreas
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20161013/09592c22/attachment.htm>


More information about the erlang-questions mailing list