s390-tools dbginfo.sh terminates at step 6 of 8 with rc=2

Bug #1559188 reported by bugproxy
6
This bug affects 1 person
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-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@s8330031:~# echo $?
2

and in LPAR:
root@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@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_devices=[[:space:]]\+/\1/g')

== 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-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@s83lp31:~#

I already attached the trace.log

root@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@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 <email address hidden> - 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 <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.

Revision history for this message
bugproxy (bugproxy) wrote : trace log of dbginfo.sh as requested

Default Comment by Bridge

tags: added: architecture-s39064 bugnameltc-137598 severity-critical targetmilestone-inin1604
Revision history for this message
bugproxy (bugproxy) wrote : s390-tools-dbginfo-network-local-assignment.patch

Default Comment by Bridge

Revision history for this message
bugproxy (bugproxy) wrote : dbginfo.sh

Default Comment by Bridge

Revision history for this message
bugproxy (bugproxy) wrote : dbginfo.sh.1

Default Comment by Bridge

Changed in ubuntu:
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1559188/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
affects: ubuntu → s390-tools (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package s390-tools - 1.34.0-0ubuntu1

---------------
s390-tools (1.34.0-0ubuntu1) xenial; urgency=medium

  [ Dimitri John Ledkov ]
  * New upstream release LP: #1558274. LP: #1559188.

  [ Hendrik Brueckner ]
  * Added missing lsscm command to display Storage-Class Memory,
    aka. Flash Express (Closes: #818381) LP: #1558273
  * Added tools to display information about the CPU-measurement counter
    and sampling facilities. This includes a database with hardware
    counter information. (Closes: #818385) LP: #1558277
  * Added zdsfs and hmc drive FUSE file systems (Closes: #818495) LP: #1558709

 -- Dimitri John Ledkov <email address hidden> Fri, 18 Mar 2016 17:20:08 +0000

Changed in s390-tools (Ubuntu):
status: New → Fix Released
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2016-03-21 12:02 EDT-------
fixed with s390-tools 1.34.0-0ubuntu2. Thanks!

------- Comment From <email address hidden> 2016-03-21 12:03 EDT-------
Closed.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.