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

[analyze] Show details about analyser crashes in the command-line log, not just the failed ZIP #4110

Open
whisperity opened this issue Dec 4, 2023 · 0 comments
Labels
analyzer 📈 Related to the analyze commands (analysis driver) enhancement 🌟

Comments

@whisperity
Copy link
Member

whisperity commented Dec 4, 2023

Currently, it can be non-trivial to gather why an analysis failed or crashed, especially if no outputs are provided because the --quiet flag is present in the invocation. CodeChecker may only print something as useless as follows:

Analyzing blablabla.cpp with perkele failed!

The analyze command should either:

  • explicitly WARN the user if --quiet is added to the invocation that analysis failures will not be reasoned about
  • or (and this is what I would prefer) either the first time (or every time?) an analysis failed, the same message should be printed

It should be ensured (and tested) that even in the case of --quiet, the stdout and stderr are captured and added to the failed ZIP. Only the command-line output should be quieted.

Failed analyses should also mention somewhere (either directly or at the bottom of the output) that the "failed ZIPs" exist and their location. Currently, it is not a widely-known fact.


In addition, we should be making some educated guesses about the analysis failure irrespective of the --quiet command. The return value of the analyser binary should be present in the log output. Currently, this can only be gathered following a successful opening of the failed ZIP (which means that if the failed ZIPs are not retained, e.g., in a CI system, this is no longer possible!) and its embedded file like returncode.txt.

Analyzing blablabla.cpp with perkele failed! (return code: 42)

In case we can identify that the return code corresponds to a well-defined signal (such as -11 or 139 for SIGSEGV) we could also explicitly show this:

Analyzing blablabla.cpp with perkele failed! (Return code: 139, SIGSEGV - Segmentation fault.)
@whisperity whisperity added enhancement 🌟 analyzer 📈 Related to the analyze commands (analysis driver) labels Dec 4, 2023
@whisperity whisperity added this to the release 6.24.0 milestone Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer 📈 Related to the analyze commands (analysis driver) enhancement 🌟
Projects
None yet
Development

No branches or pull requests

2 participants