Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 509748 - sys-libs/glibc-2.19: static linking breaks nss module loading (getaddrinfo/getpwnam/etc...)
Summary: sys-libs/glibc-2.19: static linking breaks nss module loading (getaddrinfo/ge...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: https://sourceware.org/bugzilla/show_...
Whiteboard:
Keywords:
: 509850 518650 523342 567210 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-05-07 02:06 UTC by Steve Arnold
Modified: 2015-12-01 14:51 UTC (History)
4 users (show)

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


Attachments
rc.log (laptop_rclog.txt,6.24 KB, text/plain)
2014-05-07 02:06 UTC, Steve Arnold
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Arnold gentoo-dev 2014-05-07 02:06:51 UTC
Created attachment 376528 [details]
rc.log

New amd64 install, "normal" desktop multilib profile, /boot /root as partitions, everything else in LVM (essentially the same as x86 RAID/LVM Quick Install without the RAID). System looks normal and upgrades until at some point it starts coughing "Invalid user" errors all over the place, for every user on the system, eg, portage, root, everything...

This has happened twice in a row and I still have not a clue where to fix...

See --info and rc.log.  As Louie CK said, "this sucks balls"...

Portage 2.2.10 (default/linux/amd64/13.0/desktop, gcc-4.8.2, glibc-2.19, 3.13.10-gentoo x86_64)
=================================================================
System uname: Linux-3.13.10-gentoo-x86_64-AMD_A8-4500M_APU_with_Radeon-tm-_HD_Graphics-with-gentoo-2.2
KiB Mem:     7555128 total,   6971504 free
KiB Swap:    8388604 total,   8388604 free
Timestamp of tree: Tue, 06 May 2014 21:15:01 +0000
ld GNU ld (GNU Binutils) 2.24
distcc 3.1 x86_64-pc-linux-gnu [enabled]
ccache version 3.1.9 [enabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.6-r1, 3.2.5-r3, 3.3.5, 3.4.0
dev-util/ccache:          3.1.9-r3
dev-util/cmake:           2.8.12.2::nerdboy-local
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.10.3, 1.11.6, 1.13.4
sys-devel/binutils:       2.24-r2
sys-devel/gcc:            4.7.3-r1, 4.8.2
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.13 (virtual/os-headers)
sys-libs/glibc:           2.19
Repositories: gentoo nerdboy-local
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA @GPL-COMPATIBLE @OSI-APPROVED @EULA dlj-1.1 skype-eula googleearth AdobeFlash-10.1"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distcc distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms sign splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://wimpy.arnolds.bogus/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 7zip X Xaw3d a52 aac aalib abiword accessibility acl acpi ada alsa amd64 amrnb ansi ao artworkextra aspell avahi avi berkdb bitmap-fonts bluetooth bluray branding browserplugin bzip2 bzlib cairo caps cdda cddb cdparanoia cdr clamav cli consolekit corefonts cracklib crypt css cups curl cxx daap dbus dga divx4linux djvu dnotify dri drm dts dv dvd dvdr dvdread dynagraph emboss emf enchant encode evo exif faac faad fam fame fbcon ffmpeg fftw firefox3 fits flac fluidsynth fontconfig fortran freetype freetype2 g3dvl gb gbm gcj gd gdbm geos gif gimp glib gmp gnome-keyring gnome-online-accounts gnutls go gphoto2 gpm gps graphite graphviz grass gs gstreamer gtk gtk3 gtkhtml gtkspell guile howl iconv icq id3 id3tag ieee1394 ifp imagemagick imap imlib inotify ios ipod ipv6 jabber jack jasper java jbig jikes jpeg jpeg2k jpg junit ladspa lame lapack lash latex lcms ldap libnotify libsamplerate lm_sensors logrotate lzma mad midi mjpeg mmx mmxext mng modules motif mp3 mp4 mpeg mplayer mtp multilib mysql mythtv nas nautilus ncurses netcdf networking nfs nls nolvmstatic normalize nptl nptlonly nsplugin numeric objc ogdi ogg oggvorbis opengl openmp oss pam pango pcre pcsc-lite pda pdf perl phonon pkcs11 plotutils png policykit postgres ppds pulseaudio python qt3support qt4 quicktime readline real replaygain rtc ruby samba sasl sdl seamonkey session slp sndfile snmp sox spamassassin speex spell sse sse2 ssh ssl ssse3 startup-notification subtitles svg taglib tcl tcpd theora threads tiff timidity tk tls truetype truetype-fonts type1-fonts udev udisks unicode upnp upower usb v4l v4l2 vala vcd vim vorbis wav wavpack wayland webkit wifi wxwidgets x264 xanim xattr xcb xcomposite xext xine xinerama xml xmp xorg xpm xrandr xv xvid xvmc zeo zeroconf zip zlib zvbi" ABI_X86="64 32" ALSA_CARDS="emu10k1 hda-intel usb-audio" APACHE2_MODULES="actions alias auth_digest 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 proxy proxy_connect proxy_http rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="adc65 agfa_cl20 aox ax203 barbie canon casio_qv clicksmart310 digigr8 digita dimagev dimera3500 directory enigma13 fuji gsmart300 hp215 iclick jamcam jd11 jl2005a jl2005c kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200 konica konica_qm150 largan lg_gsm mars mustek panasonic_coolshot panasonic_l859 panasonic_dc1000 panasonic_dc1580 pccam300 pccam600 pentax polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ptp2 ricoh ricoh_g3 samsung sierra sipix_blink2 sipix_web2 smal sonix sony_dscf1 sony_dscf55 soundvision spca50x sq905 st2205 stv0674 stv0680 sx330z toshiba_pdrm11 topfield tp6801" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CURL_SSL="openssl" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-32 efi-64 pc" INPUT_DEVICES="keyboard mouse joystick evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-minimizer wiki-publisher" LINGUAS="en_US en" NETBEANS_MODULES="apisupport java javafx profiler websvccommon cnd dlight ergonomics groovy mobility webcommon" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python3_3 python3_2 python2_7" QEMU_SOFTMMU_TARGETS="arm i386 mipsel ppc ppc64 x86_64" QEMU_USER_TARGETS="arm i386 mipsel ppc ppc64 x86_64" RUBY_TARGETS="ruby21 ruby20 ruby19" SANE_BACKENDS="net" USERLAND="GNU" VIDEO_CARDS="fbdev radeon vesa v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.7 3.2 3.3"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Steve Arnold gentoo-dev 2014-05-07 02:09:43 UTC
Oh, I almost forgot the most fun part: only uids/gids are left on the system, all user and group names are completely fubar'd everywhere.  Thoughts?

# ls -l /var/
total 28
drwxr-xr-x  9 0 0 4096 May  6 14:02 cache
drwxr-xr-x  3 0 0 4096 May  6 18:26 db
drwxr-xr-x  3 0 0 4096 May  5 23:00 empty
drwxr-xr-x 15 0 0 4096 May  6 16:23 lib
lrwxrwxrwx  1 0 0    9 Apr  2 18:29 lock -> /run/lock
drwxr-xr-x  6 0 0 4096 May  6 16:23 log
lrwxrwxrwx  1 0 0   15 May  6 14:21 mail -> /var/spool/mail
lrwxrwxrwx  1 0 0    4 Apr  2 18:29 run -> /run
drwxr-xr-x  4 0 0 4096 May  6 14:21 spool
drwxrwxrwt  5 0 0 4096 May  6 18:02 tmp

Double-WTF?!?
Comment 2 Steve Arnold gentoo-dev 2014-05-07 02:15:19 UTC
# cat /etc/nsswitch.conf /etc/passwd /proc/self/mountinfo

# /etc/nsswitch.conf:
# $Header: /var/cvsroot/gentoo/src/patchsets/glibc/extra/etc/nsswitch.conf,v 1.1 2006/09/29 23:52:23 vapier Exp $

passwd:      compat
shadow:      compat
group:       compat

# passwd:    db files nis
# shadow:    db files nis
# group:     db files nis

hosts:       files dns
networks:    files dns

services:    db files
protocols:   db files
rpc:         db files
ethers:      db files
netmasks:    files
netgroup:    files
bootparams:  files

automount:   files
aliases:     files

root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/bin/false
daemon:x:2:2:daemon:/sbin:/bin/false
adm:x:3:4:adm:/var/adm:/bin/false
lp:x:4:7:lp:/var/spool/lpd:/bin/false
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
news:x:9:13:news:/var/spool/news:/bin/false
uucp:x:10:14:uucp:/var/spool/uucp:/bin/false
operator:x:11:0:operator:/root:/bin/bash
portage:x:250:250:portage:/var/tmp/portage:/bin/false
nobody:x:65534:65534:nobody:/var/empty:/bin/false
man:x:13:15:added by portage for man-db:/usr/share/man:/sbin/nologin
sshd:x:22:22:added by portage for openssh:/var/empty:/sbin/nologin
ldap:x:439:439:added by portage for openldap:/usr/lib64/openldap:/sbin/nologin
gkrellmd:x:101:249:added by portage for gkrellm:/dev/null:/sbin/nologin
cron:x:16:16:added by portage for cronbase:/var/spool/cron:/sbin/nologin
distcc:x:240:2:added by portage for distcc:/dev/null:/sbin/nologin
messagebus:x:102:247:added by portage for dbus:/dev/null:/sbin/nologin
mail:x:8:12:added by portage for mailbase:/var/spool/mail:/sbin/nologin
postmaster:x:14:246:added by portage for mailbase:/var/spool/mail:/sbin/nologin
mysql:x:60:60:added by portage for mariadb:/dev/null:/sbin/nologin

15 19 0:3 / /proc rw,relatime - proc proc rw
16 19 0:5 / /dev rw,nosuid,relatime - devtmpfs udev rw,size=10240k,nr_inodes=943475,mode=755
17 16 0:11 / /dev/pts rw,relatime - devpts devpts rw,gid=5,mode=620,ptmxmode=000
18 19 0:14 / /sys rw,nosuid,nodev,noexec,relatime - sysfs sysfs rw
19 1 8:3 / / rw,noatime - ext4 /dev/sda3 rw,data=ordered
20 19 253:0 / /usr rw,noatime - ext4 /dev/mapper/vgOS-usr rw,data=ordered
21 19 0:15 / /run rw,nosuid,nodev,relatime - tmpfs tmpfs rw,size=755516k,mode=755
22 16 0:13 / /dev/mqueue rw,nosuid,nodev,noexec,relatime - mqueue mqueue rw
23 16 0:16 / /dev/shm rw,nosuid,nodev,noexec,relatime - tmpfs shm rw
24 18 0:17 / /sys/kernel/security rw,nosuid,nodev,noexec,relatime - securityfs securityfs rw
25 18 0:6 / /sys/kernel/debug rw,nosuid,nodev,noexec,relatime - debugfs debugfs rw
26 18 0:18 / /sys/fs/cgroup rw,nosuid,nodev,noexec,relatime - tmpfs cgroup_root rw,size=10240k,mode=755
27 18 0:19 / /sys/firmware/efi/efivars rw,nosuid,nodev,noexec,relatime - efivarfs efivarfs rw
28 26 0:20 / /sys/fs/cgroup/openrc rw,nosuid,nodev,noexec,relatime - cgroup openrc rw,release_agent=/lib64/rc/sh/cgroup-release-agent.sh,name=openrc
29 26 0:21 / /sys/fs/cgroup/cpuset rw,nosuid,nodev,noexec,relatime - cgroup cpuset rw,cpuset
30 26 0:22 / /sys/fs/cgroup/cpu rw,nosuid,nodev,noexec,relatime - cgroup cpu rw,cpu
31 26 0:23 / /sys/fs/cgroup/cpuacct rw,nosuid,nodev,noexec,relatime - cgroup cpuacct rw,cpuacct
32 26 0:24 / /sys/fs/cgroup/memory rw,nosuid,nodev,noexec,relatime - cgroup memory rw,memory
33 26 0:25 / /sys/fs/cgroup/devices rw,nosuid,nodev,noexec,relatime - cgroup devices rw,devices
34 26 0:26 / /sys/fs/cgroup/freezer rw,nosuid,nodev,noexec,relatime - cgroup freezer rw,freezer
35 26 0:27 / /sys/fs/cgroup/blkio rw,nosuid,nodev,noexec,relatime - cgroup blkio rw,blkio
36 26 0:28 / /sys/fs/cgroup/perf_event rw,nosuid,nodev,noexec,relatime - cgroup perf_event rw,perf_event
37 26 0:29 / /sys/fs/cgroup/hugetlb rw,nosuid,nodev,noexec,relatime - cgroup hugetlb rw,hugetlb
38 19 253:6 / /home rw,noatime - ext4 /dev/mapper/vgOS-home rw,data=ordered
39 19 253:2 / /opt rw,noatime - ext4 /dev/mapper/vgOS-opt rw,data=ordered
40 19 253:3 / /var rw,noatime - ext4 /dev/mapper/vgOS-var rw,data=ordered
41 40 253:4 / /var/tmp rw,noatime - ext2 /dev/mapper/vgOS-vartmp rw,errors=continue,user_xattr,acl
42 19 253:5 / /tmp rw,noatime - ext2 /dev/mapper/vgOS-tmp rw,errors=continue,user_xattr,acl
43 20 253:1 / /usr/portage rw,noatime - ext2 /dev/mapper/vgOS-portage rw,errors=continue,user_xattr,acl
44 43 0:30 / /usr/portage/packages rw,relatime - nfs wimpy:/export/gentoo-packages/athlon-64 rw,vers=3,rsize=8192,wsize=8192,namlen=255,hard,nolock,proto=tcp,timeo=14,retrans=2,sec=sys,mountaddr=192.168.0.16,mountvers=3,mountport=45971,mountproto=udp,local_lock=all,addr=192.168.0.16
45 43 0:30 / /usr/portage/distfiles rw,relatime - nfs wimpy:/export/distfiles rw,vers=3,rsize=8192,wsize=8192,namlen=255,hard,nolock,proto=tcp,timeo=14,retrans=2,sec=sys,mountaddr=192.168.0.16,mountvers=3,mountport=45971,mountproto=udp,local_lock=all,addr=192.168.0.16
46 20 0:30 / /usr/local/portage rw,relatime - nfs wimpy:/export/portage-overlay rw,vers=3,rsize=8192,wsize=8192,namlen=255,hard,nolock,proto=tcp,timeo=14,retrans=2,sec=sys,mountaddr=192.168.0.16,mountvers=3,mountport=45971,mountproto=udp,local_lock=all,addr=192.168.0.16
Comment 3 Steve Arnold gentoo-dev 2014-05-07 02:44:59 UTC
# strace id root
execve("/usr/bin/id", ["id", "root"], [/* 40 vars */]) = 0
uname({sys="Linux", node="horton", ...}) = 0
brk(0)                                  = 0x1924000
brk(0x19251c0)                          = 0x19251c0
arch_prctl(ARCH_SET_FS, 0x1924880)      = 0
readlink("/proc/self/exe", "/usr/bin/id", 4096) = 11
brk(0x19461c0)                          = 0x19461c0
brk(0x1947000)                          = 0x1947000
open("/usr/lib64/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2104864, ...}) = 0
mmap(NULL, 2104864, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fba36738000
close(3)                                = 0
socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(3)                                = 0
socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(3)                                = 0
open("/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 3
fcntl(3, F_GETFD)                       = 0x1 (flags FD_CLOEXEC)
fstat(3, {st_mode=S_IFREG|0644, st_size=508, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fba36737000
read(3, "# /etc/nsswitch.conf:\n# $Header:"..., 4096) = 508
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7fba36737000, 4096)            = 0
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=104540, ...}) = 0
mmap(NULL, 104540, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fba36718000
close(3)                                = 0
munmap(0x7fba36718000, 104540)          = 0
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2492, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fba36737000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2492
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7fba36737000, 4096)            = 0
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "id: ", 4id: )                     = 4
write(2, "root: no such user", 18root: no such user)      = 18
write(2, "\n", 1
)                       = 1
close(1)                                = 0
close(2)                                = 0
exit_group(1)                           = ?
+++ exited with 1 +++
Comment 4 Steve Arnold gentoo-dev 2014-05-07 03:13:18 UTC
 # eselect locale list
Available targets for the LANG variable:
  [1]   C
  [2]   de_DE
  [3]   de_DE.iso88591
  [4]   deutsch
  [5]   en_US
  [6]   en_US.iso88591
  [7]   en_US.utf8 *
  [8]   es_MX
  [9]   es_MX.iso88591
  [10]  german
  [11]  italian
  [12]  it_IT
  [13]  it_IT.iso88591
  [14]  POSIX
  [ ]   (free form)
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2014-05-07 03:35:49 UTC
No idea. This is a bug tracker. It's where you go after you have discovered a bug. You ought to know.
Comment 6 Steve Arnold gentoo-dev 2014-05-07 04:27:04 UTC
Rebuilt glibc, checked locales and nscd, revdep-rebuilt 7 packages, and it came up clean.  WTF...   Note that the nscd socket was there at the end but was not before.  I rebooted right after uids/gids disappeared, but not since before the bug was filed.  Still no idea wtf...
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2014-05-09 16:01:44 UTC
*** Bug 509850 has been marked as a duplicate of this bug. ***
Comment 8 SpanKY gentoo-dev 2014-05-10 06:33:19 UTC
you can get a cleaner strace by doing:
  LC_ALL=C strace id root

the readlink(/proc/self/exe) looks weird.  no idea where that's coming from as i don't think coreutils does it.

you should try installing ltrace and running it:
  LC_ALL=C ltrace id root

i guess you built glibc with USE=nscd ?  that's kind of weird if you aren't actually turning nscd on.

also attach the output of `ldconfig -p`.
Comment 9 Simon Alman 2014-05-26 07:32:35 UTC
Hi this issue as well unfortunately:

LC_ALL=C strace id root
execve("/usr/bin/id", ["id", "root"], [/* 38 vars */]) = 0
uname({sys="Linux", node="nostromo", ...}) = 0
brk(0)                                  = 0x201d000
brk(0x201e1c0)                          = 0x201e1c0
arch_prctl(ARCH_SET_FS, 0x201d880)      = 0
readlink("/proc/self/exe", "/usr/bin/id", 4096) = 11
brk(0x203f1c0)                          = 0x203f1c0
brk(0x2040000)                          = 0x2040000
open("/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 3
fcntl(3, F_GETFD)                       = 0x1 (flags FD_CLOEXEC)
fstat(3, {st_mode=S_IFREG|0644, st_size=508, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f926e04e000
read(3, "# /etc/nsswitch.conf:\n# $Header:"..., 512) = 508
read(3, "", 512)                        = 0
close(3)                                = 0
munmap(0x7f926e04e000, 4096)            = 0
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=136140, ...}) = 0
mmap(NULL, 136140, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f926e02d000
close(3)                                = 0
munmap(0x7f926e02d000, 136140)          = 0
write(2, "id: ", 4id: )                     = 4
write(2, "root: no such user", 18root: no such user)      = 18
write(2, "\n", 1
)                       = 1
close(1)                                = 0
close(2)                                = 0
exit_group(1)                           = ?
+++ exited with 1 +++

glibc flags:
[ebuild   R   ~] sys-libs/glibc-2.19:2.2  USE="gd (multilib) -debug (-hardened) -nscd -profile (-selinux) -suid -systemtap -vanilla" 0 kB

LC_ALL=C ltrace id root
Couldn't find .dynsym or .dynstr in "/proc/2553/exe"
id: root: no such user

Any thoughts?
Comment 10 Simon Alman 2014-05-26 07:55:45 UTC
Rebuilding coreutils with default flags solved this issue for me:

[ebuild   R    ] sys-apps/coreutils-8.21  USE="acl nls -caps -gmp (-selinux) -static -vanilla -xattr" 0 kB

Previously I had caps, static and xattr selected.
Comment 11 Simon Alman 2014-05-26 08:19:45 UTC
rebuilt with caps and xattr and still works. I suspect the static flag caused the issue from what I've seen so far.
Comment 12 SpanKY gentoo-dev 2014-07-28 08:30:23 UTC
did you guys build coreutils with USE=static, then upgrade glibc ?  and then when you rebuilt coreutils, it worked ?

or even if you rebuild just coreutils with USE=static, it fails ?
Comment 13 Steve Arnold gentoo-dev 2014-07-31 21:11:46 UTC
Actually, the use=nscd thing was an attempted work-around for the original problem, which seemed to help a little bit (whether or not the init script was enabled, which also seemed to have errors on startup).

The problem research pointing to the above was a red herring in this case, as coreutils-8.23 won't build at all with use=static (PIC/non-PIC error linking with a gcc object) but does build/work just fine without static (and no nscd).
Comment 14 SpanKY gentoo-dev 2014-08-10 12:36:33 UTC
*** Bug 518650 has been marked as a duplicate of this bug. ***
Comment 15 SpanKY gentoo-dev 2014-08-10 12:37:40 UTC
see upstream bug report for example test programs that show the problem
Comment 16 SpanKY gentoo-dev 2014-10-20 16:51:00 UTC
*** Bug 523342 has been marked as a duplicate of this bug. ***
Comment 18 SpanKY gentoo-dev 2015-09-25 14:05:43 UTC
this has been fixed upstream for glibc 2.23.  i'll backport it to glibc 2.22, but that'll be as far as i take it.
Comment 20 SpanKY gentoo-dev 2015-12-01 14:51:12 UTC
*** Bug 567210 has been marked as a duplicate of this bug. ***