Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 348640 - sys-apps/sandbox-2.4: NULL path with futimesat incorrectly handled (breaks `touch` from coreutils on old kernels)
Summary: sys-apps/sandbox-2.4: NULL path with futimesat incorrectly handled (breaks `t...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Sandbox (show other bugs)
Hardware: All Linux
: High critical with 2 votes (vote)
Assignee: Sandbox Maintainers
URL:
Whiteboard:
Keywords:
: 348731 349120 349932 349933 350668 (view as bug list)
Depends on: 224483
Blocks:
  Show dependency tree
 
Reported: 2010-12-13 18:51 UTC by Jeremy Olexa (darkside) (RETIRED)
Modified: 2011-09-03 13:24 UTC (History)
22 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 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-12-13 18:51:00 UTC
There is a problem with touch(1), and I'm not sure what it is but it is causing problems with portage.

>>> Emerging (1 of 1) sys-libs/cracklib-2.8.16
 * cracklib-2.8.16.tar.gz RMD160 SHA1 SHA256 size ;-) ...                [ ok ]
 * Package:    sys-libs/cracklib-2.8.16
 * Repository: gentoo
 * Maintainer: base-system@gentoo.org
 * USE:  elibc_glibc kernel_linux nls python userland_GNU x86
>>> Unpacking source...
>>> Unpacking cracklib-2.8.16.tar.gz to /var/tmp/portage/sys-libs/cracklib-2.8.16/work
touch: setting times of `/var/tmp/portage/sys-libs/cracklib-2.8.16/.unpacked': No such file or directory
 * ERROR: sys-libs/cracklib-2.8.16 failed:
 *   IO Failure -- Failed 'touch .unpacked' in /var/tmp/portage/sys-libs/cracklib-2.8.16
 *
 * Call stack:
 *   ebuild.sh, line 2320:  Called ebuild_main
 *   ebuild.sh, line 2227:  Called dyn_unpack
 *   ebuild.sh, line  746:  Called die
 * The specific snippet of code:
 *      touch "${PORTAGE_BUILDDIR}/.unpacked" || die "IO Failure -- Failed 'touch .unpacked' in ${PORTAGE_BUILDDIR}"

Downgrading to coreutils-8.5 is the workaround. Another developer, scarabeus, found the same issue and resolved it the same way.
Comment 1 SpanKY gentoo-dev 2010-12-13 19:25:10 UTC
come on man, you know you cant file bugs without real info.  perhaps you're merely using an old version of sandbox.
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-12-13 20:07:47 UTC
(In reply to comment #1)
> come on man, you know you cant file bugs without real info.  perhaps you're
> merely using an old version of sandbox.
>

Yup, it is a very vague error and report. Merely showing a real problem that happened to two devs on stable systems. I rely on your expertise so I can provide more info when requested. I'll tell you how I found this issue. I'm upgrading a 2006.1 stage3 (coreutils-5.94). It had this touch error (as noted), then I upgraded to coreutils-8.5, the problem disappeared. Then, in the mean time I was working on a set of instructions to upgrade an old host, coreutils-8.7 was marked stable on x86. The problem re-appeared (same symptoms as 2006.1), so I tried coreutils-8.5 again and it worked. I don't know what the issue is, as I already said, but there is an issue. I'm not sure why emerge --info would help here..

# emerge --info
Portage 2.1.9.24 (default/linux/x86/10.0, gcc-4.4.4, glibc-2.11.2-r3, 2.6.33-linode24 i686)
=================================================================
System uname: Linux-2.6.33-linode24-i686-Intel-R-_Xeon-R-_CPU_L5420_@_2.50GHz-with-gentoo-1.12.1
Timestamp of tree: Mon, 13 Dec 2010 19:15:01 +0000
app-shells/bash:     4.1_p7
dev-lang/python:     2.4.3-r1::<unknown repository>, 2.6.6-r1, 3.1.2-r4
sys-apps/baselayout: 1.12.1::<unknown repository>
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13::<unknown repository>, 2.65-r1
sys-devel/automake:  1.4_p6::<unknown repository>, 1.5::<unknown repository>, 1.6.3::<unknown repository>, 1.7.9-r1::<unknown repository>, 1.8.5-r3::<unknown repository>, 1.9.6-r2::<unknown repository>, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.1.1::<unknown repository>, 4.4.4-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.80-r4::<unknown repository>
virtual/os-headers:  2.6.30-r1 (sys-kernel/linux-headers)
Comment 3 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-12-13 20:09:56 UTC
The other dev, scarabeus, can only reproduce it on his hardened host and not his non-hardened host. I only have a non-hardened host.
Comment 4 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-12-13 20:28:19 UTC
I remember touch(1) being awfully tied to the kernel interfaces, could kernel version and version of linux-headers matter here?
Comment 5 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-12-13 20:43:24 UTC
I guess we won't bother the arch teams yet. Could be a localized issue that I overreacted to when hearing about another person having similar issues.
Comment 6 SpanKY gentoo-dev 2010-12-13 20:49:01 UTC
and you have /proc mounted right ?

does `touch` outside of the emerge work ?

how about in `ebuild` ?  see if `ebuild <ebuild> clean unpack` works.

if the ebuild fails too, then run that simple command through:
   strace -f -s 4096 -v -o log
and compress/post the log as an attachment
Comment 7 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-12-13 21:17:35 UTC
I rebooted into 2.6.32 kernel since my last post.

(In reply to comment #6)
> and you have /proc mounted right ?

Yes.
 
> does `touch` outside of the emerge work ?

Yes, even the *same* command that emerge is trying to do.

# ls -l /var/tmp/portage/sys-libs/cracklib-2.8.16/.unpacked 
-rw-r--r-- 1 root root 0 Dec 13 20:55 /var/tmp/portage/sys-libs/cracklib-2.8.16/.unpacked
# rm /var/tmp/portage/sys-libs/cracklib-2.8.16/.unpacked
# touch /var/tmp/portage/sys-libs/cracklib-2.8.16/.unpacked

> how about in `ebuild` ?  see if `ebuild <ebuild> clean unpack` works.

Failed in same way.
 
> if the ebuild fails too, then run that simple command through:
>    strace -f -s 4096 -v -o log
> and compress/post the log as an attachment
> 

Ugh. I needed to install strace. For that I needed to downgrade coreutils (to 8.5), then installed strace and upgraded to coreutils-8.7 again. Now the issue is not reproducable. I've done this many times now and the only thing I changed was the booted kernel (based on Diego's hint) - I guess I'll close this bug. =/

Thanks for the help, regardless.
Comment 8 Vincent Le Ligeour 2010-12-14 13:48:24 UTC
Same problem here with kernel 2.6.20 (xen).
I think I track down the problem to http://www.kernel.org/doc/man-pages/online/pages/man2/utimensat.2.html this syscall not implemented before kernel 2.6.22.
touch.c seems to fail to setting time.
I'm trying to downgrade coreutils from another install to see if it works.
Comment 9 Vincent Le Ligeour 2010-12-14 14:09:49 UTC
Ok,

Emerging coreutils 8.5 solved the problem. I cannot test all kernel release but with latest touch works flawlessly.
I suppose a die on 
kernel_is -lt 2 6 22
seems quite a good workaround (need someone testing this) and patching coreutils like a good solution
Comment 10 Mark Tomich 2010-12-14 15:56:02 UTC
adding my $0.02... I have the same issue, and I'm on a xen kernel v2.6.18...looks like I'm going to have to mask v8.7 until I can upgrade my kernel.
Comment 11 SpanKY gentoo-dev 2010-12-14 16:25:59 UTC
seems to work for me on an old 32bit linux-2.6.18:

# qlist -I -v glibc
sys-libs/glibc-2.11.2
# uname -r -v
2.6.18 #2 Thu Mar 19 01:33:19 EDT 2009
# rm -f asdf
# touch asdf
# ls -l asdf
-rw-r--r-- 1 root root 0 Dec 14 11:22 asdf

and running it through strace shows expected behavior:
# strace touch asdf
...
open("asdf", O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK|O_LARGEFILE, 0666) = 3
dup2(3, 0)                              = 0
close(3)                                = 0
dup2(0, 0)                              = 0
utimensat(0, NULL, NULL, 0)             = -1 ENOSYS (Function not implemented)
utimensat(0, NULL, NULL, 0)             = -1 ENOSYS (Function not implemented)
utimes("/proc/self/fd/0", NULL)         = 0
close(0)                                = 0
close(1)                                = 0
close(2)                                = 0
exit_group(0)                           = ?

so people need to provide more info as to what is going wrong on their system.  otherwise, this looks like a non-issue to me.
Comment 12 SpanKY gentoo-dev 2010-12-14 17:05:46 UTC
although, touch in sandbox isnt working.  so i'm thinking the sandbox layer doesnt handle the ENOSYS nicely.
Comment 13 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-12-14 18:44:56 UTC
*** Bug 348731 has been marked as a duplicate of this bug. ***
Comment 14 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-12-17 16:54:58 UTC
vapier, what more information did you need here? Anything I can help with?
Comment 15 SpanKY gentoo-dev 2010-12-17 21:46:27 UTC
i dont need anymore info from people.  i just need to sit down and fix it.
Comment 16 Samuli Suominen (RETIRED) gentoo-dev 2010-12-19 05:15:47 UTC
ftr, ppc64 is suffering from this problem as well
Comment 17 SpanKY gentoo-dev 2010-12-19 14:57:01 UTC
there is no arch-specific issue here.  every arch at one point did not have the *at syscalls which means under some kernel version, they'll return ENOSYS.
Comment 18 Daniel Pielmeier gentoo-dev 2010-12-19 20:58:38 UTC
*** Bug 349120 has been marked as a duplicate of this bug. ***
Comment 19 lou 2010-12-20 15:35:38 UTC
I'm experiencing the same problem. I'm unable to roll back to to coreutils-8.5, because of the same problem....

 * Done with patching
touch: setting times of `/var/tmp/portage/sys-apps/coreutils-8.5/.unpacked': No such file or directory
 * ERROR: sys-apps/coreutils-8.5 failed:

Any ideas on how to get around this?
l
Comment 20 Harpreet Singh Wadhwa 2010-12-20 15:40:17 UTC
@lou,
You can rollback with this command.
FEATURE=-sandbox merge -av =sys-apps/coreutils-8.5
Comment 21 lou 2010-12-20 15:48:40 UTC
(In reply to comment #20)
> @lou,
> You can rollback with this command.
> FEATURE=-sandbox emerge -av =sys-apps/coreutils-8.5
> 

I just ran that.. and still experiencing the same problem?
 * Done with patching
touch: setting times of `/var/tmp/portage/sys-apps/coreutils-8.5/.unpacked': No such file or directory
 * ERROR: sys-apps/coreutils-8.5 failed:
 *   IO Failure -- Failed 'touch .unpacked' in /var/tmp/portage/sys-apps/coreutils-8.5
 *
Comment 22 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-12-20 15:53:09 UTC
It is FEATURES, not FEATURE. Please, this is not a support forum, we have forums and irc for that.
Comment 23 lou 2010-12-20 15:55:42 UTC
(In reply to comment #22)
> It is FEATURES, not FEATURE. Please, this is not a support forum, we have
> forums and irc for that.
> 

Thanks Jeremy.. that worked.
Comment 24 bunkacid 2010-12-20 23:28:57 UTC
Add self to CC list.
Comment 25 Francesco Saverio Proto 2010-12-25 01:36:43 UTC
Same problem here, downgrading coreutils as suggested solved the problem:

FEATURES=-sandbox emerge -av =sys-apps/coreutils-8.5

and now I am able to use portage again without problems with touch.

This is my emerge --info

hosthame ~ # emerge --info  
Portage 2.1.9.24 (default/linux/x86/10.0/server, gcc-4.4.4, glibc-2.11.2-r3, 2.6.18-xen i686)
=================================================================
System uname: Linux-2.6.18-xen-i686-Intel-R-_Xeon-R-_CPU_3060_@_2.40GHz-with-gentoo-1.12.14
Timestamp of tree: Fri, 24 Dec 2010 18:00:01 +0000
app-shells/bash:     4.1_p7
dev-lang/python:     2.4.6, 2.5.4-r4, 2.6.5-r3, 3.1.2-r4
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 1.12.14-r1
sys-apps/sandbox:    2.3-r1
sys-devel/autoconf:  2.65-r1
sys-devel/automake:  1.9.6-r2, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.1.2, 4.3.4, 4.4.4-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.30-r1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe -mno-tls-direct-seg-refs"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
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/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=i686 -pipe -mno-tls-direct-seg-refs"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS=""
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://rsync.gentoo.org/gentoo-portage"
USE="acl apache2 avi bash-completion berkdb bitmap-fonts bzip2 cairo cdr cgi cli cracklib crypt cups curl cxx dbus diskio dlloader dri eds emboss encode enscript esd fam fastcgi fortran gd gdbm gif gnutella gpm graphviz gs gstreamer hal iconv ipv6 isdnlog jpeg jpeg2k latex ldap libg++ mad mikmod modules mp3 mpeg mudflap mysql ncurses network nls nptl nptlonly ogg openmp oss pam pcre pdflib perl png ppds pppd python quicktime readline reflection sdl session silvercity simplexml slang snmp socket sockets spell spl sqlite sqlite3 ssl subversion sysfs tcpd threads tiff truetype truetype-fonts type1-fonts udev unicode urandom v4l vorbis x86 xml xv 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="cgi actions alias auth_basic auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" 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 ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware voodoo" 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" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY




Comment 26 Panagiotis Christopoulos (RETIRED) gentoo-dev 2010-12-28 09:27:33 UTC
*** Bug 349932 has been marked as a duplicate of this bug. ***
Comment 27 Panagiotis Christopoulos (RETIRED) gentoo-dev 2010-12-28 09:33:59 UTC
*** Bug 349933 has been marked as a duplicate of this bug. ***
Comment 28 SpanKY gentoo-dev 2011-01-02 02:45:56 UTC
after debugging a bit more, the problem actually lies with the futimesat handling.  this func is odd like utimensat in that a NULL filename repurposes the dirfd argument as not a dir fd at all, but the file fd upon which to operate.

coreutils' touch is the only one hitting this bug because it has logic to fall back at runtime from utimensat() to futimesat().  very few projects out there use futimesat() at all because it was never standardized and is deprecated in favor of utimensat().

should be fixed in git by:
http://git.overlays.gentoo.org/gitweb/?p=proj/sandbox.git;a=commitdiff;h=7f251191a4975f2b7e8183b51da8097e647e6b2b

if people on old kernels want to give that a whirl and report back, i'll put out sandbox-2.5 with it.
Comment 29 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2011-01-03 02:55:34 UTC
With that patch (in comment #28) applied to sandbox-2.4 sources, there is still a failure condition for me.

>>> Emerging (1 of 1) sys-apps/coreutils-8.7
 * coreutils-8.7.tar.xz RMD160 SHA1 SHA256 size ;-) ...                  [ ok ]
 * coreutils-8.7-patches-1.tar.xz RMD160 SHA1 SHA256 size ;-) ...        [ ok ]
 * Package:    sys-apps/coreutils-8.7
 * Repository: gentoo
 * Maintainer: base-system@gentoo.org
 * USE:  acl elibc_glibc kernel_linux nls unicode userland_GNU x86
>>> Unpacking source...
>>> Unpacking coreutils-8.7.tar.xz to /var/tmp/portage/sys-apps/coreutils-8.7/work
>>> Unpacking coreutils-8.7-patches-1.tar.xz to /var/tmp/portage/sys-apps/coreutils-8.7/work
ISE futimesat((null)): Success
        abs_path: (null)
        res_path: (null)
/usr/lib/libsandbox.so(+0x2627)[0xb7712627]
/usr/lib/libsandbox.so(+0x269c)[0xb771269c]
/usr/lib/libsandbox.so(+0x3dec)[0xb7713dec]
/usr/lib/libsandbox.so(futimesat+0x72)[0xb7716742]
touch[0x804f44d]
touch(futimens+0x1e)[0x804dc0e]
touch[0x804a5ad]
touch[0x8049f40]
/lib/libc.so.6(__libc_start_main+0xe6)[0xb75da586]
touch[0x80496d1]
/proc/16644/cmdline: touch /var/tmp/portage/sys-apps/coreutils-8.7/.unpacked 

/usr/lib/portage/bin/ebuild.sh: line 703: 16644 Aborted                 touch "${PORTAGE_BUILDDIR}/.unpacked"
 * ERROR: sys-apps/coreutils-8.7 failed:
 *   IO Failure -- Failed 'touch .unpacked' in /var/tmp/portage/sys-apps/coreutils-8.7
 * 
 * Call stack:
 *   ebuild.sh, line 2320:  Called ebuild_main
 *   ebuild.sh, line 2227:  Called dyn_unpack
 *   ebuild.sh, line  746:  Called die
 * The specific snippet of code:
 *      touch "${PORTAGE_BUILDDIR}/.unpacked" || die "IO Failure -- Failed 'touch .unpacked' in ${PORTAGE_BUILDDIR}"
Comment 30 SpanKY gentoo-dev 2011-01-03 03:08:43 UTC
is your `touch` static ?
Comment 31 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2011-01-03 03:12:44 UTC
(In reply to comment #30)
> is your `touch` static ?
> 

Nope, that version of `touch` is from coreutils-8.7 emerged with FEATURES=-sandbox

touch (GNU coreutils) 8.7
Packaged by Gentoo (8.7 (p1))

[ebuild   R   ] sys-apps/coreutils-8.7  USE="acl nls unicode -caps -gmp (-selinux) -static -vanilla -xattr" 0 kB [0]
Comment 32 Panagiotis Christopoulos (RETIRED) gentoo-dev 2011-01-05 17:45:09 UTC
*** Bug 350668 has been marked as a duplicate of this bug. ***
Comment 33 Catalin Constantin 2011-01-14 13:16:13 UTC
Issue should be fixed if you add
the line:

FEATURES="-sandbox"

to /etc/make.conf.
Comment 34 pavel sanda 2011-01-14 16:23:54 UTC
looks like workaround, not fix
Comment 35 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-01-18 09:55:05 UTC
vapier:
This has just started to bite a bunch of older infra boxes.
The touch on them is not static and your patch from comment does not work per darkside. Please provide a fix so that I can finish upgrading their packages and get the boxes onto newer kernels.
Comment 36 vsync 2011-01-20 00:56:27 UTC
I just encountered this issue a month later on a Linode server.  coreutils should definitely complain and bomb out if the kernel isn't new enough to support it, or perhaps "touch" can use the older syscall if the newer one isn't supported?
Comment 37 Rev. Jeffrey Paul 2011-01-24 14:19:37 UTC
I have hardware that can't run a newer kernel, it locks up - it also happens to be 4100 miles (6600km) away from me.

Can we get a userspace workaround in either coreutils or sandbox for this, pretty please?
Comment 38 Garrett Cooper 2011-01-26 08:15:39 UTC
LOL. Haven't updated my box in ages (2 months) either and I ran into this problem on 2.6.32 . I emerge -C'ed sandbox and that was a workaround for the problem, but not a very useful one as something else reinstalled sandbox in an upgrade.

I'll see what I can find out about the error on my box as that syscall was added back in 2.6.16 according to linux.die.net .
Comment 39 Tiago Marques 2011-01-27 01:58:23 UTC
Had the same problem on a 2.6.18 Xen Kernel, worked ok after upgrading to 2.6.35. Either way this is kind of a nasty bug that will likely stop one from upgrading the kernel after it happens - I had the change to switch them through my hosting provider.
Comment 40 Garrett Cooper 2011-01-29 22:23:50 UTC
Nevermind comment # 38 . I have other more important things to occupy my time and I'll just update my Linux kernel on the box.
Comment 41 SpanKY gentoo-dev 2011-02-14 06:25:02 UTC
pushed out sandbox-2.5
Comment 42 Jan Kundrát (RETIRED) gentoo-dev 2011-02-14 06:50:22 UTC
(In reply to comment #41)
> pushed out sandbox-2.5

Fixes this issue on 32bit 2.6.21-xen-domU, thanks.
Comment 43 Vincent Le Ligeour 2011-02-21 09:38:04 UTC
haven't seen any plan to push sandbox-2.5 into arch stable. Could be a good idea since coreutils-2.7 that trigger the problem is in arch stable (x86 at least)
Comment 44 Gary Donovan 2011-06-07 06:04:29 UTC
(In reply to comment #41)
> pushed out sandbox-2.5

Also fixes this issue on 2.6.18-164.6.1.el5xen on a virtualised 64 bit AMD.

For the sake of posterity (and sysadmins even weaker than myself), here is what I did:

# Get a working version of coreutils
% FEATURES=-sandbox emerge -av =sys-apps/coreutils-8.5

# Get the patched (but masked) version of sandbox
% echo "=sys-apps/sandbox-2.5 ~amd64" >> /etc/portage/package.keywords
% emerge sys-apps/sandbox

# Upgrade coreutils
% emerge sys-apps/coreutils

# Continue upgrading other packages, as normal...
Comment 45 Oleg 2011-09-03 13:19:03 UTC
emerge sys-apps/attr-2.4.46:

...
>>> Completed installing attr-2.4.46 into /mnt/other/tmp/portage/sys-apps/attr-2.4.46/image/

strip: i686-pc-linux-gnu-strip --strip-unneeded -R .comment
   lib/libattr.so.1.1.0
   bin/attr
   bin/setfattr
   bin/getfattr
   usr/lib/libattr.a
ecompressdir: bzip2 -9 /usr/share/man
ISE UTIMENSAT((null)): Success
	abs_path: (null)
	res_path: (null)
/usr/lib/libsandbox.so(+0x23c7)[0xf77413c7]
/usr/lib/libsandbox.so(+0x243d)[0xf774143d]
/usr/lib/libsandbox.so(+0x3f8d)[0xf7742f8d]
/usr/lib/libsandbox.so(+0x4934)[0xf7743934]
/usr/lib/libsandbox.so(+0x4a33)[0xf7743a33]
/usr/lib/libsandbox.so(+0x4f8e)[0xf7743f8e]
/usr/lib/libsandbox.so(+0x5aa6)[0xf7744aa6]
/usr/lib/libsandbox.so(execve+0x41)[0xf77461b1]
/bin/sh(shell_execve+0x22)[0x8074572]
/bin/sh(exec_builtin+0x1b4)[0x80b3c34]
/proc/12979/cmdline: gzip -d -f ./attr-2.4.46/CHANGES.gz 

xargs: gunzip: terminated by signal 6
ecompressdir: bzip2 -9 /usr/share/doc
 * ERROR: sys-apps/attr-2.4.46 failed:
 *   ecompressdir failed
...

emerge --info:

Portage 2.1.10.11 (default/linux/x86/10.0, gcc-4.4.5, glibc-2.12.2-r0, 2.6.39-gentoo-r3 i686)
=================================================================
System uname: Linux-2.6.39-gentoo-r3-i686-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-gentoo-2.0.3
Timestamp of tree: Tue, 30 Aug 2011 04:00:01 +0000
app-shells/bash:          4.1_p9
dev-lang/python:          2.7.1-r1
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.25-r2
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.4
sys-devel/autoconf:       2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.20.1-r1
sys-devel/gcc:            4.4.5
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82
sys-kernel/linux-headers: 2.6.36.1 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -mtune=core2 -pipe -msse -msse2 -msse3 -mssse3 -mmmx -mcx16 -msahf --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="$CONFIG_PROTECT /etc /usr/lib/oss/conf/ /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=core2 -mtune=core2 -pipe -msse -msse2 -msse3 -mssse3 -mmmx -mcx16 -msahf --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="ru_RU.UTF-8"
LDFLAGS="-O1"
LINGUAS="ru en"
MAKEOPTS="-j3"
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="/mnt/other/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X Xaw3d a52 aac acl alsa anthy archive audacious audiofile bidi bzip2 canna cdda cdr chasen cjk cli cracklib crypt css curl cxx dbus dga djvu dts dv dvb dvd dvdr dvdread enca encode expat ffmpeg fftw flac fontconfig fontforge freewnn fuse gd gif ginac glut gmp gnuplot gpm gsl gzip hddtemp icc iconv id3 id3tag imagemagick imap imlib irc irda jabber jbig joystick jpeg jpeg2k lame lash libmpd libnotify libwww lm_sensors lua lzma lzo mad matroska mbrola midi migemo mime mmx mmxext mng modules mozilla mp3 mp4 mpd mpeg mplayer msn mudflap mule musepack ncurses nls nntp nocd nptl nptlonly nsplugin nvidia ogg openal openexr opengl openmp osc oscar oss pch pcre pdf png portaudio posix pppd quicktime rar raw readline rle rss scanner schroedinger session sharedmem shorten slang smp sndfile sockets socks5 sox speex spell sqlite sse sse2 ssl ssse3 startup-notification static static-libs subversion sysfs syslog szip tcpd theora threads tiff timidity truetype unicode usb vcd vdpau vhook videos vorbis wavpack wmf x264 x86 xft xml xorg xosd xpm xscreensaver xulrunner xv xvid xvmc zip zlib" ALSA_CARDS="hda-intel" 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 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" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DVB_CARDS="ttpci" 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 ubx" INPUT_DEVICES="keyboard mouse evdev joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru en" NETBEANS_MODULES="apisupport cnd ide java mobility xml dlight enterprise harness profiler webcommon websvccommon nb" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia 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"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 46 Oleg 2011-09-03 13:24:26 UTC
Did this bug really fix?