Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 92187 - sysstat 5.0.5-r1's iostat strange behaviour
Summary: sysstat 5.0.5-r1's iostat strange behaviour
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Tim Yamin (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-10 12:52 UTC by barthek
Modified: 2005-05-24 06:21 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description barthek 2005-05-10 12:52:40 UTC
i have this strange problem with iostat, and am puzzled as what to do with it :\
when 'iostat  1' is being run one would expect to see one report every 1 second, right ? in my case it doesnt work this way.
not only doesnt it show values, but it quits almost immediately:

doli@1g ~ $ iostat 1
Linux 2.6.11-gentoo-r8 (1g)     05/10/05

avg-cpu:  %user   %nice    %sys %iowait   %idle
          23.43   20.40   26.24    9.69   20.24

Device:    rrqm/s wrqm/s   r/s   w/s  rsec/s  wsec/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %util


the strange thing is that if i run it through strace or gdb it works just fine:
doli@1g ~ $ strace -o /dev/null iostat 1
Linux 2.6.11-gentoo-r8 (1g)     05/10/05

avg-cpu:  %user   %nice    %sys %iowait   %idle
          23.40   20.04   25.98    9.62   20.95

Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
hda              19.77       148.34       227.81     523906     804576
hdc              13.37       181.20       284.62     639936    1005184
...


doli@1g ~ $ gdb `which iostat`
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...(no debugging symbols found)
Using host libthread_db library "/lib/tls/libthread_db.so.1".

(gdb) run 1
Starting program: /usr/bin/iostat 1
(no debugging symbols found)
Linux 2.6.11-gentoo-r8 (1g)     05/10/05

avg-cpu:  %user   %nice    %sys %iowait   %idle
          23.36   19.92   25.91    9.60   21.22

Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
hda              19.68       148.97       226.55     529386     805080
hdc              13.35       180.37       284.42     640976    1010728



why is this happening? my emerge info:
Portage 2.0.51.21-r1 (default-linux/x86/2005.0, gcc-3.4.3-20050110, glibc-2.3.5-r0, 2.6.11-gentoo-r8 i686)
=================================================================
System uname: 2.6.11-gentoo-r8 i686 Pentium III (Katmai)
Gentoo Base System version 1.6.11
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.5-r1
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r8
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.6.11
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-s -pipe -march=pentium3 -O3 -fomit-frame-pointer -fstack-protector"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-s -pipe -march=pentium3 -O3 -fomit-frame-pointer -fstack-protector"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig collision-protect distcc distlocks sandbox sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="http://gentoo.mirror.solnet.ch http://trumpetti.atm.tut.fi/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.se.gentoo.org/gentoo-portage"
USE="x86 X alsa berkdb bitmap-fonts caps chroot crypt emboss gpm hardened jpeg minimal mmx mp3 ncurses nptl ogg pam pam_chroot pam_timestamp perl png pthreads python readline sftplogging sse ssl symlink tcpd threads type1-fonts vorbis zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 1 Tim Yamin (RETIRED) gentoo-dev 2005-05-14 11:38:50 UTC
Looks like an upstream bug - please file one with the author upstream. Also you might want to try an older version of sysstat and try without -O3 and -s.
Comment 2 barthek 2005-05-16 05:14:52 UTC
fortunately it started to work find with -O2 instead of -O3. weird i havent thought about it before ? the funny thing is that it worked with O3 on 2.4 kernel
and on 2.6 it wouldnt. 

could you please elaborate a little about why it would work while ptraced (strace/gdb) and wouldnt without it ?
Comment 3 barthek 2005-05-16 06:08:51 UTC
argh i was too quick about reporting.
take a look at this and try to exlain :)


doli@1g ~ $ strace -o /dev/null iostat -x 1 1
Linux 2.6.11-gentoo-r8 (1g)     05/16/05

avg-cpu:  %user   %nice    %sys %iowait   %idle
          16.18   72.58   10.03    0.56    0.64

Device:    rrqm/s wrqm/s   r/s   w/s  rsec/s  wsec/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %util
hda          0.60   3.53  2.95  3.09   39.49   52.98    19.75    26.49    15.31     1.14  188.27   8.91   5.38
hdc          0.24  18.18  6.80  5.73  268.38  191.32   134.19    95.66    36.69     0.50   39.52   5.05   6.32

doli@1g ~ $ iostat -x 1 1 
Linux 2.6.11-gentoo-r8 (1g)     05/16/05

avg-cpu:  %user   %nice    %sys %iowait   %idle
          16.18   72.58   10.03    0.56    0.64

Device:    rrqm/s wrqm/s   r/s   w/s  rsec/s  wsec/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %util

doli@1g ~ $ su -
Password: 
1g ~ # iostat -x 1 1
Linux 2.6.11-gentoo-r8 (1g)     05/16/05

avg-cpu:  %user   %nice    %sys %iowait   %idle
          16.18   72.58   10.03    0.56    0.64

Device:    rrqm/s wrqm/s   r/s   w/s  rsec/s  wsec/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %util
hda          0.60   3.53  2.95  3.09   39.50   52.98    19.75    26.49    15.31     1.14  188.27   8.91   5.38
hdc          0.24  18.18  6.80  5.73  268.43  191.32   134.21    95.66    36.69     0.50   39.52   5.05   6.32

1g ~ # 
Comment 4 barthek 2005-05-21 12:47:17 UTC
any thoughts on this?
Comment 5 Tim Yamin (RETIRED) gentoo-dev 2005-05-24 06:21:50 UTC
Nope, this looks like an upstream bug. However, I recommend you try compiling it
with no CFLAGS (including no stack smashing protection) and see if that solves
the issue. If it does, reopen this bug and then we know it's a possible
toolchain issue.