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

Debugging user issues better #4930

Closed
xoriole opened this issue Nov 5, 2019 · 7 comments
Closed

Debugging user issues better #4930

xoriole opened this issue Nov 5, 2019 · 7 comments

Comments

@xoriole
Copy link
Contributor

xoriole commented Nov 5, 2019

Some bugs on Tribler are difficult to fix because they are difficult to reproduce. Knowing the internal state of Tribler during the faulty execution would be immensely useful for debugging such issue.
Some directions discussed at today's meeting for that:

  • Full state recording, extreme logging in Tribler/python. User can then upload the logs along with the error report.
  • Debug option in PyInstaller build

Seems there is a related old ticket #2910

@qstokkink
Copy link
Contributor

We already have the --debug flag. What do you propose to extend this with?

@ichorid
Copy link
Contributor

ichorid commented Nov 5, 2019

The problem is, if you need to turn on the "debugging mode" to capture the complete Tribler state, you'll have to know in advance that Tribler is going to crash. This will only help the most advanced and determined user.

An alternative route is to do it the way all major OSes do it: in case of crash dump the whole process memory state on disk, replacing the previous dump. Then, the reported can have a checkbox to attach the dump. Note, though, that this kind of stuff will invariably leak private user info... Even if we try to filter the dump for things like, e.g. private key, before sending.

@xoriole
Copy link
Contributor Author

xoriole commented Nov 5, 2019

@qstokkink Yes, we already have the flag but it may not be sufficient to reproduce the issues. Besides, we don't get the user logs in the error report. So, I think we should extend the error reporter to add a choice (disabled by default) whether to upload the logs along with the report.
@ichorid crash dump and attaching to the error report is a good idea and I'm in favor of it. Regarding privacy, it is a user consent to attach the files. Also, we could try some basic anonymisation on data.

@qstokkink
Copy link
Contributor

Two notes on crash dumps:

  • They are big (our server is already filling up) and can take in the order of minutes to properly capture.
  • Someone has to plow through them to find out what was wrong (which might be OS specific).

Regarding logging:

  • Three years ago I performed a clean performance experiment on Dispersy throughput. By stripping out all logging I gained 400 MB/s in download speed. Be careful with overzealous logging, especially in Python - which is basically single thread execution.

@qstokkink
Copy link
Contributor

Note: I'm not saying to not improve the process, just don't repeat our past mistakes.

@ichorid
Copy link
Contributor

ichorid commented Jun 11, 2020

relate to the plan #5348

@ichorid
Copy link
Contributor

ichorid commented Oct 12, 2021

Mostly fixed by using Sentry

@ichorid ichorid closed this as completed Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants