Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 252963 - dev-db/libpq-{8.0.15,8.2.7} configure fails thread test ONLY when run inside portage
Summary: dev-db/libpq-{8.0.15,8.2.7} configure fails thread test ONLY when run inside ...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-29 08:52 UTC by Andrew John Hughes
Modified: 2010-02-05 19:39 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew John Hughes 2008-12-29 08:52:57 UTC
checking thread safety of required library functions... no
configure: error:
*** Thread test program failed.  Your platform is not thread-safe.
*** Check the file 'config.log'for the exact reason.

config.log shows the application is causing a segmentation fault as does dmesg:

conftest[371]: segfault at 0 ip 00007fb9e0858cd7 sp 00007fb9de189070 error 4 in libsandbox.so.0.0.0[7fb9e0857000+6000]

But running the same configure command from config.log outside portage succeeds.

Reproducible: Always




Portage 2.2_rc20 (default/linux/amd64/2008.0/desktop, gcc-4.3.3, glibc-2.9_p20081201-r1, 2.6.27-gentoo-r7.rivendell x86_64)
=================================================================
System uname: Linux-2.6.27-gentoo-r7.rivendell-x86_64-Intel-R-_Xeon-R-_CPU_X5482_@_3.20GHz-with-glibc2.2.5
Timestamp of tree: Mon, 29 Dec 2008 01:30:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7-r1, 2.1.6-r1
dev-lang/python:     2.5.2-r7
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.2
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=core2 -ggdb -mno-tls-direct-seg-refs"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CPPFLAGS="-I/home/andrew/build/include"
CXXFLAGS="-O2 -pipe -march=core2 -ggdb -mno-tls-direct-seg-refs"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages loadpolicy parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.bytemark.co.uk/gentoo/ ftp://mirror.bytemark.co.uk/gentoo/ http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/ ftp://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/ http://mirror.qubenet.net/mirror/gentoo/ ftp://mirror.qubenet.net/mirror/gentoo/ http://gentoo.virginmedia.com/ ftp://gentoo.virginmedia.com/sites/gentoo "
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en_GB"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/home/andrew/projects/gentoo/xmmsroot2-overlay /home/andrew/projects/gentoo/java-overlay /home/andrew/projects/gentoo/fixes-overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 avahi bash-completion berkdb bindist bluetooth branding bzip2 cairo caps cddb cdparanoia cdr cli cracklib crypt cups curl cvs dbus dga dirac djvu dri dts dv dvb dvd dvdr dvdread eds emacs emboss encode evo exif fam ffmpeg fftw firefox flac fontconfig fortran ftp gcj gdbm gif gimp gnome gnutls gpm graphviz gstreamer gtk gtkhtml hal iconv idn ieee1394 imagemagick imap ipv6 isdnlog java javascript jbig jpeg jpeg2k ladspa lame latex lcms libass libcaca libnotify libsamplerate lzo mad mbox midi mikmod mmap mmx mng mp3 mpeg mudflap multilib musepack musicbrainz nas ncurses nis nls nntp nptl nptlonly nsplugin ogg openexr opengl openmp pam pch pcre pdf perl png policykit postgres ppds pppd pulseaudio python qt3 qt3support qt4 quicktime readline reflection sasl schroedinger sdl selinux session sndfile sox speex spell spl sse sse2 ssl ssse3 startup-notification subversion svg sysfs taglib tcpd tga theora threads tiff truetype unicode usb vorbis wavpack wmf x264 xattr xcomposite xft xml xmmsroot2 xorg xosd xprint xscreensaver xulrunner xv xvid yahoo zeroconf zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias 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 rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB" USERLAND="GNU" VIDEO_CARDS="radeonhd fglrx"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Andrew John Hughes 2008-12-29 08:55:47 UTC
Occurs with both 8.0.15 (stable) and 8.2.7.
Comment 2 Wormo (RETIRED) gentoo-dev 2008-12-29 20:42:40 UTC
This looks like the multi-thread issue of bug 235581, which is supposed to have been fixed in recent versions of sys-apps/sandbox (1.3 series). Could you try upgrading your sandbox to ~amd64 version and see if that works?
Comment 3 Bas 2009-03-21 08:36:16 UTC
works with sys-apps/sandbox-1.3.9
Comment 4 Henrik Grubbström 2009-08-09 12:25:57 UTC
This issue seems to have reemerged with dev-db/libpq-8.1.11 and sys-apps/sandbox-1.6-r2:

checking thread safety of required library functions... no
configure: error:
*** Thread test program failed.  Your platform is not thread-safe.
*** Check the file 'config.log'for the exact reason.
***
*** You can use the configure option --enable-thread-safety-force
*** to force threads to be enabled.  However, you must then run
*** the program in src/tools/thread and add locking function calls
*** to your applications to guarantee thread safety.

Running the configure script outside portage works.
Comment 5 Henrik Grubbström 2009-08-09 12:49:39 UTC
dmesg says:
conftest[24763]: segfault at 7f021dfb8000 ip 00007f021dbf6e59 sp 00007fff26018530 error 4 in libsandbox.so[7f021dbf3000+c000]

Emerging with FEATURES=-sandbox succeeds.
Comment 6 Jarkko Mäntylä 2009-08-19 00:36:47 UTC
(In reply to comment #4)
> This issue seems to have reemerged with dev-db/libpq-8.1.11 and
> sys-apps/sandbox-1.6-r2:
> 

sandbox-1.6-r2 failed for me too, but with 2.0 (~amd64) configure succeeded.
Comment 7 Péter Werner 2009-08-31 14:31:08 UTC
Same here (amd64, dev-db/libpq-8.1.11, sandbox-1.6-r2):

configure: error:
*** Thread test program failed.  Your platform is not thread-safe.

/var/log/kernel/current:
Aug 31 15:59:42 [kernel] udev: starting version 141
Aug 31 16:03:22 [kernel] ReiserFS: dm-1: found reiserfs format "3.6" with standard journal
Aug 31 16:03:22 [kernel] ReiserFS: dm-1: using ordered data mode
Aug 31 16:03:22 [kernel] ReiserFS: dm-1: journal params: device dm-1, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
Aug 31 16:03:22 [kernel] ReiserFS: dm-1: checking transaction log (dm-1)
Aug 31 16:03:22 [kernel] ReiserFS: dm-1: Using r5 hash to sort names
Aug 31 16:03:32 [kernel] end_request: I/O error, dev fd0, sector 0
Aug 31 16:04:39 [kernel] conftest[19240]: segfault at 7f638a18b010 ip 00007f6388143a40 sp 0000000040dccf40 error 4 in libc-2.8.so[7f6388105000+14b000]

workaroud: FEATURES=-sandbox
Comment 8 Jake Goulding 2009-11-03 15:44:32 UTC
Same here (amd64, dev-db/libpq-8.1.11, sandbox-1.6-r2):

/var/tmp/portage/dev-db/libpq-8.1.11/temp/build.log:

checking thread safety of required library functions... no
configure: error:
*** Thread test program failed.  Your platform is not thread-safe.
*** Check the file 'config.log'for the exact reason.

dmesg:

conftest[32359]: segfault at 48 ip 00007fdb297b43b7 sp 00007fdb28d11f40 error 4 in libc-2.9.so[7fdb29777000+149000]
conftest[8186]: segfault at 0 ip 00007f58706b0b4c sp 00007f586e7b1040 error 6 in libsandbox.so[7f58706ad000+c000]
Comment 9 edoceo 2009-12-28 08:07:28 UTC
I see this bug too - i686-pc-linux-gnu-gcc, sandbox-1.6-r2, dev-db/libpq-8.2.14.
Using FEATURES="-sandbox" and the build succeeds, otherwise I get the segfault, while building "./src/test/thread/thread_test.c"

From Log:
configure:23081: i686-pc-linux-gnu-gcc -o conftest -O2 -march=i686 -pipe -fomit-frame-pointer -Wall -Wmissing-prototypes -Wpoi
nter-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv  -pthread  -D_REENTRANT -D_THREA
D_SAFE -D_POSIX_PTHREAD_SEMANTICS -DIN_CONFIGURE -D_GNU_SOURCE  -Wl,-O1  conftest.c -lpam -lssl -lcrypto -lz -lreadline -lcryp
t -ldl -lm   -lpthread    >&5
In file included from conftest.c:152:
./src/test/thread/thread_test.c: In function 'main':
./src/test/thread/thread_test.c:164: warning: ignoring return value of 'dup', declared with attribute warn_unused_result
configure:23084: $? = 0
configure:23086: ./conftest
./configure: line 23087: 21621 Segmentation fault      ./conftest$ac_exeext
configure:23089: $? = 139
configure: program exited with status 139
-----

Emerge Info
hydrogen ~ # emerge --info
Portage 2.1.6.13 (default/linux/x86/10.0/server, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.27-gentoo-r8-edoceo i686)
=================================================================
System uname: Linux-2.6.27-gentoo-r8-edoceo-i686-Intel-R-_Xeon-TM-_CPU_2.80GHz-with-gentoo-1.12.13
Timestamp of tree: Sun, 27 Dec 2009 09:00:24 +0000
app-shells/bash:     4.0_p35
dev-lang/python:     2.6.4
dev-python/pycrypto: 2.0.1-r8
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=i686 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--alphabetical --nospinner"
FEATURES="distlocks fixpackages nodoc noinfo parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://lithium.edoceo.com/element/"
USE="acl apache2 berkdb bzip2 cli cracklib crypt cups cxx dri fortran gdbm gpm iconv ipv6 ldap modules mudflap ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection session snmp spl ssl sysfs tcpd truetype unicode x86 xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias 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 rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY



Comment 10 Jon Malachowski 2010-02-05 19:39:20 UTC
sandbox 2.1 fixed this for me.  Thanks for the solutions.
amd64/libpq 8.0.15