Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 542052 - sys-apps/portage-2.2.17: emerge sock.bind PermissionError when performing world update with FEATURES=network-sandbox
Summary: sys-apps/portage-2.2.17: emerge sock.bind PermissionError when performing wor...
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
Depends on:
Blocks: 484436
  Show dependency tree
Reported: 2015-03-04 02:32 UTC by Mike Gilbert
Modified: 2015-03-04 21:51 UTC (History)
1 user (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Mike Gilbert gentoo-dev 2015-03-04 02:32:45 UTC
One thing to note is that I have another emerge instance building chromium concurrently with this world update.

% sudo emerge --update --deep --changed-use --ask --verbose --exclude=www-client/chromium

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U  ] app-admin/logrotate-3.8.9::gentoo [3.8.8::gentoo] USE="acl (-selinux)" 76 KiB
[ebuild     U  ] sys-apps/kmod-20::gentoo [19::gentoo] USE="lzma tools zlib -debug -doc -python -static-libs" PYTHON_TARGETS="python2_7 python3_3 python3_4" 428 KiB
[ebuild     U  ] app-misc/pax-utils-1.0::gentoo [0.9.2::gentoo] USE="caps -python" 605 KiB
[ebuild     U  ] app-portage/ufed-0.92::gentoo [0.91::gentoo] 61 KiB
[ebuild     U  ] net-dns/libidn-1.30::gentoo [1.29::gentoo] USE="nls -doc -emacs -java -mono -static-libs" ABI_X86="32 (64) (-x32)" 3,394 KiB
[ebuild     U  ] sys-apps/man-pages-3.81::gentoo [3.80::gentoo] USE="nls" LINGUAS="-da -de -fr -it -ja -nl -pl -ro -ru -zh_CN" 1,314 KiB
[ebuild     U  ] dev-python/sip-4.16.6:0/11::gentoo [4.16.5:0/11::gentoo] USE="-debug -doc" PYTHON_TARGETS="python2_7 python3_3 python3_4" 842 KiB
[ebuild     U  ] app-admin/eselect-opengl-1.3.1-r4::gentoo [1.3.1-r3::gentoo] 0 KiB
[ebuild     U  ] dev-python/numpy-1.9.2::gentoo [1.9.1::gentoo] USE="-doc -lapack {-test}" PYTHON_TARGETS="python2_7 python3_3 python3_4" 3,893 KiB
[ebuild     U  ] app-crypt/pinentry-0.9.0-r2::gentoo [0.9.0-r1::gentoo] USE="caps gtk ncurses qt4 -clipboard -static" 0 KiB
[ebuild     U  ] www-client/google-chrome-41.0.2272.76_p1::gentoo [40.0.2214.115_p1::gentoo] USE="plugins" LINGUAS="-am -ar -bg -bn -ca -cs -da -de -el -en_GB -es -es_LA -et -fa -fi -fil -fr -gu -he -hi -hr -hu -id -it -ja -kn -ko -lt -lv -ml -mr -ms -nb -nl -pl -pt_BR -pt_PT -ro -ru -sk -sl -sr -sv -sw -ta -te -th -tr -uk -vi -zh_CN -zh_TW" 0 KiB
[ebuild     U  ] www-client/google-chrome-unstable-42.0.2311.15_p1::gentoo [42.0.2311.11_p1::gentoo] USE="plugins" LINGUAS="-am -ar -bg -bn -ca -cs -da -de -el -en_GB -es -es_LA -et -fa -fi -fil -fr -gu -he -hi -hr -hu -id -it -ja -kn -ko -lt -lv -ml -mr -ms -nb -nl -pl -pt_BR -pt_PT -ro -ru -sk -sl -sr -sv -sw -ta -te -th -tr -uk -vi -zh_CN -zh_TW" 0 KiB
[ebuild     U  ] www-client/firefox-36.0-r1::gentoo [36.0::gentoo] USE="dbus gmp-autoupdate jit%* minimal startup-notification -bindist -custom-cflags -custom-optimization -debug -gstreamer -hardened (-pgo) -pulseaudio (-selinux) -system-cairo -system-icu -system-jpeg -system-libvpx -system-sqlite {-test} -wifi" LINGUAS="-af -ar -as -ast -be -bg -bn_BD -bn_IN -br -bs -ca -cs -cy -da -de -el -en_GB -en_ZA -eo -es_AR -es_CL -es_ES -es_MX -et -eu -fa -fi -fr -fy_NL -ga_IE -gd -gl -gu_IN -he -hi_IN -hr -hu -hy_AM -id -is -it -ja -kk -km -kn -ko -lt -lv -mai -mk -ml -mr -nb_NO -nl -nn_NO -or -pa_IN -pl -pt_BR -pt_PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv_SE -ta -te -th -tr -uk -vi -xh -zh_CN -zh_TW" 0 KiB
[ebuild     U  ] net-ftp/filezilla-3.10.2::gentoo [] USE="dbus nls (-aqua) {-test}" 4,134 KiB
[ebuild   R    ] media-video/vlc-2.2.0:0/5-7::gentoo  USE="X a52 alsa avcodec avformat cdda dbus dts dvbpsi dvd encode ffmpeg flac fontconfig gcrypt jpeg kde libav libnotify mp3 mpeg mtp ncurses ogg opengl png qt4 sdl swscale taglib theora truetype udev vaapi vorbis x264 xcb xml xv -aalib (-altivec) -atmo (-audioqueue) -avahi -bidi -bluray -cddb -chromaprint -dc1394 -debug -directfb (-directx) -dvb (-dxva2) -faad -fdk -fluidsynth -gme -gnome -gnutls -growl -httpd -ieee1394 -jack -kate -libass -libcaca -libsamplerate -libtar -libtiger -linsys -lirc -live -lua (-macosx-dialog-provider) (-macosx-eyetv) (-macosx-qtkit) (-macosx-quartztext) -matroska (-media-library) -modplug -musepack (-neon) -omxil -opencv -optimisememory -opus -postproc* -projectm -pulseaudio -qt5 -rdp -rtsp -run-as-root -samba -schroedinger -sdl-image -sftp -shout -sid -skins -speex -svg {-test} -tremor -twolame -upnp -v4l -vcdx -vdpau -vlm -vnc -vpx -wma-fixed -x265 -zvbi" CPU_FLAGS_X86="mmx sse" 0 KiB
[ebuild    FU  ] dev-java/oracle-jdk-bin- [] USE="X alsa fontconfig nsplugin (-aqua) -derby -doc -examples -jce -pax_kernel (-selinux) -source" 169,159 KiB

Total: 16 packages (15 upgrades, 1 reinstall), Size of downloads: 183,901 KiB
Fetch Restriction: 1 package (1 unsatisfied)

Fetch instructions for dev-java/oracle-jdk-bin-
Traceback (most recent call last):
  File "/usr/lib/portage/python3.4/", line 213, in <module>
    asyncio.start_unix_server(s.handle_proxy_conn, sys.argv[1], loop=loop))
  File "/usr/lib64/python3.4/asyncio/", line 316, in run_until_complete
    return future.result()
  File "/usr/lib64/python3.4/asyncio/", line 275, in result
    raise self._exception
  File "/usr/lib64/python3.4/asyncio/", line 238, in _step
    result = next(coro)
  File "/usr/lib64/python3.4/asyncio/", line 134, in start_unix_server
    return (yield from loop.create_unix_server(factory, path, **kwds))
  File "/usr/lib64/python3.4/asyncio/", line 141, in coro
    res = func(*args, **kw)
  File "/usr/lib64/python3.4/asyncio/", line 256, in create_unix_server
PermissionError: [Errno 13] Permission denied
 * Oracle requires you to download the needed files manually after
 * accepting their license through a javascript capable web browser.
 * Download the following files:
 *   jdk-8u40-linux-x64.tar.gz
 * at ''
 * and move them to '/var/portage/distfiles'
 * If the above mentioned urls do not point to the correct version anymore,
 * please download the files from Oracle's java download archive:
Comment 1 Mike Gilbert gentoo-dev 2015-03-04 02:34:29 UTC
Stopping the other emerge instance seems to have no effect.
Comment 2 Mike Gilbert gentoo-dev 2015-03-04 02:36:49 UTC
Portage 2.2.17 (python 3.4.3-final-0, default/linux/amd64/13.0/desktop/kde/systemd, gcc-4.9.2, glibc-2.20-r2, 3.18.8+ x86_64)
System uname: Linux-3.18.8+-x86_64-AMD_Phenom-tm-_II_X6_1055T_Processor-with-gentoo-2.2
KiB Mem:    32950348 total,  23695800 free
KiB Swap:          0 total,         0 free
sh bash 4.3_p33-r2
ld GNU ld (Gentoo 2.25 p1.0) 2.25
app-shells/bash:          3.2_p57::gentoo, 4.3_p33-r2::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.9-r2::gentoo, 3.2.5-r6::gentoo, 3.3.5-r1::gentoo, 3.4.3::gentoo
dev-util/cmake:           3.1.0::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25::gentoo
sys-devel/gcc:            4.7.4::gentoo, 4.8.4::gentoo, 4.9.2::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 3.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.20-r2::gentoo

    location: /home/floppym/gentoo-x86
    sync-cvs-repo: gentoo-x86
    sync-type: cvs
    priority: -1000

    location: /home/floppym/overlays/crossdev
    masters: gentoo

    location: /home/floppym/overlays/floppym
    masters: gentoo

    location: /home/floppym/overlays/grub2-themes-overlay
    masters: gentoo

    location: /home/floppym/overlays/local
    masters: gentoo

    location: /var/lib/layman/mgorny
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-O2 -pipe -march=native -frecord-gcc-switches -Wall"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /usr/share/themes/oxygen-gtk/gtk-3.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /usr/share/themes"
CXXFLAGS="-O2 -pipe -march=native -frecord-gcc-switches -Wall"
EMERGE_DEFAULT_OPTS="--autounmask=n --binpkg-respect-use=y --binpkg-changed-deps=y --dynamic-deps=n --with-bdeps=y --quiet-build=n --quiet-fail=y --jobs=6"
FCFLAGS="-O2 -pipe -march=native -frecord-gcc-switches -Wall"
FEATURES="assume-digests binpkg-logs buildpkg cgroup clean-logs config-protect-if-modified distlocks ebuild-locks fakeroot fixlafiles ipc-sandbox network-sandbox news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms sign strict unknown-features-warn unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe -march=native -frecord-gcc-switches -Wall"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 berkdb branding bzip2 cairo caps cdda cdr cli cpudetection cracklib crypt css cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam ffmpeg filecaps firefox flac fontconfig fortran gdbm gif glamor gles gpm gtk iconv idn imap ipv6 jpeg kde kipi lcms libav libnotify lzma mad mmx mmxext mng modules mp3 mp4 mpeg mtp multilib ncurses nls nptl nsplugin offensive ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds qt3support qt4 readline sdl semantic-desktop session spell sse sse2 sse3 sse4a ssl startup-notification suid svg systemd taglib theora threads tiff truetype udev udisks unicode upower usb vaapi vdpau vim-syntax vorbis wxwidgets x264 xattr xcb xcomposite xft xinerama xml xscreensaver xv xvid zlib zsh-completion" ABI_X86="32 64" 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" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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_fcgi" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a" DRACUT_MODULES="btrfs systemd" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 emu pc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3 python3_4 pypy pypy3" QEMU_SOFTMMU_TARGETS="arm i386 x86_64" QEMU_USER_TARGETS="arm i386 x86_64" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.7 3.3"
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-03-04 08:39:31 UTC
Hmm, do you have restricted access to your PORTAGE_TMPDIR?
Comment 4 Thomas Deutschmann gentoo-dev Security 2015-03-04 11:40:57 UTC
I have the same problem, "triggered" by the dev-java/oracle-jre-bin- update.

Permissions seems to be fine:

  # portageq envvar PORTAGE_TMPDIR
  # ls -ld /var/tmp
  drwxrwxrwt 11 root root 4096 Mar  4 12:35 /var/tmp
  # ls -ld /var/tmp/portage
  drwxrwxr-x 10 portage portage 4096 Mar  4 12:34 /var/tmp/portage

Only happens with Python 3.4 (python-3.4.3 in my case). When I switch back to Python 2.7 (python-2.7.9-r2) I don't see this error...
Comment 5 Mike Gilbert gentoo-dev 2015-03-04 15:29:15 UTC
(In reply to Michał Górny from comment #3)
> Hmm, do you have restricted access to your PORTAGE_TMPDIR?


floppym@naomi ~ % portageq envvar PORTAGE_TMPDIR
floppym@naomi ~ % ls -ld /tmp/portage
drwxrwxr-x 8 portage portage 160 Mar  3 23:36 /tmp/portage
Comment 6 Zac Medico gentoo-dev 2015-03-04 18:45:55 UTC
This is reproducible whenever there is a RESTRICT=fetch package that needs to be fetched, because it's triggered by the spawn_nofetch function, which uses a private PORTAGE_TMPDIR created with tempfile.mkdtemp().
Comment 7 Zac Medico gentoo-dev 2015-03-04 18:59:06 UTC
There's a fix in the following branch:

I've posted it for review here:
Comment 8 Mike Gilbert gentoo-dev 2015-03-04 19:12:41 UTC
I can confirm that patch makes the error go away.
Comment 9 Zac Medico gentoo-dev 2015-03-04 19:31:39 UTC
This is in the master branch now:
Comment 10 Brian Dolbec gentoo-dev 2015-03-04 21:51:57 UTC
Released in portage-2.2.18