After upgrading to glibc-2.3.4.20041102, some apps (e.g. tar) started segfaulting, but not consistently (e.g., tar tf file.tar always works, while tar xf file.tar works sometimes but usually segfaults immediately). I did an strace and found it was failing on libnss_nis lookups. Edited /etc/nsswitch.conf and changed the passwd, shadow, and group entries from "files nis" to "compat", and tar worked again. Then edited /etc/passwd, /etc/shadow, and /etc/group to add "+" at the end of each file (which causes compat to do NIS lookups), and tar segfaulted again. Also, tar works if ypbind is not started for some reason (e.g., if /etc/conf.d/domainname is not configured properly). Of course, having tar not work makes it a little difficult to emerge, so this bug is pretty unpleasant. Reproducible: Always Steps to Reproduce: 1. upgrade to glibc-2.3.4.20041102 (using gcc-3.4.3-r1). 2. edit /etc/nsswitch.conf to change "compat" to "files nis" for the passwd, shadow, and group entries. 3. set up an NIS server and add the proper entries in /etc/conf.d/domainname and /etc/conf.d/ypbind for it. 4. start ypbind. 5. try to untar something. Actual Results: tar segfaulted. Expected Results: untarred the file. CFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer" when building glibc (I've changed them somewhat for the rebuild, so emerge info gives different information). emerge info output: Portage 2.0.51-r8 (default-linux/x86/2004.0, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.9-rc1-mm5 i686) ================================================================= System uname: 2.6.9-rc1-mm5 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz Gentoo Base System version 1.6.7 Python: dev-lang/python-2.2.3-r5,dev-lang/python-2.3.4 [2.3.4 (#1, Sep 27 2004, 14:29:55)] distcc 2.14 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] dev-lang/python: 2.2.3-r5, 2.3.4 sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.8.5-r2, 1.5, 1.4_p6, 1.6.3, 1.7.9, 1.9.3 sys-devel/binutils: 2.15.92.0.2-r1 sys-devel/libtool: 1.5.2-r7 virtual/os-headers: 2.6.8.1-r1 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=pentium4 -mtune=pentium4 -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -frename-registers -fweb -ftracer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium4 -mtune=pentium4 -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -frename-registers -fweb -ftracer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms" GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo ftp://gentoo.mirrors.pair.com/ http://gentoo.chem.wisc.edu/gentoo/ http://gentoo.seren.com/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="X aalib alsa apm arts avi berkdb bitmap-fonts bonobo cdr cjk crypt cscope cups dga directfb dvd encode esd evo f77 fam fbcon flac flash foomaticdb fortran gb gd gdbm ggi ggz gif gimpprint gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml guileimagemagick imap imlib innodb ipv6 java jikes jpeg junit kde kerberos lcms ldap leim libg++ libgda libwww mad mbox mikmodmmx motif mozilla mpeg mule mysql nas ncurses nls nptl odbc oggvorbis opengl oss pam pda pdflib perl pic plotutils png postgres python qt qtmt quicktime readline ruby samba sasl scanner sdl slang slp snmp socks5 speex spell sse ssl svga tcltk tcpd tetex tiff truetype wmf x86 xml xml2 xmms xv zeo zlib"
I can confirm this bug, but on amd64, and here it's not just tar, but almost everything that has to do with users, that is affected. I can no longer login as a normal user, ls -la segfaults, and other apps also segfault. When I stop ypbind, apps no longer segfault.
please attached the output of an strace
Created attachment 47019 [details] strace of a segfaulting ls Here is a strace of ls segfaulting with glibc-2.3.4.20041102 and nis.
I am getting the same thing with the same symptoms. If you need anything from me let me know. bash-2.05b# emerge --info Portage 2.0.51-r15 (default-linux/amd64/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.10 x86_64) ================================================================= System uname: 2.6.10 x86_64 AMD Athlon(tm) 64 Processor 3500+ Gentoo Base System version 1.4.16 Python: dev-lang/python-2.3.4 [2.3.4 (#1, Jan 28 2005, 18:39:19)] dev-lang/python: 2.3.4 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.5, 1.6.3, 1.7.9-r1, 1.4_p6, 1.9.4, 1.8.5-r3 sys-devel/binutils: 2.15.92.0.2-r1 sys-devel/libtool: 1.5.10-r4 virtual/os-headers: 2.6.8.1-r2 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CFLAGS="-march=athlon64 -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=x86-64 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/packages/amd64" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 X acpi alsa avi berkdb bitmap-fonts bonobo bootsplash ccache cddb cdparanoia cdr clamav crypt cups curl dga directfb divx4linux dnd dvd dvdr dvdread esd exif f77 fam font-server fortran gif gimp gimpprint gnome gphoto2 gpm gtk gtk2 gtkhtml guile ieee1394 imagemagick imlib ipv6 java jp2 jpeg kde libclamav libwww lzw lzw-tiff mbox mhash mozilla mpeg multilib mysql ncurses nis nls nocardbus nocd nowin nvidia offensive opengl oss pam pcntl perl php png python qt quicktime readline samba scanner sdl session sockets ssl tcpd threads tiff truetype truetype-fonts type1-fonts usb userlocales v4l v4l2 xinerama xml xml2 xmms xosd xpm xrandr xv zlib" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS
I can confirm the bug is still present with the latest glibc version in portage (still 2.3.4.20041102, but the ebuild has changed substantially over time). This bug is also starting to prevent me from doing a normal system update. More and more packages do not compile with the old glibc.
Created attachment 50470 [details] Last ebuild that still works I've been using the glibc-2.3.4.20041021 ebuild, which seems to work fine with the latest packages and still works with NIS. It was in portage for a little while, but for some reason was removed. I've stuck it in /usr/local/portage as an overlay, and added ">sys-libs/glibc-2.3.4.20041101" into package.mask. Here's the ebuild file for anyone who needs it. It also requires the glibc-hppa-patches-2004-09-30.tar.gz file, which for me did not download automatically, so I'll add that as another attachment.
Created attachment 50471 [details] hppa patches for glibc-2.3.4.20041021 ebuild Here's the glibc-hppa-patches file that the glibc-2.3.4.20041021 ebuild requires.
Ok, well that narrows down the window for when the bug was introduced, thanks... but I'm HOPING it's fixed in cvs before the 2.3.4 release upstream. I'm testing out the 2.3.4.20050125 version right now, and if you could help out, that'd be great (don't forget to quickpkg first)
Ok, this problem has gone away for me on sparc in 20050125, so marking fixed.
Seems to work for me on x86 as well.
Also fixed for the amd64
*** Bug 81357 has been marked as a duplicate of this bug. ***
*** Bug 83318 has been marked as a duplicate of this bug. ***
*** Bug 86989 has been marked as a duplicate of this bug. ***
*** Bug 87112 has been marked as a duplicate of this bug. ***
*** Bug 89732 has been marked as a duplicate of this bug. ***
Which version of glibc works for stable amd64 (not ~amd64!) concerning NIS. The latest stable one (glibc-2.3.4.20041102-r1, merged 20050329) is still showing this on multilib gentoo amd64 with NIS.
use 2.3.4.2005* or 2.3.5
*** Bug 93708 has been marked as a duplicate of this bug. ***