otp
otp copied to clipboard
Behaviour when tracing send/receive on all processes
Describe the bug These might be two different bugs, but I'm opening this on the hypothesis they have the same cause:
- Observer crashes when you try to trace send/receive on all processes.
- dbg it gets into an infinite loop of traces because it traces its own activities.
Naturally, they consume a lot of resources once the trace is started.
To Reproduce Observer:
-
observer:start().
- click in "Trace overview"
- click in "Add all"
- select
send
andreceive
- confirm and start trace
- observer crashes (or get dead locked, I didn't debug thoroughly)
dbg:
-
dbg:tracer().
-
dbg:p(processes, [s, r]).
- default dbg handler prints on screen, which triggers N traces, which trigger N prints on screen, which triggers N^2 traces
Expected behavior
- Tracing send/receive on all processes doesn't create issues, even if it means, in practice, ignoring part of the traces so that a loop isn't created
- If the above isn't possible or desirable, observer should not allow you to select these options that cause the crash for "All".
dbg
should warn in the documentation about the problem
Affected versions I tested on 25.0.4
Regarding dbg
, you want to read the section Note of Caution in the dbg
documentation.
@rickard-green the deadlock scenario mentioned there refers to a similar problem in terms of root cause, but as the symptoms and the way to reproduce are significantly different, I think the issue's scenario deserves a mention as well (if it can't be fixed, of course).
This seems to be documented in dbg. Please help with a PR that updates the observer docs and/or a dialog that warns the user warning . But it is hard to find all places where a user can shoot himself in the foot.