* [gentoo-user] Problem with new glibc and libnss
@ 2006-09-18 14:08 Bruno Lustosa
2006-09-18 16:48 ` Richard Fish
0 siblings, 1 reply; 7+ messages in thread
From: Bruno Lustosa @ 2006-09-18 14:08 UTC (permalink / raw
To: gentoo-user
Hi folks,
As soon as I upgraded my system to new gcc and glibc, I started to get
a very weird problem at boot time. I'm using libnss-mysql to
authenticate users, and my nsswitch.conf is set to check files first,
then mysql.
At boot time, /usr is not yet mounted, and as such, anything that
would need to connect to mysql would fail (because libmysqlclient is
in /usr/lib). However, the problem is that udevd is not starting
without /usr mounted. A simple 'ls' on root dir fails as well, even
though all files and dirs there are owned by root:root (and of course,
root is on passwd and groups). An strace indicates that both of them
are trying to access /usr/lib/libmysqlclient.so, and when they get the
"No such file or directory", they fail with this message:
Inconsistency detected by ld.so: dl-open.c: 604: _dl_open: Assertion
`_dl_debug_initialize (0, args.nsid)->r_state == RT_CONSISTENT'
failed!
My workaround (and a kinda ugly one) was to edit /sbin/rc (the script
that calls udevd) and put there just before calling udevd:
mknod /dev/hda7 b 3 7
mount /usr (my /usr is in /dev/hda7)
This makes it work, but I'm sure someone might have a better idea than
that, because I'll lose this as soon as the package that owns /sbin/rc
is updated.
This worked before the last update to glibc, I just don't know why it
tries to connect to mysql now (either it didn't before, or it did try
but would not fail like that).
Can anyone shed some light on this?
--
Bruno Lustosa <bruno@lustosa.net>
http://www.lustosa.net/
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Problem with new glibc and libnss
2006-09-18 14:08 [gentoo-user] Problem with new glibc and libnss Bruno Lustosa
@ 2006-09-18 16:48 ` Richard Fish
2006-09-18 17:55 ` Bruno Lustosa
0 siblings, 1 reply; 7+ messages in thread
From: Richard Fish @ 2006-09-18 16:48 UTC (permalink / raw
To: gentoo-user
On 9/18/06, Bruno Lustosa <bruno.lists@gmail.com> wrote:
> Hi folks,
>
> As soon as I upgraded my system to new gcc and glibc, I started to get
> a very weird problem at boot time. I'm using libnss-mysql to
> authenticate users, and my nsswitch.conf is set to check files first,
> then mysql.
Can you post your nsswitch.conf? I don't normally use nss_mysql, but
I just installed it on my box to see what an strace ls would reveal,
and it does not show libmysql being accessed when files appears first
for passwd, shadow, and groups.
carcharias ~ # grep -e ^passwd -e ^shadow -e ^group /etc/nsswitch.conf
passwd: files mysql
shadow: files mysql
group: files mysql
carcharias ~ # strace -f -e open -o /tmp/strace.out ls -l / >/dev/null
carcharias ~ # grep mysql /tmp/strace.out
carcharias ~ # vi /etc/nsswitch.conf
carcharias ~ # grep -e ^passwd -e ^shadow -e ^group /etc/nsswitch.conf
passwd: mysql files
shadow: mysql files
group: mysql files
carcharias ~ # strace -f -e open -o /tmp/strace.out ls -l / >/dev/null
carcharias ~ # grep mysql /tmp/strace.out
30644 open("/lib/libnss_mysql.so.2", O_RDONLY) = 3
30644 open("/usr/lib/mysql/tls/i686/sse2/libmysqlclient.so.15",
O_RDONLY) = -1 ENOENT (No such file or directory)
30644 open("/usr/lib/mysql/tls/i686/libmysqlclient.so.15", O_RDONLY) =
-1 ENOENT (No such file or directory)
30644 open("/usr/lib/mysql/tls/sse2/libmysqlclient.so.15", O_RDONLY) =
-1 ENOENT (No such file or directory)
30644 open("/usr/lib/mysql/tls/libmysqlclient.so.15", O_RDONLY) = -1
ENOENT (No such file or directory)
30644 open("/usr/lib/mysql/i686/sse2/libmysqlclient.so.15", O_RDONLY)
= -1 ENOENT (No such file or directory)
30644 open("/usr/lib/mysql/i686/libmysqlclient.so.15", O_RDONLY) = -1
ENOENT (No such file or directory)
30644 open("/usr/lib/mysql/sse2/libmysqlclient.so.15", O_RDONLY) = -1
ENOENT (No such file or directory)
30644 open("/usr/lib/mysql/libmysqlclient.so.15", O_RDONLY) = 3
Also the outputs of emerge --info and emerge -pv sys-libs/glibc might help.
-Richard
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Problem with new glibc and libnss
2006-09-18 16:48 ` Richard Fish
@ 2006-09-18 17:55 ` Bruno Lustosa
2006-09-18 18:33 ` Richard Fish
0 siblings, 1 reply; 7+ messages in thread
From: Bruno Lustosa @ 2006-09-18 17:55 UTC (permalink / raw
To: gentoo-user
On 9/18/06, Richard Fish <bigfish@asmallpond.org> wrote:
> Can you post your nsswitch.conf? I don't normally use nss_mysql, but
> I just installed it on my box to see what an strace ls would reveal,
> and it does not show libmysql being accessed when files appears first
> for passwd, shadow, and groups.
Hello. I have just tried it again, and surprisingly it's working now,
even though I already had it this way:
$ grep -e ^passwd -e ^shadow -e ^group /etc/nsswitch.conf
passwd: files mysql
shadow: files mysql
group: files mysql
> carcharias ~ # strace -f -e open -o /tmp/strace.out ls -l / >/dev/null
> carcharias ~ # grep mysql /tmp/strace.out
Same result here, no access to mysql whatsoever.
> carcharias ~ # strace -f -e open -o /tmp/strace.out ls -l / >/dev/null
> carcharias ~ # grep mysql /tmp/strace.out
> 30644 open("/lib/libnss_mysql.so.2", O_RDONLY) = 3
It seems to be trying to find it. In my root dir, I have all files
owned by root:root, don't know how it is there, but in my case, it
wouldn't need to try mysql for that.
> Also the outputs of emerge --info and emerge -pv sys-libs/glibc might help.
Well, even though mine seems to be working very very fine, a friend
who had the same problem still has it. The versions of glibc,
libnss-mysql and baselayout are the same as mine, although he's
running om amd64 (I'm on x86).
I just had a look over there, and udevd doesn't start. An strace shows
it trying to open libmysqlclient on /usr, and as it's not mounted, it
fails with that "Inconsistency detected" error.
Anyway, here are my versions:
[ebuild R ] sys-libs/glibc-2.4-r3 USE="nls nptl nptlonly -build
-glibc-omitfp -hardened (-multilib) -profile (-selinux)" 0 kB
[ebuild R ] sys-auth/libnss-mysql-1.5 0 kB
[ebuild R ] sys-apps/baselayout-1.12.5 USE="unicode -bootstrap
-build -static" 0 kB
For me, this looks very very strange. I mean, I know it *should* work
with "files mysql" at nsswitch.conf, but why mine works and my
friend's doesn't is a mystery for me. At least for now. I'm pretty
sure baselayout has nothing to do with it, I listed it just because it
owns /sbin/rc. Problem seems to be the way nss is trying to resolve
things over there.
My emerge --info shows:
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
Thanks for your answer, and if you need something more, please tell me.
--
Bruno Lustosa <bruno@lustosa.net>
http://www.lustosa.net/
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Problem with new glibc and libnss
2006-09-18 17:55 ` Bruno Lustosa
@ 2006-09-18 18:33 ` Richard Fish
2006-09-18 20:23 ` Bruno Lustosa
0 siblings, 1 reply; 7+ messages in thread
From: Richard Fish @ 2006-09-18 18:33 UTC (permalink / raw
To: gentoo-user
On 9/18/06, Bruno Lustosa <bruno.lists@gmail.com> wrote:
> I just had a look over there, and udevd doesn't start. An strace shows
> it trying to open libmysqlclient on /usr, and as it's not mounted, it
> fails with that "Inconsistency detected" error.
Well there is a known issue [1] with udev and rules that contain
non-local or undefined users/groups. If your friend's machine is
stable only, then it probably has udev-087, and it looks like 098
should have a fix. So your friend might want to try the ~amd64
version of udev, and also make sure to upgrade to the very latest
version of baselayout (1.12.5).
-Richard
[1] http://bugs.gentoo.org/show_bug.cgi?id=99564
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Problem with new glibc and libnss
2006-09-18 18:33 ` Richard Fish
@ 2006-09-18 20:23 ` Bruno Lustosa
2006-09-19 1:58 ` Bruno Lustosa
0 siblings, 1 reply; 7+ messages in thread
From: Bruno Lustosa @ 2006-09-18 20:23 UTC (permalink / raw
To: gentoo-user
On 9/18/06, Richard Fish <bigfish@asmallpond.org> wrote:
> Well there is a known issue [1] with udev and rules that contain
> non-local or undefined users/groups. If your friend's machine is
> stable only, then it probably has udev-087, and it looks like 098
> should have a fix. So your friend might want to try the ~amd64
> version of udev, and also make sure to upgrade to the very latest
> version of baselayout (1.12.5).
Hello, RIchard.
I just rechecked everything here, and it doesn't seem to be an udev
issue, because when I have 'mysql files' at nsswitch.conf, I get an
assertion error not only from udev, but also from a simple ls.
So, the problem is not "fixed" here. I had to change my functionality
to have it working (i.e. changing the way authentication info is
looked). So, if I need to have mysql lookups before files, I don't
have a way now unless I do an even uglier hack and make it change
itself on local.start :)
I don't experience timeouts, instead I just get glibc assertion errors:
Inconsistency detected by ld.so: dl-open.c: 604: _dl_open: Assertion
`_dl_debug_initialize (0, args.nsid)->r_state == RT_CONSISTENT'
failed!
In the past, glibc wouldn't complain to leave things unresolved. The
problems started now that it started to give these assertion failures.
Thank you for your help.
--
Bruno Lustosa <bruno@lustosa.net>
http://www.lustosa.net/
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Problem with new glibc and libnss
2006-09-18 20:23 ` Bruno Lustosa
@ 2006-09-19 1:58 ` Bruno Lustosa
[not found] ` <7573e9640609181938q46e3998dq76e5d69aa8cbbbc0@mail.gmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: Bruno Lustosa @ 2006-09-19 1:58 UTC (permalink / raw
To: gentoo-user
On 9/18/06, Bruno Lustosa <bruno.lists@gmail.com> wrote:
> Inconsistency detected by ld.so: dl-open.c: 604: _dl_open: Assertion
> `_dl_debug_initialize (0, args.nsid)->r_state == RT_CONSISTENT'
> failed!
>
> In the past, glibc wouldn't complain to leave things unresolved. The
> problems started now that it started to give these assertion failures.
Richard, just to let you know, I filed but #148114. Let's see what the
devs think about it. I do think this is a glibc problem. It shouldn't
give an assertion failure, it should just leave the gid unresolved as
it used to.
http://bugs.gentoo.org/show_bug.cgi?id=148114
--
Bruno Lustosa <bruno@lustosa.net>
http://www.lustosa.net/
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Problem with new glibc and libnss
[not found] ` <7573e9640609181938q46e3998dq76e5d69aa8cbbbc0@mail.gmail.com>
@ 2006-09-19 13:24 ` Bruno Lustosa
0 siblings, 0 replies; 7+ messages in thread
From: Bruno Lustosa @ 2006-09-19 13:24 UTC (permalink / raw
To: gentoo-user
On 9/18/06, Richard Fish <bigfish@asmallpond.org> wrote:
> Yeah, that's the right thing to do at this point. My guess is that
> llibmysqlclient.so will move to /lib along with every other library
> that might possibly be needed at boot time, and a symlink will appear
> in /usr/lib for it.
Tried that too :)
libmysqlclient, for instance, needs libcrypto and libssl. I could make
it myself, but it would make it hell to maintain the upgrades.
I think the right fix would be in glibc though.
Thank you
--
Bruno Lustosa <bruno@lustosa.net>
http://www.lustosa.net/
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-09-19 13:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-18 14:08 [gentoo-user] Problem with new glibc and libnss Bruno Lustosa
2006-09-18 16:48 ` Richard Fish
2006-09-18 17:55 ` Bruno Lustosa
2006-09-18 18:33 ` Richard Fish
2006-09-18 20:23 ` Bruno Lustosa
2006-09-19 1:58 ` Bruno Lustosa
[not found] ` <7573e9640609181938q46e3998dq76e5d69aa8cbbbc0@mail.gmail.com>
2006-09-19 13:24 ` Bruno Lustosa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox