s390-tools dbginfo.sh terminates at step 6 of 8 with rc=2
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
s390-tools (Ubuntu) |
Fix Released
|
Undecided
|
Skipper Bug Screeners |
Bug Description
== Comment: #0 - Thorsten Diehl <email address hidden> - 2016-02-20 12:37:42 ==
both under z/VM:
dbginfo.sh: Debug information script version 1.33.0-
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@s8330031:~# echo $?
2
and in LPAR:
root@s83lp31:~# dbginfo.sh
dbginfo.sh: Debug information script version 1.33.0-
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@s83lp31:~# echo $?
2
Most likely this is caused by the implementaion of sh (symlinked to dash)
root@s8330031:~# ll /bin/sh
lrwxrwxrwx 1 root root 4 Feb 17 21:25 /bin/sh -> dash*
root@s8330031:~# rm /bin/sh
root@s8330031:~# ln -s /bin/bash /bin/sh
root@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_
== Comment: #1 - Hendrik Brueckner <email address hidden> - 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 <email address hidden> - 2016-02-22 11:39:08 ==
== Comment: #3 - Thorsten Diehl <email address hidden> - 2016-02-22 11:39:47 ==
Problem occurs only, if there is more than one network interface!!
root@s83lp31:~# dbginfo.sh 2>trace.log
dbginfo.sh: Debug information script version 1.33.0-
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@s83lp31:~#
I already attached the trace.log
root@s83lp31:~# cat /tmp/DBGINFO-
cat: /tmp/DBGINFO-
root@s83lp31:~# dash
# network_
# 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_
which obviously does not happen...
I'll dig into that and continue analysing.
== Comment: #4 - Thorsten Diehl <email address hidden> - 2016-02-22 11:41:37 ==
I propose the following patch:
--- /usr/sbin/
+++ /usr/sbin/
@@ -666,7 +666,8 @@
######
collect_osaoat() {
- local network_
+ local network_devices
+ network_
local network_device
if which qethqoat >/dev/null 2>&1; then
== Comment: #12 - Sa Liu <email address hidden> - 2016-03-01 04:18:27 ==
== Comment: #16 - Sa Liu <email address hidden> - 2016-03-01 06:37:04 ==
== Comment: #19 - Sa Liu <email address hidden> - 2016-03-14 06:42:38 ==
dbginfo man page
== Comment: #23 - Heinz-Werner Seeck <email address hidden> - 2016-03-18 04:00:47 ==
Will be fixed with s390tools-1.34.0.
affects: | ubuntu → s390-tools (Ubuntu) |
Default Comment by Bridge