[erlang-bugs] Trace bug?

Robert Virding rvirding@REDACTED
Tue May 27 17:45:12 CEST 2014


We have discovered strange behaviour when tracing message sends. We turn on
tracing message send for a process. In R16 and 17 it seems like there is no
trace message when sending to a registered process name, while sending to a
pid generates a trace message as it should. In R15 however you get a trace
message both sending to a registered name and hen sending to a pid. Is this
a bug or is it a new undocumented feature?

As an example I include simple program in which worker sends a message to a
registered server and the server replies by sending the worker pid. Here
are outputs when running in 17:

Erlang/OTP 17 [erts-6.0] [source-07b8f44] [64-bit] [smp:4:4]
[async-threads:10] [hipe] [kernel-poll:false] [dtrace]

Eshell V6.0  (abort with ^G)
1> c(trace_procs).
{ok,trace_procs}
2> trace_procs:start().
trace_procs 7 Server: '<0.39.0>'
trace_procs 10 Worker: '<0.40.0>'
trace_procs 34 Message: '{trace,<0.39.0>,send,answer,<0.40.0>}'
trace_procs 34 Message: '{trace,<0.39.0>,send,answer,<0.40.0>}'
trace_procs 34 Message: '{trace,<0.39.0>,send,answer,<0.40.0>}'
trace_procs 34 Message: '{trace,<0.39.0>,send,answer,<0.40.0>}'
trace_procs 34 Message: '{trace,<0.39.0>,send,answer,<0.40.0>}'

and in R15:

Erlang R15B03 (erts-5.9.3.1) [source] [64-bit] [smp:4:4] [async-threads:0]
[hipe] [kernel-poll:false]

Eshell V5.9.3.1  (abort with ^G)
1> c(trace_procs).
{ok,trace_procs}
2> trace_procs:start().
trace_procs 7 Server: '<0.38.0>'
trace_procs 10 Worker: '<0.39.0>'
trace_procs 34 Message: '{trace,<0.39.0>,send,{request,<0.39.0>},server}'
trace_procs 34 Message: '{trace,<0.38.0>,send,answer,<0.39.0>}'
trace_procs 34 Message: '{trace,<0.39.0>,send,{request,<0.39.0>},server}'
trace_procs 34 Message: '{trace,<0.38.0>,send,answer,<0.39.0>}'
trace_procs 34 Message: '{trace,<0.39.0>,send,{request,<0.39.0>},server}'
trace_procs 34 Message: '{trace,<0.38.0>,send,answer,<0.39.0>}'
trace_procs 34 Message: '{trace,<0.39.0>,send,{request,<0.39.0>},server}'

What gives?

Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140527/bea1f1c4/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: trace_procs.erl
Type: text/x-erlang
Size: 896 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140527/bea1f1c4/attachment.bin>


More information about the erlang-bugs mailing list