emerge of dev-libs/ace-5.6.5-r2 hangs forever on configure state: ... checking if a UNIX International thread library was found... no checking for pthread_join null status pointer support... yes checking for mutex timeouts... i have found this happend with glibc-2.10.1 i tried to build ace-5.6.5-r2 on other hosts, with glibc-2.6.1 and glibc-2.9 - there was no problem. building dev-libs/ace with glibc-2.10.1 can be continued when hanging by killing ./conftest process. strace of ./conftest process: ... futex(0x804a038, 0x180 /* FUTEX_??? */, 2, {1246470807, 0}) = -1 ENOSYS (Function not implemented) ... (this string repeats infinitely) ps. i did not try to emerge early versions of ace.
Please post your "emerge --info" and attach the config.log file of the hanging emerge to this bug.
Reopen this bug when you provide the requested information.
(In reply to comment #0) > emerge of dev-libs/ace-5.6.5-r2 hangs forever on configure state: > ... > checking if a UNIX International thread library was found... no > checking for pthread_join null status pointer support... yes > checking for mutex timeouts... > > i have found this happend with glibc-2.10.1 > i tried to build ace-5.6.5-r2 on other hosts, with glibc-2.6.1 and glibc-2.9 - > there was no problem. > > building dev-libs/ace with glibc-2.10.1 can be continued when hanging by > killing ./conftest process. > strace of ./conftest process: > ... > futex(0x804a038, 0x180 /* FUTEX_??? */, 2, {1246470807, 0}) = -1 ENOSYS > (Function not implemented) > ... (this string repeats infinitely) > > ps. > i did not try to emerge early versions of ace. > I encounter the same problem(glibc2.10.1). but it's ok at another machine with glibc 2.9_p20081201-r2 Last I have to add --disable-pthreads to compile ACE5.6 or ACE5.7 find the conftest.cc(see flollows) in configure which will hang up when run configure. //------------ #define _REENTRANT #endif #include <pthread.h> /* _THREAD_SAFE is defined in <pthread.h> on some platforms. */ #ifndef _THREAD_SAFE #define _THREAD_SAFE #endif #include <stdio.h> #include <errno.h> #include <sys/time.h> #include <stdlib.h> #ifndef ACE_LACKS_UNISTD_H # include <unistd.h> #endif pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; #ifdef __cplusplus extern "C" #endif void *threadFunc (void *parm) { int rc; int i; struct timespec deltatime; struct timeval tv; if (gettimeofday (&tv, 0) != 0) { return 0; } deltatime.tv_sec = tv.tv_sec + 5; deltatime.tv_nsec = 0; rc = pthread_mutex_timedlock (&mutex, &deltatime); if (rc != ETIMEDOUT) { /* printf("Got an incorrect return code from pthread_mutex_timedlock\n"); */ } return 0; } int main (void) { int rc =0; pthread_t thread; rc = pthread_mutex_lock (&mutex); if (rc != 0) { exit (-1); } rc = pthread_create (&thread, NULL, threadFunc, NULL); if (rc != 0) { exit (-1); } rc = pthread_join (thread, NULL); if (rc != 0) { exit (-1); } pthread_mutex_destroy (&mutex); return 0; }
(In reply to comment #0) > emerge of dev-libs/ace-5.6.5-r2 hangs forever on configure state: > ... > checking if a UNIX International thread library was found... no > checking for pthread_join null status pointer support... yes > checking for mutex timeouts... > > i have found this happend with glibc-2.10.1 > i tried to build ace-5.6.5-r2 on other hosts, with glibc-2.6.1 and glibc-2.9 - > there was no problem. > > building dev-libs/ace with glibc-2.10.1 can be continued when hanging by > killing ./conftest process. > strace of ./conftest process: > ... > futex(0x804a038, 0x180 /* FUTEX_??? */, 2, {1246470807, 0}) = -1 ENOSYS > (Function not implemented) > ... (this string repeats infinitely) > > ps. > i did not try to emerge early versions of ace. > Maybe a glibc bug? see below: http://sources.redhat.com/bugzilla/show_bug.cgi?id=10578 And bug #279610 is duplicated I think.
I have same problem. sys-libs/glibc: 2.10.1 emerge --info: Portage 2.1.6.13 (default/linux/x86/2008.0, gcc-4.3.3, glibc-2.10.1-r0, 2.6.30-gentoo-r5 i686) ================================================================= System uname: Linux-2.6.30-gentoo-r5-i686-AMD_Duron-tm-_processor-with-gentoo-2.0.1 Timestamp of tree: Thu, 24 Sep 2009 08:30:01 +0000 distcc[25197] (dcc_set_trace_from_env) ERROR: failed to open logfile /tmp/distcc.log: Permission denied [enabled] ccache version 2.4 [enabled] app-shells/bash: 4.0_p33 dev-lang/python: 2.5.4-r2, 2.6.2-r1 dev-util/ccache: 2.4-r8 sys-apps/baselayout: 2.0.1 sys-apps/openrc: 0.4.3-r3 sys-apps/sandbox: 2.1 sys-devel/autoconf: 2.63-r1 sys-devel/automake: 1.4_p6, 1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11 sys-devel/binutils: 2.19.1-r1 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6a virtual/os-headers: 2.6.30-r1 ACCEPT_KEYWORDS="x86 ~x86" 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 auth_digest 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 proxy proxy_connect proxy_ftp proxy_http" ARCH="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=athlon-tbird -pipe" CHOST="i686-pc-linux-gnu" CLEAN_DELAY="5" COLLISION_IGNORE="/lib/modules" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /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" CVS_RSH="ssh" CXXFLAGS="-O2 -march=athlon-tbird -pipe" DCCC_PATH="/usr/lib/distcc/bin" DISPLAY="" DISTCC_LOG="/tmp/distcc.log" DISTCC_VERBOSE="" DISTDIR="/usr/portage/distfiles" EDITOR="/bin/nano" ELIBC="glibc" EMERGE_DEFAULT_OPTS="--verbose" EMERGE_WARNING_DELAY="10" FEATURES="ccache distcc distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch" FETCHCOMMAND="/usr/bin/wget -t 5 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}"" GCC_SPECS="" GENTOO_MIRRORS="ftp://ftp.corbina.ru/pub/Linux/gentoo/ ftp://ftp.fi.debian.org/pub/gentoo/" HG="/usr/bin/hg" HOME="/home/mars" INFOPATH="/usr/share/info:/usr/share/binutils-data/i686-pc-linux-gnu/2.19.1/info:/usr/share/gcc-data/i486-pc-linux-gnu/4.1.2/info:/usr/share/gcc-data/i686-pc-linux-gnu/4.3.3/info" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LANG="ru_RU.UTF-8" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LC_NUMERIC="C" LDFLAGS="-Wl,-O1" LESS="-R -M --shift 5" LESSOPEN="|lesspipe.sh %s" LINGUAS="ru" LOGNAME="mars" LS_COLORS="rs=0:di=01;34:ln=01;36:hl=44;37:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.pdf=00;32:*.ps=00;32:*.txt=00;32:*.patch=00;32:*.diff=00;32:*.log=00;32:*.tex=00;32:*.doc=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:" MAIL="/var/mail/mars" MAKEOPTS="-j5" MANPATH="/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/i686-pc-linux-gnu/2.19.1/man:/usr/share/gcc-data/i486-pc-linux-gnu/4.1.2/man:/usr/share/gcc-data/i686-pc-linux-gnu/4.3.3/man:/usr/lib/php5/man/" NETBEANS="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OLDPWD="/home/ftp/site-mf" PAGER="/usr/bin/less" PATH="/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i486-pc-linux-gnu/gcc-bin/4.1.2:/usr/i686-pc-linux-gnu/gcc-bin/4.3.3" PKGDIR="/usr/portage/packages" PORTAGE_ARCHLIST="ppc x86-openbsd ppc-openbsd ppc64 x86-winnt x86-fbsd ppc-aix alpha arm x86-freebsd s390 amd64 x86-macos x64-openbsd ia64-hpux hppa x86-netbsd amd64-linux ia64-linux x86 sparc-solaris x64-freebsd sparc64-solaris x86-linux x64-macos sparc m68k-mint ia64 mips ppc-macos x86-interix hppa-hpux amd64-fbsd x64-solaris mips-irix m68k sh x86-solaris sparc-fbsd" PORTAGE_BINHOST_CHUNKSIZE="3000" PORTAGE_BIN_PATH="/usr/lib/portage/bin" PORTAGE_COMPRESS_EXCLUDE_SUFFIXES="css gif htm[l]? jp[e]?g js pdf png" PORTAGE_CONFIGROOT="/" PORTAGE_DEBUG="0" PORTAGE_DEPCACHEDIR="/var/cache/edb/dep" PORTAGE_ELOG_CLASSES="log warn error" PORTAGE_ELOG_MAILFROM="portage@localhost" PORTAGE_ELOG_MAILSUBJECT="[portage] ebuild log for ${PACKAGE} on ${HOST}" PORTAGE_ELOG_MAILURI="root" PORTAGE_ELOG_SYSTEM="save_summary echo" PORTAGE_FETCH_CHECKSUM_TRY_MIRRORS="5" PORTAGE_FETCH_RESUME_MIN_SIZE="350K" PORTAGE_GID="250" PORTAGE_INST_GID="0" PORTAGE_INST_UID="0" PORTAGE_PYM_PATH="/usr/lib/portage/pym" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_RSYNC_RETRIES="3" PORTAGE_TMPDIR="/var/tmp" PORTAGE_VERBOSE="1" PORTAGE_WORKDIR_MODE="0700" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" PROFILE_ONLY_VARIABLES="ARCH ELIBC KERNEL USERLAND" PWD="/home/mars" RESUMECOMMAND="/usr/bin/wget -c -t 5 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}"" ROOT="/" ROOTPATH="/opt/bin:/usr/i486-pc-linux-gnu/gcc-bin/4.1.2:/usr/i686-pc-linux-gnu/gcc-bin/4.3.3" RPMDIR="/usr/portage/rpm" SHELL="/bin/bash" SHLVL="1" SSH_CLIENT="192.168.0.10 55312 22" SSH_CONNECTION="192.168.0.10 55312 192.168.0.1 22" SSH_TTY="/dev/pts/1" STY="5261.pts-1.server" SYNC="rsync://rsync.gentoo.org/gentoo-portage" TERM="screen" TERMCAP="SC|screen|VT 100/ANSI X3.64 virtual terminal:\ :DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:bs:bt=\E[Z:\ :cd=\E[J:ce=\E[K:cl=\E[H\E[J:cm=\E[%i%d;%dH:ct=\E[3g:\ :do=^J:nd=\E[C:pt:rc=\E8:rs=\Ec:sc=\E7:st=\EH:up=\EM:\ :le=^H:bl=^G:cr=^M:it#8:ho=\E[H:nw=\EE:ta=^I:is=\E)0:\ :li#82:co#212:am:xn:xv:LP:sr=\EM:al=\E[L:AL=\E[%dL:\ :cs=\E[%i%d;%dr:dl=\E[M:DL=\E[%dM:dc=\E[P:DC=\E[%dP:\ :im=\E[4h:ei=\E[4l:mi:IC=\E[%d@:ks=\E[?1h\E=:\ :ke=\E[?1l\E>:vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l:\ :ti=\E[?1049h:te=\E[?1049l:us=\E[4m:ue=\E[24m:so=\E[3m:\ :se=\E[23m:mb=\E[5m:md=\E[1m:mr=\E[7m:me=\E[m:ms:\ :Co#8:pa#64:AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:AX:\ :vb=\Eg:G0:as=\E(0:ae=\E(B:\ :ac=\140\140aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~..--++,,hhII00:\ :k0=\E[10~:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:\ :k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:\ :F1=\E[23~:F2=\E[24~:kb=^H:kB=\E[Z:kh=\E[1~:@1=\E[1~:\ :kH=\E[4~:@7=\E[4~:kN=\E[6~:kP=\E[5~:kI=\E[2~:kD=\E[3~:\ :ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:km:" USE="acl adns bash-completion berkdb bzip2 cgi cjk clamav cli cracklib crypt cups curl dri fastcgi fortran ftp gd gdbm gnutls gzip hardened iconv idn ipv6 isdnlog jpeg libssh2 logrotate modules mudflap multiuser ncurses network-cron nls nptl nptlonly openmp pam pcre pdo perl php png pppd python readline reflection session smi soap sockets spell spl sqlite ssl svg sysfs tcpd truetype unicode vim-pager vim-syntax x86 xinetd xml xmlrpc xorg xsl zip 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 auth_digest 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 proxy proxy_connect proxy_ftp proxy_http" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo" USER="mars" USERLAND="GNU" USE_EXPAND="ALSA_CARDS ALSA_PCM_PLUGINS APACHE2_MODULES APACHE2_MPMS CAMERAS CROSSCOMPILE_OPTS DVB_CARDS ELIBC FCDSL_CARDS FOO2ZJS_DEVICES FRITZCAPI_CARDS INPUT_DEVICES KERNEL LCD_DEVICES LINGUAS LIRC_DEVICES MISDN_CARDS NETBEANS_MODULES QEMU_SOFTMMU_TARGETS QEMU_USER_TARGETS SANE_BACKENDS USERLAND VIDEO_CARDS" USE_EXPAND_HIDDEN="CROSSCOMPILE_OPTS ELIBC KERNEL USERLAND" USE_ORDER="env:pkg:conf:defaults:pkginternal:env.d" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo" WINDOW="0" _="/usr/bin/emerge"
Created attachment 205137 [details] build log for dev-libs/ace-5.7.2 Please reopen bug.
This bug appears to be same as bug 279610. I narrowed down the problem to the function pthread_mutex_timedlock (&mutex, &sometime); which, in principle, should time out and return with an ETIMEDOUT code when it cannot apply a lock on "mutex" before "sometime" is reached. For some reason, it never times out (nor does it return).
When I run strace on the small test used by configure, here is what I get: ... futex(0xb770b79c, FUTEX_WAKE_PRIVATE, 2147483647) = 0 mmap2(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0xb6c8a000 brk(0) = 0x804b000 brk(0x806c000) = 0x806c000 mprotect(0xb6c8a000, 4096, PROT_NONE) = 0 clone(child_stack=0xb748a484, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0xb748abd8, {entry_number:6, base_addr:0xb748ab70, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}, child_tidptr=0xb748abd8) = 10241 futex(0xb748abd8, FUTEX_WAIT, 10241, NULL ^^^^ Note this ! From the documentation for futex: int futex(int *uaddr, int op, int val, const struct timespec *timeout, int *uaddr2, int val3); .... FUTEX_WAIT This operation atomically verifies that the futex address uaddr still contains the value val, and sleeps awaiting FUTEX_WAKE on this futex address. If the timeout argument is non-NULL,its contents describe the maximum duration of the wait, which is infinite otherwise. The arguments uaddr2 and val3 are ignored. .... It seems that pthread_mutex_timedlock() calls futex() but fails to correctly pass down the timeout argument.
(In reply to comment #0) > emerge of dev-libs/ace-5.6.5-r2 hangs forever on configure state: > ... > checking if a UNIX International thread library was found... no > checking for pthread_join null status pointer support... yes > checking for mutex timeouts... > > i have found this happend with glibc-2.10.1 > i tried to build ace-5.6.5-r2 on other hosts, with glibc-2.6.1 and glibc-2.9 - > there was no problem. > > building dev-libs/ace with glibc-2.10.1 can be continued when hanging by > killing ./conftest process. > strace of ./conftest process: > ... > futex(0x804a038, 0x180 /* FUTEX_??? */, 2, {1246470807, 0}) = -1 ENOSYS > (Function not implemented) > ... (this string repeats infinitely) > > ps. > i did not try to emerge early versions of ace. > It builds well with sys-libs/glibc-2.11 :-)