Summary: | sys-process/iotop-0.4 fails on missing /proc/vmstat | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Michael O'Brien <digital.corpus> |
Component: | Current packages | Assignee: | Justin Lecher (RETIRED) <jlec> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kanelxake, vitaliy.osypenko, xmw |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | patch from Debian |
Description
Michael O'Brien
2009-07-30 13:07:58 UTC
It doesn't even start? (In reply to comment #1) > It doesn't even start? > That would be correct Yes, same problem here :( Bl4ckB0x / # iotop Traceback (most recent call last): File "/usr/bin/iotop", line 16, in <module> main() File "/usr/lib64/python2.6/site-packages/iotop/ui.py", line 541, in main main_loop() File "/usr/lib64/python2.6/site-packages/iotop/ui.py", line 531, in <lambda> main_loop = lambda: run_iotop(options) File "/usr/lib64/python2.6/site-packages/iotop/ui.py", line 446, in run_iotop return curses.wrapper(run_iotop_window, options) File "/usr/lib64/python2.6/curses/wrapper.py", line 44, in wrapper return func(stdscr, *args, **kwds) File "/usr/lib64/python2.6/site-packages/iotop/ui.py", line 438, in run_iotop_window process_list = ProcessList(taskstats_connection, options) File "/usr/lib64/python2.6/site-packages/iotop/data.py", line 332, in __init__ self.vmstat = vmstat.VmStat() File "/usr/lib64/python2.6/site-packages/iotop/vmstat.py", line 6, in __init__ self.vmstat = self.read() File "/usr/lib64/python2.6/site-packages/iotop/vmstat.py", line 23, in read return pgpgin, pgpgout UnboundLocalError: local variable 'pgpgin' referenced before assignment Hi, sorry...I seem to have missed this comment. This package works for me and other people that I have asked to confirm this bug. If anyone finds something wrong (with a fix) please let me know. Thanks for understanding. I did hit this bug rarely before, but not since 0.3.2{,-r1} afaik. Have you tried that version? Same error with iotop-0.4 Traceback (most recent call last): File "/usr/bin/iotop", line 16, in <module> main() File "/usr/lib64/python2.6/site-packages/iotop/ui.py", line 547, in main main_loop() File "/usr/lib64/python2.6/site-packages/iotop/ui.py", line 537, in <lambda> main_loop = lambda: run_iotop(options) File "/usr/lib64/python2.6/site-packages/iotop/ui.py", line 452, in run_iotop return curses.wrapper(run_iotop_window, options) File "/usr/lib64/python2.6/curses/wrapper.py", line 44, in wrapper return func(stdscr, *args, **kwds) File "/usr/lib64/python2.6/site-packages/iotop/ui.py", line 444, in run_iotop_window process_list = ProcessList(taskstats_connection, options) File "/usr/lib64/python2.6/site-packages/iotop/data.py", line 335, in __init__ self.vmstat = vmstat.VmStat() File "/usr/lib64/python2.6/site-packages/iotop/vmstat.py", line 6, in __init__ self.vmstat = self.read() File "/usr/lib64/python2.6/site-packages/iotop/vmstat.py", line 23, in read return pgpgin, pgpgout UnboundLocalError: local variable 'pgpgin' referenced before assignment Portage 2.2_rc61 (default/linux/amd64/10.0/desktop, gcc-4.4.2, glibc-2.11-r1, 2.6.31-zen10-bfs x86_64) ================================================================= System uname: Linux-2.6.31-zen10-bfs-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_3800+-with-gentoo-2.0.1 Timestamp of tree: Sat, 16 Jan 2010 01:45:03 +0000 distcc 3.1 x86_64-pc-linux-gnu [disabled] ccache version 2.4 [enabled] app-shells/bash: 4.0_p35 dev-java/java-config: 2.1.10 dev-lang/python: 2.6.4, 3.1.1-r1 dev-util/ccache: 2.4-r8 dev-util/cmake: 2.8.0 sys-apps/baselayout: 2.0.1 sys-apps/openrc: 0.6.0 sys-apps/sandbox: 2.2 sys-devel/autoconf: 2.13, 2.63-r1 sys-devel/automake: 1.6.3-r1, 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1 sys-devel/binutils: 2.20 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6b virtual/os-headers: 2.6.30-r1 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer --param max-gcse-passes=8 -fno-strict-overflow -fno-delete-null-pointer-checks -fno-tree-vrp -mno-align-stringops -minline-stringops-dynamically -mno-push-args -fno-ident" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo" CXXFLAGS="-O2 -march=native -pipe -fomit-frame-pointer --param max-gcse-passes=8 -fno-strict-overflow -fno-delete-null-pointer-checks -fno-tree-vrp -mno-align-stringops -minline-stringops-dynamically -mno-push-args -fno-ident" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps y --keep-going" FEATURES="assume-digests buildpkg ccache distlocks fixpackages metadata-transfer news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch" GENTOO_MIRRORS="ftp://ftp.linux.cz/pub/linux/gentoo" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1" LINGUAS="en cs ru" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp/portage" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage/layman/desktop-effects /usr/local/portage/layman/gnome /usr/local/portage/layman/sunrise /usr/local/portage/layman/Spring /usr/local/portage/layman/zugaina /usr/local/portage/layman/kde-testing /usr/local/portage/layman/rion /usr/local/portage/layman/arcon /usr/local/portage/layman/rostov /usr/local/portage/layman/kde3 /usr/local/portage/layman/mozilla /system/portage-local /usr/portage" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" USE="3dnow 3dnowext 64bit 7zip X a52 aac acl acpi alsa amd64 avi bash-completion bitmap-fonts bluetooth branding bzip2 cairo cddb cdr cli cpudetection cracklib crypt css cups cxx dbus devmap dlloader dri dts dv dvd dvdr dvdread emboss emul-linux-x86 encode evo extensions fam fbcon ffmpeg firefox flac fortran ftp fuse gdbm gif glut gnutls gpm gstreamer gtk gtk2 hal htmlhandbook iconv ieee1394 ipv6 jpeg kde lame libg++ libnotify lm_sensors logitech-mouse mad mikmod mmx mng modules mp3 mp4 mpeg mplayer mudflap multilib musepack musicbrainz ncurses nls nptl nptlonly nvidia ogg opengl openmp oss pam pcre pdf pdflib perl png ppds pppd python qt3 qt3support qt4 quicktime readline reflection sdl session spell spl sse sse-filters sse2 sse3 ssl startup-notification svg symlink sysfs tcpd threads thunar tiff tk truetype truetype-fonts type1-fonts udev unicode usb utf8 vcd vorbis x264 xcomposite xml xorg xscreensaver xulrunner xv xvid zlib" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en cs ru" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia vesa" Unset: CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS Hit the same issue with iotop-0.4. In order to work it needs some kernel counters in /proc/vmstat. Enable CONFIG_VM_EVENT_COUNTERS in kernel configuration. Probably ebuild needs additional CONFIG_CHECK entry. nice find, thanks for the follow-up Created attachment 233611 [details, diff]
patch from Debian
Here is a patch from Debian that detects the lack of CONFIG_VM_EVENT_COUNTERS in the kernel config and fails gracefully instead of crashing. As an added bonus it prevents iotop from whining about requirements that are available.
Hi, can you please test this with iotop-0.4.1 in tree, thank you. It should die with an decent message like gauss linux # iotop Could not run iotop as some of the requirements are not met: - Linux >= 2.6.20 with - VM event counters (CONFIG_VM_EVENT_COUNTERS) Reassigning to new maintainer. should be fixed sufficiently |