Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 104836 - [glibc/tests] test tst-key1.out fail in glibc-2.3.5-r1 with nptl
Summary: [glibc/tests] test tst-key1.out fail in glibc-2.3.5-r1 with nptl
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 99092 120728 129439 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-09-04 13:33 UTC by Henrique Ferreiro
Modified: 2007-03-13 06:33 UTC (History)
6 users (show)

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


Attachments
Patch for glibc's NPTL key tests considering gentoo's sandbox (glibc-2.3.6-r3-test-nptl-keys.patch,826 bytes, patch)
2006-02-28 12:33 UTC, Christof Pohl
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Henrique Ferreiro 2005-09-04 13:33:57 UTC
This is the output:

GCONV_PATH=/var/tmp/portage/glibc-2.3.5-r1/work/build-default-i686-pc-linux-gnu-nptl/iconvdata LC_ALL=C  
/var/tmp/portage/glibc-2.3.5-r1/work/build-default-i686-pc-linux-gnu-nptl/elf/ld-linux.so.2 --library-path
/var/tmp/portage/glibc-2.3.5-r1/work/build-default-i686-pc-linux-gnu-nptl:/var/tmp/portage/glibc-2.3.5-r1/work/build-default-i686-pc-linux-gnu-nptl/math:/var/tmp/portage/glibc-2.3.5-r1/work/build-default-i686-pc-linux-gnu-nptl/elf:/var/tmp/portage/glibc-2.3.5-r1/work/build-default-i686-pc-linux-gnu-nptl/dlfcn:/var/tmp/portage/glibc-2.3.5-r1/work/build-default-i686-pc-linux-gnu-nptl/nss:/var/tmp/portage/glibc-2.3.5-r1/work/build-default-i686-pc-linux-gnu-nptl/nis:/var/tmp/portage/glibc-2.3.5-r1/work/build-default-i686-pc-linux-gnu-nptl/rt:/var/tmp/portage/glibc-2.3.5-r1/work/build-default-i686-pc-linux-gnu-nptl/resolv:/var/tmp/portage/glibc-2.3.5-r1/work/build-default-i686-pc-linux-gnu-nptl/crypt:/var/tmp/portage/glibc-2.3.5-r1/work/build-default-i686-pc-linux-gnu-nptl/nptl
/var/tmp/portage/glibc-2.3.5-r1/work/build-default-i686-pc-linux-gnu-nptl/nptl/tst-key1  >
/var/tmp/portage/glibc-2.3.5-r1/work/build-default-i686-pc-linux-gnu-nptl/nptl/tst-key1.out key_create failed 

emerge -vp glibc:

Calculating dependencies  ...done!
[ebuild   R   ] sys-libs/glibc-2.3.5-r1  -build -erandom -glibc-compat20
-glibc-omitfp -hardened -linuxthreads-tls (-multilib) +nls +nptl +nptlonly +pic
-profile (-selinux) +userlocales 0 kB

emerge --info:

Portage 2.0.51.22-r2 (default-linux/x86/2005.1, gcc-3.4.4, glibc-2.3.5-r1,
2.6.13-gentoo i686)
================================================================= System uname:
2.6.13-gentoo i686 Intel(R) Pentium(R) M processor 1.60GHz Gentoo Base System
version 1.12.0_pre8 ccache version 2.4 [enabled]
dev-lang/python:     2.4.1-r1
sys-apps/sandbox:    1.2.12
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.5
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium-m -mtune=pentium-m -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo
/etc/texmf/web2c /etc/env.d" CXXFLAGS="-O2 -march=pentium-m -mtune=pentium-m
-pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig buildpkg candy
ccache collision-protect digest distlocks fixpackages sandbox sfperms strict
test" GENTOO_MIRRORS="http://linuv.uv.es/mirror/gentoo
ftp://ftp.belnet.be/mirrors/rsync.gentoo.org/gentoo" LANG="gl_ES.UTF-8"
LC_ALL="gl_ES.UTF-8" MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/portage-gentopia
/usr/local/portage-bmg /usr/local/portage-fluidportage /usr/local/portage-gnome"
SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X acpi alsa avi
bash-completion bitmap-fonts bzip2 cairo cdr crypt cscope dbus dvd dvdr eds
emboss encode esd exif fbcon firefox flac foomaticdb fortran gd gdbm gif gnome
gnutls gphoto2 gpm gstreamer gtk gtk2 gtkhtml hal imagemagick imlib javascript
jpeg junit libg++ libwww mad mikmod mmx mmxext mng mp3 mpeg ncurses nfs nls nptl
offensive ogg oggvorbis opengl pic png quicktime readline samba sqlite sse sse2
ssl tetex theora tiff truetype truetype-fonts type1-fonts unicode vorbis xml xml2
xv xvid zlib userland_GNU kernel_linux elibc_glibc" Unset:  ASFLAGS, CTARGET,
LDFLAGS, LINGUAS 

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-09-04 13:42:06 UTC
glibc does not pass tests, you should remove that from FEATURES when compiling it.
Comment 2 Raimondo Giammanco 2005-11-17 08:29:08 UTC
For what is worth, on glibc-2.3.5-r2 there is the same problem:

##################################
GCONV_PATH=/var_tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-nptl/iconvdata
LC_ALL=C  
/var_tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-nptl/elf/ld-linux.so.2
--library-path
/var_tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-nptl:/var_tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-nptl/math:/var_tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-nptl/elf:/var_tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-nptl/dlfcn:/var_tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-nptl/nss:/var_tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-nptl/nis:/var_tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-nptl/rt:/var_tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-nptl/resolv:/var_tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-nptl/crypt:/var_tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-nptl/nptl
/var_tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-nptl/nptl/tst-key1
 >
/var_tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-nptl/nptl/tst-key1.out
key_create failed
#################################
and the file
/var_tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-nptl/nptl/tst-key1.out
contains 
###############
created key 0
...
created key 1022
###############

emerge info
Portage 2.0.51.22-r3 (default-linux/x86/2005.0, gcc-3.3.6, glibc-2.3.5-r2,
2.6.14-gentoo-r2 i686)
=================================================================
System uname: 2.6.14-gentoo-r2 i686 AMD Athlon(tm) XP 2500+
Gentoo Base System version 1.6.13
ccache version 2.3 [enabled]
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=athlon-xp -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c
/usr/X11R6/bin/startx /etc/env.d"
CXXFLAGS="-O3 -march=athlon-xp -pipe -fomit-frame-pointer"
DISTDIR="/mnt/gentoo_distfiles"
FEATURES="autoconfig candy ccache distlocks fixpackages sandbox severe sfperms
strict maketest"
GENTOO_MIRRORS=" http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo
http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://gentoo.oregonstate.edu/
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j2"
PKGDIR="/var_tmp/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 a52 aac aalib acl acpi alsa amarok ansi apache2 atlas
auctex audiofile avantgo avi bash-completion bcmath berkdb bitmap-fonts bl blas
blender-game bonobo boundschecking bzip2 bzlib cdda cddb cdio cdparanoia cdr
clisp cmucl cracklib crypt css cups curl dbus directfb divx4linux dnd doc dpms
drac dts dv dvd dvdr dvdread dynagraph edl eds emacs emacs-w3 emboss encode esd
ethereal evo exif expat faac faad fam fame festival ffmpeg fftw flac flash fmod
foomaticdb fortran fpx freetts ftp gcj gcl gd gdbm gif gimp gimpprint ginac
gkrellm glade glut gmp gnome gnomedb gnuplot gpm gprof graphviz gs gsl gstreamer
gtk gtk2 gtkhtml guile hal hbci high-ints howl idn ieee1394 imagemagick imap
imlib imlib2 ipv6 jabber java javascript joystick jpeg jpeg2k junit kde kqemu
lapack latex lcms ldap leim libg++ libgda libwww lirc lm_sensors lzw lzw-tiff
mad makecheck matroska mhash mikmod mime ming mjpeg mmx mmxext mng monkey mono
motif mozcalendar mozilla moznocompose moznoirc moznomail mozp3p mozsvg mp3 mpeg
mpeg2 mpeg4 mpi mplayer mule multi-tty multislot music mysql ncurses netcdf
network neural nls nodrm nptl ofx ogg oggvorbis openal opengl opens oscar pam
pcre pda pdf pdflib perl php pic plotutils png posix povray python qt quicktime
quotes rdesktop readline real recode rrdtool rtc samba screenshot sdl sensord
slang slp smime sndfile sox speex spell sqlite sse sse-filters ssl svg svga szip
tcltk tcpd tetex tga theora tiff transcode truetype truetype-fonts type1
type1-fonts udev unicode usb utf8 v4l v4l2 vcd verbose videos vidix
visualization vlm vorbis win32codecs withsamplescripts wmf xanim xemacs xine
xinerama xml xml2 xmms xosd xpm xprint xrandr xsl xv xvid xvmc yahoo zeroconf
zlib zvbi userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LINGUAS

Comment 3 Kevin F. Quinn (RETIRED) gentoo-dev 2005-11-17 09:19:02 UTC
You'll find this test passes when run standalone.  It seems two keys are used
somewhere along the line when invoked via portage/ebuild.  However invoking the
test executable should create a new process so I don't understand why this occurs. 

Comment 4 Jakub Moc (RETIRED) gentoo-dev 2006-01-28 10:08:26 UTC
*** Bug 120728 has been marked as a duplicate of this bug. ***
Comment 5 Christof Pohl 2006-02-28 12:33:02 UTC
Created attachment 80961 [details, diff]
Patch for glibc's NPTL key tests considering gentoo's sandbox

The attached patch should be a valid fix for this bug. Comments are very welcome! :-)

Problem:
Glibc allocates one thread key when it preloads libsandbox (thanks to Martin Schlemmer for pointing this out in a comment on bug #99092).

Solution:
This patch reduces the value of PTHREAD_KEYS_MAX or POSIX_THREAD_KEYS_MAX (whatever is appropriate) by one in the glibc NPTL key tests sources (tst-key1.c and tst-key4.c). Since sandbox is running fine in its thread during the whole build of glibc, IMO the glibc tests' results should not be compromised by this change. (I'm not a glibc developer, so please don't flame me, if my assumption is wrong!) ;-)

Result:
I have tested this patch successfully with an otherwise unchanged glibc ebuild using Gentoo 2006.0 (x86 athlon-xp, glibc-2.3.6-r3, portage 2.0.54 fully synced, FEATURES="maketest"). I don't expect any problems with different hardware architectures or glibc versions, as long as you discover the same bug in your glibc build tests. ;-)

Additional comments:
Bug #99092 should be marked as a duplicate of this bug.

IMHO, especially the three most important toolchain packages (binutils, gcc and glibc) should not be merged into a running system without having their testsuites passed. Without testing, you put the stability of your whole system at risk!
Comment 6 Kevin F. Quinn (RETIRED) gentoo-dev 2006-02-28 13:12:52 UTC
> Problem:
> Glibc allocates one thread key when it preloads libsandbox

hmm - two things we need to understand here:

1) the glibc ebuild unsets LD_PRELOAD before running 'make check' - that's intended to dump the sandbox.  Why doesn't this release the key?

2) I'm fairly sure I saw a discrepancy of 2, not 1 - I might have been using usersandbox as well, I don't recall.

Did you get a fully clean run of the test phase with glibc?  I think there are a bunch of other nptl tests that fail.
Comment 7 Christof Pohl 2006-02-28 15:13:54 UTC
> 1) the glibc ebuild unsets LD_PRELOAD before running 'make check' - that's
> intended to dump the sandbox.  Why doesn't this release the key?

Sorry, I don't know. I have started using Gentoo (and therefore ebuild) just three days ago. ;-)

> 2) I'm fairly sure I saw a discrepancy of 2, not 1 - I might have been using
> usersandbox as well, I don't recall.

True. The patch fixes two errors in NPTL (tst-key1 and tst-key4).

> Did you get a fully clean run of the test phase with glibc? I think there are
> a bunch of other nptl tests that fail.

Yes, I did. :-) The two tst-key tests were the only ones that failed for me.

Please note that I have build binutils and gcc with CFLAGS="-O2 -pipe" (not using -march or other optimizations like -fomit-frame-pointer and the like) before. I have learned my lesson using Linux From Scratch and DIY-Linux for some time now to not use any further optimization on these packages. ;-)
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2006-04-10 00:48:34 UTC
*** Bug 129439 has been marked as a duplicate of this bug. ***
Comment 9 Abraham Marin Perez 2006-04-19 07:14:55 UTC
Holping this helps, I'll say that the problem doesn't seem to be solved with version 2.3.5-r3. The error message I received:

GCONV_PATH=/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-nptl/iconvdata LC_ALL=C   /var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-nptl/elf/ld-linux.so.2 --library-path /var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-nptl:/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-nptl/math:/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-nptl/elf:/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-nptl/dlfcn:/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-nptl/nss:/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-nptl/nis:/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-nptl/rt:/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-nptl/resolv:/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-nptl/crypt:/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-nptl/nptl /var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-nptl/nptl/tst-key1  > /var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-nptl/nptl/tst-key1.out
key_create failed
make[2]: *** [/var/tmp/portage/glibc-2.3.5-r3/work/build-default-i686-pc-linux-gnu-nptl/nptl/tst-key1.out] Error 1
make[2]: Leaving directory `/var/tmp/portage/glibc-2.3.5-r3/work/glibc-2.3.5/nptl'
make[1]: *** [nptl/tests] Error 2
make[1]: Leaving directory `/var/tmp/portage/glibc-2.3.5-r3/work/glibc-2.3.5'
make: *** [check] Error 2

##########################################

my emerge --info:

Portage 2.0.54 (default-linux/x86/2005.0, gcc-3.3.6, glibc-2.3.5-r2, 2.6.14-gentoo-r5 i686)
=================================================================
System uname: 2.6.14-gentoo-r5 i686 AMD Athlon(tm) XP 1700+
Gentoo Base System version 1.6.14
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
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-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.8.1-r1, 2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=athlon-xp -fomit-frame-pointer -fforce-addr -frerun-loop-opt -floop-optimize -frerun-cse-after-loop -falign-functions=4"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /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/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe -march=athlon-xp -fomit-frame-pointer -fforce-addr -frerun-loop-opt -floop-optimize -frerun-cse-after-loop -falign-functions=4"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict test"
GENTOO_MIRRORS="http://linuv.uv.es/mirror/gentoo/ http://ftp.caliu.info/pub/gentoo/ http://mirror.ovh.net/gentoo-distfiles/"
LANG="es_ES.UTF-8@euro"
LC_ALL="es_ES.UTF-8@euro"
LINGUAS="es en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow X a52 acpi alsa apache2 asf audiofile avi bash-completion bidi bitmap-fonts bzip2 bzlib canna cdr cjk crypt cups curl dga directfb divx4linux doc dri dvb dvd dvdr dvdread eds emboss encode esd ethereal evo exif expat fam fbcon ffmpeg fftw flac foomaticdb freewnn ftp gb gcj gd gdbm gif glut gmp gnome gpm gstreamer gtk gtk2 gtkhtml hal iconv idn imagemagick imlib iodbc isdnlog java jikes jpeg kde lcms libg++ libwww mad memlimit mikmod mime mmx mng motif mozilla mp3 mpeg msn nas nls nptl nsplugin nvidia odbc offensive ogg oggvorbis openal opengl pam pcre pdflib perl png pnp posix ppds pppd quicktime readline samba sdl sharedmem simplexml spell ssl svg svga sysvipc szip tcltk tcpd tetex theora threads tiff truetype truetype-fonts type1-fonts udev unicode usb userlocales videos vorbis win32codecs wmf x86 xine xml xml2 xmms xv xvid zlib video_cards_nvidia linguas_es linguas_en userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LDFLAGS
Comment 10 Ryan Hill (RETIRED) gentoo-dev 2006-10-21 17:45:36 UTC
*** Bug 99092 has been marked as a duplicate of this bug. ***
Comment 11 SpanKY gentoo-dev 2007-03-13 06:33:39 UTC
src_test() is not supported in versions older than glibc-2.5-r1 ... if that version fails a test, then open a new bug report with relevant information