[Bug 1559188] [NEW] s390-tools dbginfo.sh terminates at step 6 of 8 with rc=2

Launchpad Bug Tracker 1559188 at bugs.launchpad.net
Fri Mar 18 17:28:27 UTC 2016


You have been subscribed to a public bug:

== Comment: #0 - Thorsten Diehl <thorsten.diehl at de.ibm.com> - 2016-02-20 12:37:42 ==
both under z/VM:

dbginfo.sh: Debug information script version 1.33.0-build-20160209
Copyright IBM Corp. 2002, 2015

Hardware platform     = s390x
Kernel version        = 4.4.0 (4.4.0-6-generic)
Runtime environment   = z/VM

1 of 8: Collecting command output
 
2 of 8: Collecting z/VM command output
 
3 of 8: Collecting procfs
 
4 of 8: Collecting sysfs
 
5 of 8: Collecting log files
 
6 of 8: Collecting config files
 
root at s8330031:~# echo $?
2

and in LPAR:
root at s83lp31:~# dbginfo.sh 
dbginfo.sh: Debug information script version 1.33.0-build-20160209
Copyright IBM Corp. 2002, 2015

Hardware platform     = s390x
Kernel version        = 4.4.0 (4.4.0-6-generic)
Runtime environment   = LPAR

1 of 8: Collecting command output
 
2 of 8: Collecting z/VM command output skipped - no z/VM environment
 
3 of 8: Collecting procfs
 
4 of 8: Collecting sysfs
 
5 of 8: Collecting log files
 
6 of 8: Collecting config files
 
root at s83lp31:~# echo $?
2


Most likely this is caused by the implementaion of sh (symlinked to dash)

root at s8330031:~# ll /bin/sh
lrwxrwxrwx 1 root root 4 Feb 17 21:25 /bin/sh -> dash*
root at s8330031:~# rm /bin/sh
root at s8330031:~# ln -s /bin/bash /bin/sh
root at s8330031:~# ll /bin/sh
lrwxrwxrwx 1 root root 9 Feb 20 18:11 /bin/sh -> /bin/bash*

after I symlinked sh to bash, it worked.

@IBM, looks like we need some adjustments in dbginfo.sh to make it posix compliant and compliant to Ubuntu's dash.
For me it looks like the problem is in this line here:
    local network_devices=[[:space:]]\+/\1/g')

== Comment: #1 - Hendrik Brueckner <brueckner at de.ibm.com> - 2016-02-22 02:52:20 ==
Hi Thorsten,

could enable  shell tracing for the dbginfo.sh.  That means, add an "set
-x" in the beginning of the script.  Also please use the /bin/dash for
reproduction.  Please attach the generated trace output (2>trace.log).

Thanks.

== Comment: #2 - Thorsten Diehl <thorsten.diehl at de.ibm.com> - 2016-02-22
11:39:08 ==


== Comment: #3 - Thorsten Diehl <thorsten.diehl at de.ibm.com> - 2016-02-22 11:39:47 ==
Problem occurs only, if there is more than one network interface!!

root at s83lp31:~# dbginfo.sh 2>trace.log
dbginfo.sh: Debug information script version 1.33.0-build-20160209
Copyright IBM Corp. 2002, 2015

Hardware platform     = s390x
Kernel version        = 4.4.0 (4.4.0-6-generic)
Runtime environment   = LPAR

1 of 8: Collecting command output
 
2 of 8: Collecting z/VM command output skipped - no z/VM environment
 
3 of 8: Collecting procfs
 
4 of 8: Collecting sysfs
 
5 of 8: Collecting log files
 
6 of 8: Collecting config files
 
root at s83lp31:~# 

I already attached the trace.log

root at s83lp31:~# cat /tmp/DBGINFO-2016-02-22-16-55-19-s83lp31-21EC87/osa_oat
cat: /tmp/DBGINFO-2016-02-22-16-55-19-s83lp31-21EC87/osa_oat: No such file or directory
root at s83lp31:~# dash
# network_devices=[[:space:]]\+/\1/g')
# echo $network_devices 
hsccw0.0.8300 enccw0.0.e300 enccw0.0.f500
# which qethqoat
# 
and here I expected the dbginfo.sh to jump to line 683:
pr_syslog_stdout "7 of ${COLLECTION_COUNT}: Collecting osa oat output skipped - not available"

which obviously does not happen...

I'll dig into that and continue analysing.

== Comment: #4 - Thorsten Diehl <thorsten.diehl at de.ibm.com> - 2016-02-22 11:41:37 ==
I propose the following patch:

--- /usr/sbin/dbginfo.sh.orig  2016-02-09 13:02:15.000000000 +0100
+++ /usr/sbin/dbginfo.sh	2016-02-22 17:35:40.410507235 +0100
@@ -666,7 +666,8 @@
 
 ########################################
 collect_osaoat() {
-    local network_devices=[[:space:]]\+/\1/g')
+    local network_devices
+    network_devices=[[:space:]]\+/\1/g')
     local network_device
 
     if which qethqoat >/dev/null 2>&1; then

== Comment: #12 - Sa Liu <SALIU at de.ibm.com> - 2016-03-01 04:18:27 ==


== Comment: #16 - Sa Liu <SALIU at de.ibm.com> - 2016-03-01 06:37:04 ==


== Comment: #19 - Sa Liu <SALIU at de.ibm.com> - 2016-03-14 06:42:38 ==
dbginfo man page

== Comment: #23 - Heinz-Werner Seeck <heinz-werner_seeck at de.ibm.com> - 2016-03-18 04:00:47 ==
Will be fixed with s390tools-1.34.0.

** Affects: s390-tools (Ubuntu)
     Importance: Undecided
     Assignee: Skipper Bug Screeners (skipper-screen-team)
         Status: New


** Tags: architecture-s39064 bot-comment bugnameltc-137598 severity-critical targetmilestone-inin1604
-- 
s390-tools dbginfo.sh terminates at step 6 of 8 with rc=2
https://bugs.launchpad.net/bugs/1559188
You received this bug notification because you are a member of Ubuntu Foundations Bugs, which is subscribed to s390-tools in Ubuntu.



More information about the foundations-bugs mailing list