otp icon indicating copy to clipboard operation
otp copied to clipboard

Behaviour when tracing send/receive on all processes

Open v0idpwn opened this issue 2 years ago • 3 comments

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:

  1. observer:start().
  2. click in "Trace overview"
  3. click in "Add all"
  4. select send and receive
  5. confirm and start trace
  6. observer crashes (or get dead locked, I didn't debug thoroughly)

dbg:

  1. dbg:tracer().
  2. dbg:p(processes, [s, r]).
  3. 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

v0idpwn avatar Aug 31 '22 18:08 v0idpwn

Regarding dbg, you want to read the section Note of Caution in the dbg documentation.

rickard-green avatar Sep 02 '22 09:09 rickard-green

@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).

v0idpwn avatar Sep 02 '22 16:09 v0idpwn

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.

dgud avatar Sep 28 '22 08:09 dgud