From 4fc1a92a8dd5e0c2f126130cfe5410c5eb9d44e8 Mon Sep 17 00:00:00 2001 From: Steffen Maier Date: Wed, 20 Jan 2021 19:03:52 +0100 Subject: [PATCH] zfcpdbf: deal with crash 7.2.9 change in caller name formatting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since crash 7.2.9 commit https://github.com/crash-utility/crash/commit/f1f43bf355df2564543c39f5d7e13b15c67eb13d in support of kernel v5.9 commit 0990d836cecb ("s390/debug: debug feature version 3"), the symbolic caller function name is left aligned instead of right aligned, so now we alternatively have to remove whitespace between function name and offset. Otherwise, zfcpdbf output contains wrong warnings about ambiguous payload records with wrong values for reqid and area, as well as incorrectly decoded trace records with wrong content values and potential error messages on not defined record id, and finally a potential list of occurrences of unknown tags which should empty: Loading trace records ...(this might take a while) Warning: Ambiguous PAYload records. reqid:>>>wrong<<< area:V^D^@fcp_ Warning: Ambiguous PAYload records. reqid:>>>wrong<<< area:W^D^@fsf_ Warning: Ambiguous PAYload records. reqid:>>>wrong<<< area:i^B^@san_ ... Timestamp : ... Area : SAN Subarea : 00 Level : 1 Exception : - CPU ID : 0001 Caller : >>wrong<<< Destination ID : >>>wrong<<< SAN record id=0 not defined. Timestamp : ... Area : SAN Subarea : 00 Level : 1 Exception : - CPU ID : 0002 Caller : >>wrong<<< Destination ID : >>>wrong<<< SAN record id=0 not defined. ... occurrences of unknown tags: ... Signed-off-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Jan Höppner --- scripts/zfcpdbf | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/scripts/zfcpdbf b/scripts/zfcpdbf index bfe2ed78..36de993e 100755 --- a/scripts/zfcpdbf +++ b/scripts/zfcpdbf @@ -227,6 +227,16 @@ sub get_common # function name or hexadecimal caller address. # $line =~ s/<\s+/ ]+)[ \t]+/<\1/; @common = split(/\s+/, $line); # # Process symbolic kernel module name, if necessary. @@ -388,6 +398,17 @@ sub get_foreign_records # caller address. # $line =~ s/<\s+/ ]+)[ \t]+/<\1/; my @raw_rec = split(/\s+/,($line =~ /[|]/) ? substr($line, 0, index($line, '|')): $line);