Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 171980 - sys-apps/portage-2.1.2.2 and FEATURES="userfetch" causes resolver failures
Summary: sys-apps/portage-2.1.2.2 and FEATURES="userfetch" causes resolver failures
Status: RESOLVED CANTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-23 23:12 UTC by jieryn
Modified: 2007-03-24 22:01 UTC (History)
0 users

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


Attachments
strace -f emerge pkg -f (strace.log,677.78 KB, text/plain)
2007-03-24 02:30 UTC, jieryn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jieryn 2007-03-23 23:12:45 UTC
Whenever I try to fetch a package through the emerge program, and FEATURES="userfetch" is enabled, wget fails to fetch the package due to "temporary resolver errors". I remove this feature and everything works as expected.

Portage 2.1.2.2 (default-linux/amd64/2006.0, gcc-4.1.2, glibc-2.5-r1, 2.6.20.3 x86_64)
=================================================================
System uname: 2.6.20.3 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System release 1.12.9
Timestamp of tree: Fri, 23 Mar 2007 02:50:01 +0000
dev-java/java-config: 1.3.7, 2.0.31-r5
dev-lang/python:     2.3.6, 2.4.4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.15-r1
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.20-r2
ABI="amd64"
ACCEPT_KEYWORDS="amd64 ~amd64"
ALSA_CARDS="emu10k1"
ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol"
ANT_HOME="/usr/share/ant"
ARCH="amd64"
ASFLAGS_x86="--32"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CCACHE_SIZE="2G"
CDEFINE_amd64="__x86_64__"
CDEFINE_x86="__i386__"
CFLAGS="-march=k8 -O2 -pipe"
CFLAGS_x86="-m32 -L/emul/linux/x86/lib -L/emul/linux/x86/usr/lib"
CHOST="x86_64-pc-linux-gnu"
CHOST_amd64="x86_64-pc-linux-gnu"
CHOST_x86="i686-pc-linux-gnu"
CLASSPATH="."
CLEAN_DELAY="5"
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/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CVS_RSH="ssh"
CXXFLAGS="-march=k8 -O2 -pipe"
DCCC_PATH="/usr/lib/distcc/bin"
DEFAULT_ABI="amd64"
DISTCC_LOG=""
DISTCC_VERBOSE="0"
DISTDIR="/usr/portage/distfiles"
ELIBC="glibc"
EMERGE_DEFAULT_OPTS="--verbose"
EMERGE_WARNING_DELAY="10"
FEATURES="autoconfig buildpkg distlocks metadata-transfer multilib-strict parallel-fetch sandbox sfperms splitdebug strict"
FETCHCOMMAND="/usr/bin/wget -t 5 -T 60 --passive-ftp -P ${DISTDIR} ${URI}"
GCC_SPECS=""
GDK_USE_XFT="1"
GENERATION="2"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/"
G_BROKEN_FILENAMES="1"
G_FILENAME_ENCODING="UTF-8"
HOME="/home/jesse"
INFOPATH="/usr/share/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.17/info:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.2/info"
INPUT_DEVICES="keyboard mouse evdev"
JAVAC="/opt/blackdown-jdk-1.4.2.03/bin/javac"
JAVA_HOME="/opt/blackdown-jdk-1.4.2.03"
JDK_HOME="/opt/blackdown-jdk-1.4.2.03"
KDEDIRS="/usr/kde/3.5:/usr:/usr/local:/usr/kde/3.5:/usr:/usr/local"
KERNEL="linux"
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text"
LDFLAGS_x86="-m elf_i386 -L/emul/linux/x86/lib -L/emul/linux/x86/usr/lib"
LESS="-R -M --shift 5"
LESSOPEN="|lesspipe.sh %s"
LIBDIR_amd64="lib64"
LIBDIR_x86="lib32"
LINGUAS="en"
LOGNAME="root"
MAKEOPTS="-j2"
MANPATH="/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.17/man:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.2/man:/opt/blackdown-jdk-1.4.2.03/man:/etc/java-config/system-vm/man/:/usr/qt/3/doc/man:/usr/qt/3/doc/man"
MULTILIB_ABIS="amd64 x86"
MULTILIB_STRICT_DENY="64-bit.*shared object"
MULTILIB_STRICT_DIRS="/lib /usr/lib /usr/kde/*/lib /usr/qt/*/lib /usr/X11R6/lib"
MULTILIB_STRICT_EXEMPT="(perl5|gcc|gcc-lib|binutils|eclipse-3|debug|portage|ROX-CLib)"
NOCOLOR="true"
OPENGL_PROFILE="xorg-x11"
PAGER="/usr/bin/less"
PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:/opt/blackdown-jdk-1.4.2.03/bin:/opt/blackdown-jdk-1.4.2.03/jre/bin:/usr/qt/3/bin"
PKGDIR="/usr/portage/packages"
PKG_CONFIG_PATH="/usr/qt/3/lib64/pkgconfig:/usr/qt/3/lib32/pkgconfig"
PORTAGE_ARCHLIST="ppc s390 amd64 x86 ppc64 x86-fbsd m68k arm sparc sh mips ia64 alpha ppc-macos hppa sparc-fbsd"
PORTAGE_BINHOST_CHUNKSIZE="3000"
PORTAGE_BIN_PATH="/usr/lib/portage/bin"
PORTAGE_CONFIGROOT="/"
PORTAGE_DEBUG="0"
PORTAGE_DEPCACHEDIR="/var/cache/edb/dep"
PORTAGE_ELOG_CLASSES="warn error log info"
PORTAGE_ELOG_MAILFROM="portage"
PORTAGE_ELOG_MAILSUBJECT="[portage] ebuild log for ${PACKAGE} on ${HOST}"
PORTAGE_ELOG_MAILURI="root"
PORTAGE_ELOG_SYSTEM="save"
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 --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_RSYNC_RETRIES="3"
PORTAGE_TMPDIR="/tmp"
PORTAGE_WORKDIR_MODE="0700"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/ibm-internal /usr/portage/local"
PORT_LOGDIR="/var/log/portage"
PRELINK_PATH_MASK="/usr/lib/klibc"
PYTHONPATH="/usr/lib64/portage/pym"
QMAKESPEC="linux-g++"
QTDIR="/usr/qt/3"
RESUMECOMMAND="/usr/bin/wget -c -t 5 -T 60 --passive-ftp -P ${DISTDIR} ${URI}"
ROOT="/"
ROOTPATH="/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.2:/opt/blackdown-jdk-1.4.2.03/bin:/opt/blackdown-jdk-1.4.2.03/jre/bin:/usr/kde/3.5/sbin:/usr/kde/3.5/bin:/usr/kde/3.5/sbin:/usr/kde/3.5/bin:/usr/qt/3/bin:/usr/qt/3/bin"
RPMDIR="/usr/portage/rpm"
SHELL="/bin/bash"
SUDO_COMMAND="/usr/bin/emerge --info"
SUDO_GID="100"
SUDO_UID="1000"
SUDO_USER="jesse"
SYMLINK_LIB="yes"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
TERM="screen"
USE="X aac alsa amd64 ao apache2 audiofile avahi bash-completion berkdb bitmap-fonts bzip2 cairo cdr cli console cracklib crypt crypto_openssl curl dbus directfb dri dvd dvdread emboss encode expat fam fbcon firefox flac font-server foomaticdb ftp gif gnutls gtk2 hbci hpn iconv imagemagick imap imlib ipv6 isdnlog java java5 javamail javascript jpeg junit key-screen log4j logrotate lzo lzw lzw-tiff mad meanwhile midi mp3 mpd mpeg multiuser nas ncurses network nntp no-seamonkey nptl nptlonly nvidia ofx ogg opengl pam pcre pdf perl png pop pppd python quicktime quotes readline reflection rtc sdl search-screen session spl ssl svg sysfs tcpd tiff transcode truetype truetype-fonts type1-fonts usb v4l v4l2 vcd vhosts vorbis xforms xml xorg xpm xv xvid zlib" ALSA_CARDS="emu10k1" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="nv fbdev"
USER="root"
USERLAND="GNU"
USE_EXPAND="ALSA_CARDS ALSA_PCM_PLUGINS CAMERAS CROSSCOMPILE_OPTS DVB_CARDS ELIBC FCDSL_CARDS FOO2ZJS_DEVICES FRITZCAPI_CARDS INPUT_DEVICES KERNEL LCD_DEVICES LINGUAS LIRC_DEVICES MISDN_CARDS USERLAND VIDEO_CARDS"
USE_EXPAND_HIDDEN="CROSSCOMPILE_OPTS ELIBC KERNEL USERLAND"
USE_ORDER="env:pkg:conf:defaults:pkginternal"
VIDEO_CARDS="nv fbdev"
VMHANDLE="blackdown-jdk-1.4.2"
XARGS="xargs -r"
XDG_DATA_DIRS="/usr/share:/usr/kde/3.5/share:/usr/local/share"


Reproducible: Always
Comment 1 jieryn 2007-03-23 23:18:10 UTC
# emerge mplayer -f
>>> Emerging (1 of 1) media-video/mplayer-1.0_rc2_pre20070321-r2 to /
>>> Downloading 'http://gentoo.osuosl.org/distfiles/mplayer-1.0_rc2_pre20070321.tar.bz2'
--23:16:05--  http://gentoo.osuosl.org/distfiles/mplayer-1.0_rc2_pre20070321.tar.bz2
           => `/usr/portage/distfiles/mplayer-1.0_rc2_pre20070321.tar.bz2'
Resolving gentoo.osuosl.org... failed: Temporary failure in name resolution.

# ping gentoo.osuosl.org
PING ftp-ext.osuosl.org (64.50.236.52) 56(84) bytes of data.
64 bytes from ftp-chi.osuosl.org (64.50.236.52): icmp_seq=1 ttl=53 time=105 ms

# elinks gentoo.osuosl.org
>>> shows me the page as expected

# wget gentoo.osuosl.org
index.html is returned and shown the same page as in elinks above

Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-03-23 23:31:12 UTC
Works just fine here...
Comment 3 Zac Medico gentoo-dev 2007-03-24 00:44:27 UTC
Create an strace log and attach it:

strace -f -o strace.log emerge mplayer -f
Comment 4 jieryn 2007-03-24 02:30:44 UTC
Created attachment 114200 [details]
strace -f emerge pkg -f

I actually just reproduced the problem on a much smaller package because I didn't want to redownload it.. (although, I probably sh/could have just moved the package out of distflies.. oh well. Attaching the strace now..
Comment 5 Zac Medico gentoo-dev 2007-03-24 02:46:33 UTC
13933 open("/etc/resolv.conf", O_RDONLY) = -1 EACCES (Permission denied)

It's not able to access /etc/resolv.conf for some reason.  Check the permissions on each path element and ensure that directories have a+rx and files have a+r. 
Comment 6 Arthur Hagen 2007-03-24 17:43:29 UTC
(In reply to comment #5)
> 13933 open("/etc/resolv.conf", O_RDONLY) = -1 EACCES (Permission denied)
> 
> It's not able to access /etc/resolv.conf for some reason.  Check the
> permissions on each path element and ensure that directories have a+rx and
> files have a+r. 

While this probably fixes the immediate problem, it doesn't address the bigger problem -- a user process circumventing the system resolver routines and trying to read /etc/resolv.conf directly.

wget (and any other utilities I can think of) works just fine from a user account without read access to /etc/resolv.conf, and this is (yet another) nscd problem.  Turn off nscd, and things will work fine again, without having to give the world read access to various /etc files they have no business reading.
(And it will also fix lookup problems where you get your resolving through host files, nis and/or ldap without using a dns, and thus don't have to have a resolv.conf file at all)

Have I mentioned before how nscd is evil and must be destroyed?  :-)
Comment 7 jieryn 2007-03-24 21:27:37 UTC
chmod 0644 /etc/resolv.conf did solve the problem. I did not have nscd running at the time...
Comment 8 Zac Medico gentoo-dev 2007-03-24 22:01:14 UTC
Ok, so the userpriv process needs access to /etc/resolv.conf either directly or through the nscd daemon.  It's a system administration issue that portage can't really do anything about.