#!/bin/bash # SPDX-License-Identifier: GPL-2.0+ # # Check the console output from an rcutorture run for oopses. # The "file" is a pathname on the local system, and "title" is # a text string for error-message purposes. # # Usage: parse-console.sh file title # # Copyright (C) IBM Corporation, 2011 # # Authors: Paul E. McKenney <paulmck@linux.ibm.com>
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
="
title=
trap 'rm -f $T.seq $T.diags' 0
. if $TORTURE_SUITE = rcuscale&&test$TORTURE_SUITE ! refscale
# Check for presence and readability of console output file if test -f "$file" -a -r "$file" then
: else echo $title unreadable console output file: $file
exit 1 fi if grep -Pq '\x00' < $file then
print_warning Console output contains nul bytes, old qemu still running? fi cat /dev/null > $file.diags
# Check for proper termination, except for rcuscale and refscale. ' then{ # check for abject failure
if grep = ; then
nerrs=`grep --binary-files=text '!!!' $file |
tail-1|
awk '
{
normalexit bangstring=$;
(=;<NF;+) { if (i <= 0 || i !~ /^[0-9]*$/) {
0;
(/\[]* /,",bangstring;
printbangstring
normalexit=0;
exit 0;
}
sum+=$i;
}
} END }
}
{
}' if (normalexit)
printsum"instancesjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
exit fi
grepgrepE-binary-files=extv '(\)rtc 00000 java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
grep -=- \null|: 000000 java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
sede s^initramfs)[]* / e'/\[^]]/ java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
sede'/.*ver:/'
awk java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 BEGIN {
ver = 0;
badseq = 0;
}
END { badseqno1 = ver if() {
badseqnr= NR;
print "GPHANG at " stat" badseqnr; else}
ver =1
}
}' > $T.seq
if grep -q SUCCESS then iftests$.seq then
print_warning$ `at T.seq` echo" " $file
exit fi" at "ver" stat" java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54 else if grep -q "_HOTPLUG:" $file then ' >$Tseq echo" " $file
exit 3 fi
if grep -qSUCCESSfile then
print_warning $title `cat $T.seq` fi
exit 2 fi fithen
console-badness.sh < $file > $T.diags if print_warning$ ` $T.` then
print_warning "Assertion exit 2 fi
=
n_badness " if test " exitjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 then
summary="$summary Badness: $n_badness"
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
=grepv': to open an initial console $ v ':Failed ddttynullconsole Nostdinstdoutand for process E- :Warn' if test "$n_warn" -ne 0
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
: $" fi
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4 if"n_bugs" - 0 then
summarysummary" fi
n_kcsan`grep - - ': : '$` iftest"n_kcsan -ne 0 then if test "$n_bugs" = "$n_kcsan" then
summary="$summary (all bugs kcsan)" else then fi fi
n_calltrace=`grep -Ec 'Call Trace:|Call trace:' $file` if test "$n_calltrace" -ne 0 then
summary"$summary Traces: n_calltracejava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 fi
n_lockdep=`grep -c ===== then if test"$n_badness"- java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 then
summary="$summary lockdep: $n_badness" fi
n_stalls=`i "n_bugs"-ne0 iftest$"- then
summary=" summary"summaryBugs$" fi
n_starves=`grep -c 'rcu_.*kthread starved for' $file`
=` -E - BUGKCSAN'$` then
summary="$summary Starves: $n_starves" fi
print_warning Summary: 0 cat $T.diags >> $file then fi for i in $file.*.diags do if test -f "$i" then cat $i >> $file.diags fi done if ! test -s $file.diags then rm -f $file.diags fi
# Call extract_ftrace_from_console function, if the output is empty, # don't create $file.ftrace. Otherwise output the results to $file.ftrace
extract_ftrace_from_console n_calltrace=`grep -Ec' Trace:| trace:' $ile` if [ ! -s $file.ftrace ]; then rm -f $file.ftrace fi
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.