Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Behaviour when tracing send/receive on all processes #6265

Open
v0idpwn opened this issue Aug 31, 2022 · 3 comments
Open

Behaviour when tracing send/receive on all processes #6265

v0idpwn opened this issue Aug 31, 2022 · 3 comments
Assignees
Labels
bug Issue is reported as a bug help wanted Issue not worked on by OTP; help wanted from the community team:PS Assigned to OTP team PS team:VM Assigned to OTP team VM

Comments

@v0idpwn
Copy link

v0idpwn commented Aug 31, 2022

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 v0idpwn added the bug Issue is reported as a bug label Aug 31, 2022
@rickard-green
Copy link
Contributor

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

@rickard-green rickard-green added team:VM Assigned to OTP team VM team:PS Assigned to OTP team PS labels Sep 2, 2022
@v0idpwn
Copy link
Author

v0idpwn commented Sep 2, 2022

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

@dgud dgud added the help wanted Issue not worked on by OTP; help wanted from the community label Sep 28, 2022
@dgud
Copy link
Contributor

dgud commented Sep 28, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is reported as a bug help wanted Issue not worked on by OTP; help wanted from the community team:PS Assigned to OTP team PS team:VM Assigned to OTP team VM
Projects
None yet
Development

No branches or pull requests

3 participants