From a80c14d72c6d92de0eca5d9412b3d0bb989b97cc Mon Sep 17 00:00:00 2001 From: Joern Siglen Date: Wed, 3 Nov 2021 10:05:00 +0100 Subject: [PATCH] dbginfo.sh: addtional timeout and omitting a report MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit running mpio data disks with offline paths might cause dbginfo to hang up on the command "blockdev --report" -> we remove it to ensure a non blocking data collection. In addition we add a second kill step with the same timeout value to retry stopping a command Signed-off-by: Joern Siglen Reviewed-by: Mario Held Signed-off-by: Jan Höppner --- CHANGELOG.md | 3 +++ scripts/dbginfo.sh | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a63c420..56c4ce77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ Release history for s390-tools (MIT version) Bug Fixes: + Changes of existing tools: + - dbginfo.sh: retry for timeout and remove possible blocking "blockdev --report" + * __v2.18.0 (2021-10-01)__ For Linux kernel version: 5.14 diff --git a/scripts/dbginfo.sh b/scripts/dbginfo.sh index d93e9b6b..81a06954 100755 --- a/scripts/dbginfo.sh +++ b/scripts/dbginfo.sh @@ -55,7 +55,7 @@ readonly ZDEV_CONF=$(lszdev --configured 2>/dev/null | wc -l) readonly ZDEV_OFF=$(lszdev --offline 2>/dev/null | wc -l) readonly ZDEV_ONL=$(lszdev --online 2>/dev/null | wc -l) -paramWORKDIR_BASE="/tmp/" # initial default path +paramWORKDIR_BASE="/tmp" # initial default path ######################################## # print dbginfo.sh version info @@ -412,7 +412,6 @@ CMDS="uname -a\ :timedatectl\ :runlevel\ :ulimit -a\ - :blockdev --report\ :env\ :df -h\ :df -i\ @@ -1071,7 +1070,7 @@ call_run_command() { # check if calling command and timeout exist if which "${raw_cmd}" >/dev/null 2>&1 && which timeout >/dev/null 2>&1; then - eval timeout ${TOS} "${cmd}" >> ${logfile} 2>&1 + eval timeout -k ${TOS} ${TOS} "${cmd}" >> ${logfile} 2>&1 rc=$? # check if command is a builtin (no use of timeout possible) elif command -v "${raw_cmd}" >/dev/null 2>&1; then