Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 113292 - pstree (from psmisc-21.8) segfaults
Summary: pstree (from psmisc-21.8) segfaults
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-22 14:53 UTC by f5d8fd51ed1e804c9e8d0357e8614e0493b06e96
Modified: 2006-04-20 14:00 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 f5d8fd51ed1e804c9e8d0357e8614e0493b06e96 2005-11-22 14:53:43 UTC
using psmisc-21.8: "pstree -a" results in a segfault
using psmisc-21.6: "pstree -a" runs just fine

magratea psmisc # pstree  -a
init
  ├─agetty 38400 tty1 linux
  ├─agetty 38400 tty2 linux
  ├─agetty 38400 tty3 linux
  ├─agetty 38400 tty4 linux
  ├─agetty 38400 tty5 linux
  ├─agetty 38400 tty6 linux
  ├─cupsd
  ├─dcopserver
  ├─dhcpcd -h magratea eth0
  ├─(events/0)
  ├─gconfd-2 15
  ├─kaccess
  ├─kded
Segmentation fault

magratea psmisc # strace pstree  -a
execve("/usr/bin/pstree", ["pstree", "-a"], [/* 47 vars */]) = 0
...
...
...
write(1, "init  \n", 7init
)                 = 7
write(1, "  \342\224\234\342\224\200agetty 38400 tty1 linux\n", 32  ├─agetty
38400 tty1 linux
) = 32
write(1, "  \342\224\234\342\224\200agetty 38400 tty2 linux\n", 32  ├─agetty
38400 tty2 linux
) = 32
write(1, "  \342\224\234\342\224\200agetty 38400 tty3 linux\n", 32  ├─agetty
38400 tty3 linux
) = 32
write(1, "  \342\224\234\342\224\200agetty 38400 tty4 linux\n", 32  ├─agetty
38400 tty4 linux
) = 32
write(1, "  \342\224\234\342\224\200agetty 38400 tty5 linux\n", 32  ├─agetty
38400 tty5 linux
) = 32
write(1, "  \342\224\234\342\224\200agetty 38400 tty6 linux\n", 32  ├─agetty
38400 tty6 linux
) = 32
write(1, "  \342\224\234\342\224\200automount --timeout 60 -"..., 98 
├─automount --timeout 60 --pid-file /var/run/autofs.neofonie.pid /neofonie yp
auto.neofonie
) = 98
write(1, "  \342\224\234\342\224\200automount --timeout 60 -"..., 96 
├─automount --timeout 60 --pid-file /var/run/autofs.infonie.pid /infonie yp
auto.neofonie
) = 96
write(1, "  \342\224\234\342\224\200automount --submount --t"..., 71 
├─automount --submount --timeout=60 /neofonie/home yp auto.home
) = 71
write(1, "  \342\224\234\342\224\200automount --submount --t"..., 70 
├─automount --submount --timeout=60 /infonie/home yp auto.home
) = 70
write(1, "  \342\224\234\342\224\200cupsd\n", 14  ├─cupsd
) = 14
write(1, "  \342\224\234\342\224\200dcopserver\n", 19  ├─dcopserver
) = 19
write(1, "  \342\224\234\342\224\200dhcpcd -h magratea eth0\n", 32  ├─dhcpcd -h
magratea eth0
) = 32
write(1, "  \342\224\234\342\224\200(events/0)\n", 19  ├─(events/0)
) = 19
write(1, "  \342\224\234\342\224\200gconfd-2 15\n", 20  ├─gconfd-2 15
) = 20
write(1, "  \342\224\234\342\224\200kaccess\n", 16  ├─kaccess
) = 16
write(1, "  \342\224\234\342\224\200kded  \n", 15  ├─kded
) = 15
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

a normal "pstree" runs just fine and results in:
magratea psmisc # pstree
init─┬─6*[agetty]
     ├─4*[automount]
     ├─cupsd
     ├─dcopserver
     ├─dhcpcd
     ├─events/0
     ├─gconfd-2
     ├─kaccess
     ├─kded───{kded}
     ├─kdeinit─┬─artsd
     │         ├─kio_file
     │         ├─klauncher
     │         ├─konsole─┬─6*[bash───ssh]


Reproducible: Always
Steps to Reproduce:
1.
2.
3.




magratea psmisc # emerge info
Portage 2.0.53_rc7 (default-linux/x86/2005.0, gcc-3.3.6, glibc-2.3.5-r3,
2.6.13-gentoo-r5 i686)
=================================================================
System uname: 2.6.13-gentoo-r5 i686 AMD Athlon(tm) XP 3000+
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.4-r1, 2.4.2
sys-apps/sandbox:    1.2.13
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20-r1
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ ftp://ftp.heanet.ie/pub/gentoo/
ftp://ftp.citkit.ru/pub/Linux/gentoo"
LANG="de_DE.utf8"
LC_ALL="de_DE.utf8"
LINGUAS="de"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowext X acpi alsa apache2 apm arts audiofile avi
bash-completion berkdb bitmap-fonts bmp browserplugin bzip2 cairo cjk cli
cpudetection crypt cups curl dba dbus dlloader doc dri eds emboss encode expat
fam fbcon fbdev firefox flac foomaticdb fortran freetype gd gdbm gif gpm
gstreamer gtk gtk2 hal idn imagemagick imlib ipv6 java javascript jpeg junit kde
lcms ldap libg++ libwww mad mhash mikmod mmx mmxext mng motif mozilla mp3 mpeg
mysql ncurses nis nls nptl nptlonly nsplugins nvidia ogg oggvorbis opengl oss
pam pcre pdflib pear perl php png ppds python qt quicktime readline real sdl
slang spell sqlite sse ssl svg svga tcpd tidy tiff truetype truetype-fonts type1
type1-fonts udev unicode usb vorbis win32codecs xine xml2 xmms xprint
xscreensavers xsl xslt xv zeroconf zlib linguas_de userland_GNU kernel_linux
elibc_glibc"
Unset:  ASFLAGS, CTARGET, LDFLAGS, PORTDIR_OVERLAY
Comment 1 SpanKY gentoo-dev 2005-11-23 02:23:43 UTC
try running it through gdb as rebuilding it with CFLAGS=-g and FEATURES=nostrip
Comment 2 f5d8fd51ed1e804c9e8d0357e8614e0493b06e96 2005-11-29 01:48:08 UTC
aaron@magratea ~/newsex/etc/xdm $ gdb /usr/bin/pstree core
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"...Using host libthread_db library
"/lib/libthread_db.so.1".

Core was generated by `pstree -a'.
Program terminated with signal 11, Segmentation fault.

warning: current_sos: Can't read pathname for load map: Eingabe-/Ausgabefehler

Reading symbols from /lib/libncurses.so.5...done.
Loaded symbols for /lib/libncurses.so.5
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
#0  0x0804997e in dump_tree (current=0x804f188, level=2, rep=1, leaf=0, last=1,
prev_uid=1167, closing=0) at pstree.c:446
446     pstree.c: Datei oder Verzeichnis nicht gefunden.
        in pstree.c
(gdb) bt full
#0  0x0804997e in dump_tree (current=0x804f188, level=2, rep=1, leaf=0, last=1,
prev_uid=1167, closing=0) at pstree.c:446
        walk = (CHILD *) 0x8049167
        next = (CHILD *) 0xbf861e68
        scan = (CHILD **) 0x804a980
        pw = (const struct passwd *) 0xb7f64ca0
        lvl = 2
        i = 0
        add = 0
        offset = 15
        len = 0
        swapped = 1
        info = 1
        count = 10
        comm_len = 6
        first = -1209817446
        tmp = 0xbf861e3c ""
        here = 0x804f18e ""
        comm_tmp = "\000�\017"
#1  0x08049b56 in dump_tree (current=0x804f1c0, level=1, rep=1, leaf=0, last=0,
prev_uid=0, closing=-1) at pstree.c:482
        walk = (CHILD *) 0x804f1f8
        next = (CHILD *) 0xbf861f18
        scan = (CHILD **) 0x804a980
        pw = (const struct passwd *) 0xb7f64ca0
        lvl = 1
        i = 3
        add = 0
        offset = 9
        len = 0
        swapped = 1
        info = 1
        count = 10
        comm_len = 4
        first = -1209817446
        tmp = 0xbf861eec ""
        here = 0x804f20a ""
        comm_tmp = "\000�\a"
#2  0x08049b56 in dump_tree (current=0x804deb0, level=0, rep=1, leaf=1, last=1,
prev_uid=0, closing=-1) at pstree.c:482
        walk = (CHILD *) 0x804f218
        next = (CHILD *) 0x0
        scan = (CHILD **) 0x804dd30
        pw = (const struct passwd *) 0xbf8624b4
        lvl = 0
        i = 3
        add = 0
---Type <return> to continue, or q <return> to quit---
        offset = 5
        len = 0
        swapped = 1
        info = 1
        count = 1133257550
        comm_len = 4
        first = 0
        tmp = 0x400 <Address 0x400 out of bounds>
        here = 0x804deea ""
        comm_tmp = "\000\000\000\000"
#3  0x0804a8e4 in main (argc=2, argv=0xbf8624b4) at pstree.c:924
        current = (PROC *) 0x0
        winsz = {ws_row = 45, ws_col = 137, ws_xpixel = 0, ws_ypixel = 0}
        pw = (const struct passwd *) 0x0
        pid = 1
        highlight = 0
        termcap_area =
"[&\206\004\000\000\000\000\000\000\000H&#65533;000@&#65533;f&#65533;&#65533;&#65533;&#65533;&#65533;\000&#65533;\024\212\004\b\024\212\004\b\000\000\000\000&#65533;&#65533;002\000\000\000v&#1911;\000\000\000\000X
\206\a&#65533;\b\000\000\0004y&#1975;", '\0' <repeats 12 times>,
"D\000\000\000\000\000\000\000\204 \206\001\000\000\000&#65533;\220v&#1911;\000\000\000\000
\000\000\000\024\212\004\bx\023&#65533;023&#65533;002\000\000\0008I&#65533;004{&#1911;&#65533;&#65533;000p&#65533;u\001\000&#65533;&#65533;\"\206\234\f&#65533;Q&#65533;214V&#65533;,
'\0' <repeats 52 times>, "\024&#65533;\000\000\000\000"...
        termname = 0x2 <Address 0x2 out of bounds>
        c = -1
Comment 3 SpanKY gentoo-dev 2005-12-21 16:16:50 UTC
ive added 21.9, please try that

if it fails, try 21.6
Comment 4 SpanKY gentoo-dev 2006-01-12 03:31:12 UTC
get back to us please
Comment 5 f5d8fd51ed1e804c9e8d0357e8614e0493b06e96 2006-04-20 03:42:19 UTC
I am not able to reproduce the problem anymore with any psmisc version.
I think back when it happened I had a zombie process hanging arround.
I'll report back if it ever happens again to me.
Comment 6 SpanKY gentoo-dev 2006-04-20 14:00:07 UTC
thanks