Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scripts/stall-analyser: improve error messages on invalid input
and make sure to exit with failure status Currently the program hits an internal error on invalid input like: `Reactor stalled for 4 ms on shard 0. Backtrace:` that has no following backtrace. Instead of emitting an obscure backtrace, like: ``` Traceback (most recent call last): File "/home/bhalevy/dev/seastar/./scripts/stall-analyser.py", line 461, in <module> main() File "/home/bhalevy/dev/seastar/./scripts/stall-analyser.py", line 443, in main render.process_trace(trace, t) File "/home/bhalevy/dev/seastar/./scripts/stall-analyser.py", line 156, in process_trace self.add_head(t, node) File "/home/bhalevy/dev/seastar/./scripts/stall-analyser.py", line 175, in add_head self.head.link_callee(t, n) File "/home/bhalevy/dev/seastar/./scripts/stall-analyser.py", line 104, in link_callee if n.addr in self.callees: ^^^^^^ AttributeError: 'NoneType' object has no attribute 'addr' ``` Print a formal error message that describes how valid input should look like in 2 cases: 1. When no valid input is found 2. When a line with empty backtrace is found. Signed-off-by: Benny Halevy <[email protected]> Closes #2558
- Loading branch information