donate-cpu.py: improved error detection#1766
Conversation
…s well and (ab)use elapsedTime to make the errorcode visible in the output / also detect ThreadExecutor issues
| if returncode != 0: | ||
| print('Error!') | ||
| return returncode, '', '', returncode, options | ||
| if stderr.find('Internal error: Child process crashed with signal ') > 0: |
There was a problem hiding this comment.
Those greps require an English language environment?
There was a problem hiding this comment.
It#s the same string, that was already used in the crash detection and is written exactly like this by cppcheck, so there should be locale issues.
That is interesting. We had issues with fork() under Cygwin and disabled fork() for Cygwin. Do you remember where these issues occurred? Was it Cygwin or Linux? I haven't looked in detail at the changes but from what you write that all makes sense to me. |
It was under WSL. But the package which I forgot was fine with head, but had the thread issue with 1.87. I ran lots of other didn't see this at all. |
|
Please do not merge this yet. I need to investigate those thread errors a bit more as I know see more of them. |
|
That was stupid... |
|
I am done with this now. |
|
There are packages that do not contain useful files for Cppcheck and the "temp" directory is simply empty (at least under Cygwin). It is not really a bug or so, but i first thought something really went wrong while Cppcheck simply returns with 1 if there is nothing to analyze. |
This was explicitly detected as a |
|
I already did some changes for this, but need a few more examples to be sure of the changes as well as the stale report :-) |
Currently only signal 11 (aka
SIGSEGVaka Segmentation fault) is being handled as a crash. This adds handling for all signals and exitcodes which are not 0 as well as ThreadExecutor errors.I have seen reproducible ThreadExecutor errors with
fork()failing forphp5and another package I cannot remember. I haven't look into these, but these are obviously causing incomplete results.Other signal should also be handled like signal 11 and produce stack trace. The most obvious would be
SIGABRT. As the actual signal will be reflected in the negativeelapsedTimevalue we can add this handling step by step.