Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 218005 - openrc-0.2.2: rc-status segmentation fault
Summary: openrc-0.2.2: rc-status segmentation fault
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-16 19:35 UTC by Jie Luo
Modified: 2008-05-07 08:06 UTC (History)
1 user (show)

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


Attachments
Fix crash (rc-status.patch,756 bytes, patch)
2008-04-16 19:46 UTC, Roy Marples
Details | Diff
fix comment #3 (openrc-0.2.2-rc-status-crash.patch,503 bytes, patch)
2008-04-16 20:58 UTC, Doug Goldstein (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jie Luo 2008-04-16 19:35:11 UTC
When run rc-status without any option, it will segmentation fault.


Reproducible: Always

Steps to Reproduce:
1. rc-status
2.
3.

Actual Results:  

Runlevel: default
 syslog-ng                                                                                                       [  started  ]
 gpm                                                                                                             [  started  ]
 hdparm                                                                                                          [  started  ]
 dbus                                                                                                            [  started  ]
 consolekit                                                                                                      [  started  ]
 hald                                                                                                            [  started  ]
 xdm                                                                                                             [  started  ]
 fuse                                                                                                            [  started  ]
 ntpd                                                                                                            [  started  ]
 sshd                                                                                                            [  started  ]
 fcron                                                                                                           [  started  ]
 dhcdbd                                                                                                          [  crashed  ]
 NetworkManager                                                                                                  [  started  ]
 postfix                                                                                                         [  started  ]
 local                                                                                                           [  started  ]
Runlevel: UNASSIGNED
Segmentation fault



emerge --info
Portage 2.1.4.4 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo-r4 i686)
=================================================================
System uname: 2.6.24-gentoo-r4 i686 Intel(R) Core(TM)2 CPU T5600 @ 1.83GHz
Timestamp of tree: Wed, 16 Apr 2008 06:03:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.4
dev-lang/python:     2.4.4-r9
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.2
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=prescott -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=prescott -O2 -pipe"
DISTDIR="/usr/distfiles"
FEATURES="ccache distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US.UTF-8"
LINGUAS="en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
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"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/desktop-effects /usr/portage/local/layman/x11 /usr/portage/local/mozilla /usr/portage/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac acl acpi alsa bash-completion berkdb bzip2 cairo cjk cli cracklib crypt cscope cups curl dbus dri dts dvd dvdread emacs emboss esd evo exif fam ffmpeg fftw firefox flac ftp gdbm gif gnome gpm gstreamer gtk gtkhtml hal iconv idn imagemagick imap isdnlog javascript jpeg jpeg2k lcms libnotify logrotate mad midi mikmod mmap mmx mmxext mng mp3 mpeg mudflap ncurses networkmanager nptl nptlonly nsplugin ogg opengl openmp pam pcre pdf perl png pppd pulseaudio python qt3support quicktime readline reflection session spell spl sqlite sqlite3 sse sse2 ssl ssse3 startup-notification svg tcpd theora threads tiff truetype tta unicode vim-syntax vorbis win32codecs x86 xattr xine xml xorg xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon 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 deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="i810"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Doug Goldstein (RETIRED) gentoo-dev 2008-04-16 19:37:03 UTC
Please review the bug reporting guide, http://www.gentoo.org/doc/en/bugzilla-howto.xml#doc_chap2

And provide a backtrace and re-open the bug with the necessary info.
Comment 2 Roy Marples 2008-04-16 19:46:42 UTC
Created attachment 149975 [details, diff]
Fix crash

This should fix it.
Comment 3 Jie Luo 2008-04-16 20:50:40 UTC
(In reply to comment #2)
> Created an attachment (id=149975) [edit]
> Fix crash
> 
> This should fix it.
> 

with this patch the dhcdbd crash is fixed, but rc-status is still seg fault. Here is the backtrace.


Auto launching gdb!

Attaching to process 29751
Reading symbols from /sbin/rc...done.
Using host libthread_db library "/lib/libthread_db.so.1".
Reading symbols from /lib/libutil.so.1...done.
Loaded symbols for /lib/libutil.so.1
Reading symbols from /lib/librc.so.1...done.
Loaded symbols for /lib/librc.so.1
Reading symbols from /lib/libeinfo.so.1...done.
Loaded symbols for /lib/libeinfo.so.1
Reading symbols from /lib/libncurses.so.5...done.
Loaded symbols for /lib/libncurses.so.5
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libpam.so.0...done.
Loaded symbols for /lib/libpam.so.0
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
0xb7f06410 in __kernel_vsyscall ()
#0  0xb7f06410 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb7de1fb1 in wait () from /lib/libc.so.6
No symbol table info available.
#2  0x0805b72e in handle_bad_signal (sig=11) at rc.c:928
	pid = "\006\bü\203۷7!\230¿"
	status = -1210428055
	crashed_pid = 29751
#3  <signal handler called>
No symbol table info available.
#4  0x08054fa3 in print_services (runlevel=0x0, services=0x8068028) at rc-status.c:152
	l = (RC_STRINGLIST *) 0x0
	s = (RC_STRING *) 0xb7e97ff4
	t = (RC_STRING *) 0xb7f24ca0
	r = 0x8067008 "p\221é·p\221é·"
#5  0x08055570 in rc_status (argc=1, argv=0xbf9835b4) at rc-status.c:277
	levels = (RC_STRINGLIST *) 0x8066008
	services = (RC_STRINGLIST *) 0x8068028
	s = (RC_STRING *) 0x0
	l = (RC_STRING *) 0x8066018
	t = (RC_STRING *) 0x0
	p = 0x8066180 "\033[K"
	opt = -1
#6  0x080516be in run_applets (argc=1, argv=0xbf9835b4) at rc-applets.c:382
	i = 2
---Type <return> to continue, or q <return> to quit---
	match = false
	p = 0x80599cf "U\211åWVS\203ì,¡\204U\006\b\205À\017\204i\001"
	pid = 0
#7  0x0805b99f in main (argc=1, argv=0xbf9835b4) at rc.c:997
	bootlevel = 0x0
	newlevel = 0x0
	deporder = (RC_STRINGLIST *) 0x0
	tmplist = (RC_STRINGLIST *) 0x804b3d0
	service = (RC_STRING *) 0x0
	going_down = false
	depoptions = 3
	krunlevel = '\0' <repeats 736 times>, "\200Rò·\000\000\000\000§Íշ¨þð·", '\0' <repeats 33 times>, "Pò·", '\0' <repeats 12 times>, "\020Àé·", '\0' <repeats 72 times>, "\020Àé·\034àé·\022à鷨þð·", '\0' <repeats 33 times>, "Pò·", '\0' <repeats 12 times>, "x]ð·", '\0' <repeats 92 times>, "\200Rò·\000\000\000\0004\206귨þð·", '\0' <repeats 33 times>, "Pò·", '\0' <repeats 12 times>, "èZð·", '\0' <repeats 24 times>, ",\222ñ·", '\0' <repeats 16 times>, "ð%\000\000È)\230¿ÄOò·¬+\230¿±"...
	pidstr = "\000\000\000\000\000\000\000\000\000"
	opt = 134522741
	parallel = 183
	regen = 0
	proc = 0xb7db557b "\201Ãy*\016"
	p = 0x0
	token = 0x0
Comment 4 Jie Luo 2008-04-16 20:57:52 UTC
(gdb) bt
#0  0xb7f06410 in __kernel_vsyscall ()
#1  0xb7de1fb1 in wait () from /lib/libc.so.6
#2  0x0805b72e in handle_bad_signal (sig=11) at rc.c:928
#3  <signal handler called>
#4  0x08054fa3 in print_services (runlevel=0x0, services=0x8068028) at rc-status.c:152
#5  0x08055570 in rc_status (argc=1, argv=0xbf9835b4) at rc-status.c:277
#6  0x080516be in run_applets (argc=1, argv=0xbf9835b4) at rc-applets.c:382
#7  0x0805b99f in main (argc=1, argv=0xbf9835b4) at rc.c:997
Comment 5 Doug Goldstein (RETIRED) gentoo-dev 2008-04-16 20:58:20 UTC
Created attachment 149988 [details, diff]
fix comment #3
Comment 6 Jie Luo 2008-04-16 21:10:31 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Created an attachment (id=149975) [edit]
> > Fix crash
> > 
> > This should fix it.
> > 
> 
> with this patch the dhcdbd crash is fixed, but rc-status is still seg fault.
> Here is the backtrace.

Sorry, this is not fixed. rc-status will report dhcdbd as [ started ] when run
as root, but it will report dhcdbd as [ crashed ] when run as normal user.

# l /var/run/dhcdbd.pid 
--wS--S--T 1 root root 5 2008-04-17 05:01 /var/run/dhcdbd.pid

Should I open another bug for this?
Comment 7 Jie Luo 2008-04-16 21:16:36 UTC
(In reply to comment #5)
> Created an attachment (id=149988) [edit]
> fix comment #3
> 

This fixed the seg fault. This bug can be closed.
Comment 8 Doug Goldstein (RETIRED) gentoo-dev 2008-04-16 21:33:43 UTC
it's not fixed until the patches are in the tree
Comment 9 Jie Luo 2008-04-17 00:23:30 UTC
(In reply to comment #8)
> it's not fixed until the patches are in the tree
> 

Sorry, I shouldn't close it.
Comment 10 Roy Marples 2008-04-17 00:26:34 UTC
(In reply to comment #5)
> Created an attachment (id=149988) [edit]
> fix comment #3
> 

Looks good, added to git repo.
Comment 11 SpanKY gentoo-dev 2008-05-07 08:06:51 UTC
pretty sure this is fixed with openrc-0.2.3