manticoresearch icon indicating copy to clipboard operation
manticoresearch copied to clipboard

UX Improvement: Client Oriented Crash Handler

Open AbstractiveNord opened this issue 1 year ago • 4 comments

Is your feature request related to a problem? Please describe. Currently ManticoreSearch provide developer oriented log on crashes. This is bunch of deep technical information which doesn't contain straightforward instruction for usual users. Usually, that data can't help user a lot.

Describe the solution you'd like Improve crash handler by writing debugging data into specialized files and write simple instruction for user, like

Crash metadata: some data Send this message to Github Issue Crash Template Upload crash.zip to our write-only S3 via link

Of course, in case of Kubernetes production deployment, there may be required some type of bypass or something. May not.

Describe alternatives you've considered Continue boilerplate chain

  1. user with problem asks for help in telegram chat or forum
  2. then discussion goes to Github Issue page
  3. user manually collect and upload related files

Additional context Is it possible to catch:

  • Tables schemas, used in query, that caused crash? In case of data locked by user, data may be generated with fuzzer-like tools.
  • query log if user allows it?

AbstractiveNord avatar Nov 08 '23 08:11 AbstractiveNord

doesn't contain straightforward instruction for usual users

It actually does, each crash is supposed to have this:

Please, create a bug report in our bug tracker (https://github.com/manticoresoftware/manticore/issues)
and attach there:
a) searchd log, b) searchd binary, c) searchd symbols.
Look into the chapter 'Reporting bugs' in the manual
(https://manual.manticoresearch.com/Reporting_bugs)

Didn't yours have this? Maybe this block isn't visible enough?

sanikolaev avatar Nov 09 '23 07:11 sanikolaev

doesn't contain straightforward instruction for usual users

It actually does, each crash is supposed to have this:

Please, create a bug report in our bug tracker (https://github.com/manticoresoftware/manticore/issues)
and attach there:
a) searchd log, b) searchd binary, c) searchd symbols.
Look into the chapter 'Reporting bugs' in the manual
(https://manual.manticoresearch.com/Reporting_bugs)

Didn't yours have this? Maybe this block isn't visible enough?

Yes, this block is easy to miss for newbies. Usually this block is significant smaller than stacktrace. Also, this instruction isn't so simple, as it may be. For example, if new user just playing with ManticoreSearch, there no list of simple, machine-like actions to do.

User should know, where to look for log, binary, should know what is symbols. By the way, user should have some knowledge for gdb, very small thanks for documentation link provided, but still. Even if user knows about it, that is manual job, which may be automated even with simple bash script. Is it possible to make instruction block bigger, collect interested files, pack it into archive and make simple, clear statements for user: ManticoreSearch is crashed, data about crash is collected and saved there, please, upload it via that URL.

AbstractiveNord avatar Nov 09 '23 14:11 AbstractiveNord

Here's what we can do:

  • Implement and distribute a script named manticore_crash_reporter:
  • The script is to be written in PHP since manticore-executor is usually available.
  • It analyzes the searchd log to check if there's a crash at all
  • The script tries to install gdb if it's not already installed and enables coredumps if they are not enabled. Same about debug symbols.
  • It uploads the user's config, searchd log, and query log to Manticore's S3 storage.
  • The script asks the user to confirm each step.
  • Finally, the script generates a pre-filled issue (e.g., https://github.com/manticoresoftware/manticoresearch/issues/new?title=abc&body=abc) and prompts the user to submit it.
  • Enhance visibility in the Searchd log that users can use this script to report issues.

sanikolaev avatar Nov 13 '23 10:11 sanikolaev

If someone wants to contribute by making a PR with the script, the core team will be glad to assist.

sanikolaev avatar Nov 13 '23 10:11 sanikolaev