Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 148114 - glibc breaks with nss-mysql at boot
Summary: glibc breaks with nss-mysql at boot
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-18 13:36 UTC by Bruno Lustosa
Modified: 2008-07-31 01:20 UTC (History)
3 users (show)

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


Attachments
My emerge --info (emerge.info,2.93 KB, text/plain)
2006-09-25 19:40 UTC, Robert Marmorstein
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bruno Lustosa 2006-09-18 13:36:01 UTC
Hello. After my last upgrade to glibc-2.4-r3, the system doesn't boot normally anymore. When trying to start udev, it gives an error message like this:

Inconsistency detected by ld.so: dl-open.c: 604: _dl_open: Assertion `_dl_debug_initialize (0, args.nsid)->r_state == RT_CONSISTENT' failed!

Looking a bit deeper with strace, this error is generated when it tries to resolve something using mysql (nsswitch.conf: passwd/shadow: files mysql, groups: mysql files), and can't find libmysqlclient.so because /usr is not yet mounted. If I mknod /dev/hda7 (my /usr is there) and mount it, I can start udevd normally.
I've been using this configuration for a long time, and it used to work with previous glibc. If I change my groups in nsswitch.conf to "files mysql", it works fine, however that's not how I need it to be set up.
This seems to be a bug with glibc, because udev is not the only program that fails. A simple 'ls /' fails as well.
So, to make it all work fine, I edited /sbin/rc and added the mknod/mount before starting udevd so it wouldn't fail, until I got a better solution.
This doesn't seem to affect everyone, because not so many people uses alternative authentication schemes.
Anyway, if more info is needed, please reply. This is happening on ~x86 and on amd64 as well.
Comment 1 Bruno Lustosa 2006-09-18 18:56:31 UTC
I'm sorry, I forgot to attach emerge --info. Here it goes:

Portage 2.1.1 (default-linux/x86/2006.1, gcc-4.1.1/vanilla, glibc-2.4-r3, 2.6.17-gentoo-r8 i686)
=================================================================
System uname: 2.6.17-gentoo-r8 i686 AMD Sempron(tm)  2400+
Gentoo Base System version 1.12.5
Last Sync: Fri, 15 Sep 2006 14:00:01 +0000
ccache version 2.4 [enabled]
app-admin/eselect-compiler: 2.0.0_rc2-r1
dev-java/java-config: 1.3.0-r2, 2.0.28-r1
dev-lang/python:     2.4.3-r3
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/eselect/compiler /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US.UTF-8"
LINGUAS="pt_BR ru en_US"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowext X aalib acl alsa bash-completion berkdb bitmap-fonts bluetooth cli crypt cups dga dlloader dri dvd dvdread elibc_glibc esd firefox fortran gdbm gif gnome gpm gtk input_devices_keyboard input_devices_mouse isdnlog jpeg kernel_linux libg++ linguas_en_US linguas_pt_BR linguas_ru maildir mmx mmxext mpeg ncurses nls nptl nptlonly nsplugin offensive ogg opengl pam pcre perl png ppds pppd python readline reflection sdl session spl sse sse2 ssl tcpd truetype truetype-fonts type1-fonts udev unicode userland_GNU video_cards_nv video_cards_nvidia vorbis xmms xorg xv xvid zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Bruno Lustosa 2006-09-22 07:39:08 UTC
Just to add, normal behaviour should be to leave the uid/gid unresolved (i.e. return the number) instead of crashing if it can't find the library it needs to resolve.
Comment 3 Scott Lipcon 2006-09-25 19:30:13 UTC
For whats its worth, I've got an x86 system up to date, mostly stable packages, and mythbackend crashed tonight with the same error log - it shouldn't be the same, as there is no reason it wouldn't have been able to load a library, the system was fully booted with all disks mounted, etc.  

Since I don't see it below, I've got glibc-2.4-r3 as well.

my emerge --info:

Portage 2.1.1 (default-linux/x86/2006.1/desktop, gcc-4.1.1, glibc-2.4-r3, 2.6.17-gentoo-r8 i686)
=================================================================
System uname: 2.6.17-gentoo-r8 i686 AMD Athlon(tm) XP 2800+
Gentoo Base System version 1.12.5
Last Sync: Mon, 25 Sep 2006 11:00:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: [Not Present]
dev-lang/python:     2.3.5-r2, 2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
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-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="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/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share
/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://distro.ibiblio.org/pub/linux/distributions/gentoo http://distfiles.gentoo.org"
LINGUAS=""
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --del
ete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X aac alsa apache2 arts audiofile berkdb bitmap-fonts bzip2 cairo cdr cli crypt cups curl dbus dlloader dr
i dvd dvdr dvdread eds elibc_glibc emboss encode esd exif expat fam ffmpeg firefox flac gd gdbm gif gnome gpm gstre
amer gtk hal idn imagemagick imlib input_devices_evdev input_devices_keyboard input_devices_mouse ipv6 isdnlog jpeg
 kde kernel_linux lcms libg++ libwwww lirc lirc_devices_hauppauge mad mhash mikmod mjpeg mng motif mp3 mpeg mysql n
curses nls nptl nptlonly ogg opengl oss pam pcre perl png ppds pppd python qt qt3 qt4 quicktime readline real refle
ction samba sdl session spell spl ssl tcpd threads tiff transcode truetype truetype-fonts type1-fonts udev usb user
land_GNU video_cards_apm video_cards_ark video_cards_ati video_cards_chips video_cards_cirrus video_cards_cyrix vid
eo_cards_dummy video_cards_fbdev video_cards_glint video_cards_i128 video_cards_i740 video_cards_i810 video_cards_i
mstt video_cards_mga video_cards_neomagic video_cards_nsc video_cards_nv video_cards_rendition video_cards_s3 video
_cards_s3virge video_cards_savage video_cards_siliconmotion video_cards_sis video_cards_sisusb video_cards_tdfx vid
eo_cards_tga video_cards_trident video_cards_tseng video_cards_v4l video_cards_vesa video_cards_vga video_cards_via
 video_cards_vmware video_cards_voodoo vorbis win32codecs xine xml2 xmms xorg xv xvid zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 4 Robert Marmorstein 2006-09-25 19:40:34 UTC
Created attachment 98090 [details]
My emerge --info

Don't know if this helps, but I get a similar assertion failure when I launch firefox (my system is otherwise behaving normally).  The bug only happens every other time I launch or so, but it's very similar:

Inconsistency detected by ld.so: dl-open.c: 610: _dl_open: Assertion
`_dl_debug_initialize (0, args.nsid)->r_state == RT_CONSISTENT' failed!
firefox-bin exited with non-zero status (127)

Hope that's helpful!
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2006-09-29 14:50:08 UTC
sorry, you're in the wrong here.
in nsswitch, it is critically important that an always-available source is used as the first entry for everything.

This goes for NIS, MySQL, LDAP and any other source that might not always be available.

While this issue you present here does seem to be caused by an ld.so failure, even after that is fixed, you will run into other troubles with having your lookups going to a remote source that will never be available during early bootup by defintion.

glibc should be failing more gracefully, but I'm not sure that there is any easy way to accomplish that - with the way the group/users entity lookup works, the nss-mysql specified in your nsswitch is being dlopened, which then fails because it's NEEDED libraries are not yet available. 

toolchain: The portion of glibc that does the lookups should probably handle dlopen failures more gracefully. back to you.
Comment 6 Mark Loeser (RETIRED) gentoo-dev 2008-07-31 01:20:43 UTC
Is this still a problem for anyone?  There has been no update on it for quite some time now.