Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 158537 - net-fs/openafs-1.4.2 - use of strerror/segmentation faults with error messages - .AFSSERVER file
Summary: net-fs/openafs-1.4.2 - use of strerror/segmentation faults with error message...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Stefaan De Roeck (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-19 05:15 UTC by Volkmar Glauche
Modified: 2007-01-10 19:16 UTC (History)
0 users

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


Attachments
strace output (fs.strace.txt,2.92 KB, text/plain)
2007-01-05 06:25 UTC, Volkmar Glauche
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Volkmar Glauche 2006-12-19 05:15:58 UTC
some of the utilities (e.g. fs) fail to produce error messages and segfault. I have traced this down to comerr/error_msg.c around line 129, where strerror is used to lookup error messages. If I use POSIX strerror_r instead, things seem to be fixed.

This happens while fs is looking for a file /.AFSSERVER or ~/.AFSSERVER, which is not present and subsequently fs fails to connect to the AFS server daemons. Why doesn't it look in /etc/openafs/CellServDB?

Portage 2.1.2_rc3-r4 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.5-r0, 2.6.19-gentoo-r1 x86_64)
=================================================================
System uname: 2.6.19-gentoo-r1 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+
Gentoo Base System version 1.12.7
Last Sync: Thu, 14 Dec 2006 01:47:01 +0000
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=athlon64"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distcc distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.rz.ruhr-uni-bochum.de/gentoo-mirror/ ftp://distfiles.gentoo.org ftp://ftp.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=18
0 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X Xaw3d a52 aac aalib acl acpi adns alsa ao arts audiofile bash-completion bcmath berkdb bindist bitmap-fonts blas bonobo bzip2 cairo 
calendar caps cdparanoia cdr clamav cli cracklib crypt cscope ctype cups curl curlwrappers dba dbase dbm dbus dga dio dlloader doc dri dts dv dvb
 dvd dvdr dvdread eds elibc_glibc emacs emacs-w3 emboss encode esd evo exif expat fam fbcon ffmpeg fftw firebird firefox flac flash flatfile fltk
 fortran ftp gb gcj gd gdbm geoip ggi gif ginac glut gmp gnome gnustep gnutls gphoto2 gpm graphviz gstreamer gtk gtk2 gtkhtml guile hal hardened 
hardenedphp howl iconv idn ieee1394 imagemagick imap imlib inifile input_devices_evdev input_devices_keyboard input_devices_mouse ipod ipv6 isdnl
og java javascript jbig jikes jpeg jpeg2k kde kerberos kernel_linux krb4 ladcca ladspa lapack lash lcms ldap leim libcaca libedit libg++ libgda l
ibnotify libsamplerate libwww lirc lm_sensors lua m17n-lib mad maildir mailwrapper matroska mbox mcal memlimit mhash migemo mikmod mime ming mmap
 mng mnogosearch mono motif mozilla mp3 mpeg mplayer msession mule musepack nas ncurses neXt netboot netcdf nls nntp nptl nptlonly nsplugin offen
sive ogg openal openexr opengl pam pcntl pcre pda pdf perl php plotutils png portaudio posix ppds pppd prelude profile python qt3 qt4 quicktime r
desktop readline recode reflection ruby sasl scanner sdl session sharedext sharedmem shorten simplexml skey slang slp smartcard sndfile soap sock
ets sox speex spell spl sqlite sqlite3 ssl startup-notification svg symlink sysvipc szip tcl tcltk tcpd tetex theora threads tidy tiff tk tokeniz
er truetype truetype-fonts type1-fonts udev unicode usb userland_GNU vcd verbose video_cards_dummy video_cards_fbdev video_cards_nv video_cards_v
esa video_cards_vga video_cards_vmware vim-syntax vorbis wmf wxwindows xine xinetd xml xmlrpc xorg xpm xprint xsl xv xvid zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-12-19 05:17:25 UTC
Which ebuild and version is this about?
Comment 2 Volkmar Glauche 2006-12-19 05:46:36 UTC
(In reply to comment #1)
> Which ebuild and version is this about?
> 

Sorry - here is the version info:

openafs-1.4.2.ebuild
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2006-12-19 07:04:40 UTC
Noone will notice again if you don't reopen. :)
Comment 4 Stefaan De Roeck (RETIRED) gentoo-dev 2006-12-22 00:58:37 UTC
Could you give some hints on how to reproduce?  Thanks
Comment 5 Volkmar Glauche 2007-01-05 06:25:01 UTC
Created attachment 105526 [details]
strace output
Comment 6 Volkmar Glauche 2007-01-05 06:25:55 UTC
(In reply to comment #4)
> Could you give some hints on how to reproduce?  Thanks
> 

Reproducible - always. The .AFSSERVER lookup was misguided (some strange documentation), but the segmentation fault happens whenever a fs command wants to report an error message. I have a new case for this (libafs.ko and 2.6.19-gentoo-r2 kernel on amd64), for which I may open a new bug, but attached is the output from strace'ing an fs call.

Comment 7 Stefaan De Roeck (RETIRED) gentoo-dev 2007-01-10 10:31:35 UTC
I cannot reproduce this with gentoo-sources-2.6.19-r3 (nor with openafs-1.4.3-pre20061220 and 2.6.19-r3 or 2.6.19-r2).  Could you please verify you've run "etc-update", and emerged openafs-kernel for the right kernel version?
Comment 8 Stefaan De Roeck (RETIRED) gentoo-dev 2007-01-10 10:33:37 UTC
Oh, could you also look into your kernel ring buffer for messages regarding finding/failing to find the system call table?  See bug #160270.  Thanks!
Comment 9 Volkmar Glauche 2007-01-10 10:55:54 UTC
This happens always when fs wants to print an error message - perhaps its a glibc/gcc issue?? I have not tried to downgrade to a stable glibc/gcc yet, since everything else seems to be working fine.
Comment 10 Stefaan De Roeck (RETIRED) gentoo-dev 2007-01-10 11:04:16 UTC
Please also look into all questions in comments #7 and #8.  While guessing can sometimes give a brilliant idea out of the blue, verifying the facts can help eliminating possibilities with more certainty.  
Comment 11 Volkmar Glauche 2007-01-10 12:07:29 UTC
(In reply to comment #10)
> Please also look into all questions in comments #7 and #8.  While guessing can
> sometimes give a brilliant idea out of the blue, verifying the facts can help
> eliminating possibilities with more certainty.  
> 

Sorry for not answering explicitly. Everything is up-to-date, and normal fs/afs behaviour is fine. I can reproduce the segfault with

fs listacl /afs

where /afs is the mount point for the AFS file system tree, and afsd is running with options

/usr/sbin/afsd -fakestat -stat 2000 -dcache 800 -daemons 3 -volumes 70 -afsdb -dynroot

Comment 12 Stefaan De Roeck (RETIRED) gentoo-dev 2007-01-10 19:16:16 UTC
Fixed in net-fs/openafs-1.4.3_pre20061220-r1, cause was missing prototype resulting in a bad pointer cast.  Thanks for reporting!