Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 233280 - openvz-kernel & coreutils-6.12-r1: touch: setting times [...] Bad address
Summary: openvz-kernel & coreutils-6.12-r1: touch: setting times [...] Bad address
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High major with 1 vote (vote)
Assignee: Peter Volkov (RETIRED)
URL:
Whiteboard:
Keywords:
: 266735 touch-coreutils-7.1 268372 (view as bug list)
Depends on: 224483
Blocks:
  Show dependency tree
 
Reported: 2008-07-29 14:59 UTC by Christopher Covington
Modified: 2009-09-30 02:59 UTC (History)
6 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 Christopher Covington 2008-07-29 14:59:29 UTC
When emerging the latest patched coreutils, I got the following:
<<<          dir /usr/share/doc/coreutils-6.12
touch: setting times of `/var/tmp/binpkgs/sys-apps/coreutils-6.12/temp/environment.success': Bad address
touch: setting times of `/var/tmp/binpkgs/sys-apps/coreutils-6.12/temp/environment.success': Bad address
>>> Original instance of package unmerged safely.
touch: setting times of `/var/tmp/portage/sys-apps/coreutils-6.12-r1/temp/environment.success': Bad address
 * Make sure you run 'hash -r' in your active shells.
touch: setting times of `/var/tmp/portage/sys-apps/coreutils-6.12-r1/temp/environment.success': Bad address

This was while upgrading to the version with the fixes from bug #224483. I had been running a patched coreutils 6.12 with the following patch that had fixed the problem applied: http://bugs.gentoo.org/attachment.cgi?id=155253&action=view.

# emerge --info
ioprio_set: Operation not permitted
 * PORTAGE_IONICE_COMMAND returned 1
 * See the make.conf(5) man page for PORTAGE_IONICE_COMMAND usage instructions.
WARNING: repository at /usr/local/portage is missing a repo_name entry
Portage 2.2_rc4 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.8_p20080602-r0, 2.6.18-53.1.13.el5.028stab053.10ent i686)
=================================================================
System uname: Linux-2.6.18-53.1.13.el5.028stab053.10ent-i686-Intel-R-_Xeon-R-_CPU_E5420_@_2.50GHz-with-glibc2.0
Timestamp of tree: Mon, 28 Jul 2008 12:04:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r9, 2.5.2-r5
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.62-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  2.6.25-r4
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /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/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--nospinner"
FEATURES="distlocks parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LDFLAGS=""
MAKEOPTS="-j3"
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="/usr/local/portage/layman/sunrise /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl berkdb bzip2 cgi cli cracklib crypt cups curl dri exif fam fastcgi flatfile ftp gdbm gpm iconv ipv6 isdnlog jpeg memlimit midi ming mmx mudflap ncurses nptl nptlonly openmp pam pcre php png pppd psyco python readline recode reflection rrdtool session smp socks5 speex spell spl sse sse2 ssl tcpd threads tidy truetype unicode vhosts x86 xml xorg xsl zaptel 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 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="none"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Doug Goldstein gentoo-dev 2008-07-29 16:46:09 UTC

*** This bug has been marked as a duplicate of bug 224483 ***
Comment 2 Peter Alfredsen (RETIRED) gentoo-dev 2008-07-30 15:37:07 UTC
Re-opening to track this issue seperately from the touch: setting times of [...] Function not implemented issue.
Comment 3 Peter Alfredsen (RETIRED) gentoo-dev 2008-07-30 15:41:15 UTC
Re-assigning to pva & vserver; odd unsupported kernels are their domain.
Comment 4 Peter Alfredsen (RETIRED) gentoo-dev 2008-07-30 15:49:06 UTC
A short introduction to this bug: sys-apps/coreutils-6.12 would fail on 'old' kernels with touch: setting times of
[...] Function not implemented issue.

Mr. Covington's kernel fails differently:
touch: setting times [...] Bad address

The fix for the first issue was put into coreutils-6.12-r1.

The second issue is, AFAICT, unique to this bug and not encountered by anyone before. We have reports of 2.6.16 and 2.6.21 being fixed with this. The only other report from a 2.6.18 user was of "Function not implemented".
Comment 5 Daniel Robbins 2008-07-30 23:08:06 UTC
coreutils-6.12-r1.ebuild did not fix the problems for a full ~amd64 and ~x86 stage1 build under OpenVZ. Same "bad address" issue. The kernel being used is a RHEL5-based 2.6.18 kernel from the OpenVZ team - 2.6.18-53.1.19.el5.028stab053.14, their stable kernel. When I use a newer "unstable" OpenVZ kernel the problem disappears and touch works fine.

I don't think the problem relates to OpenVZ but rather that OpenVZ allows a decoupling between the kernel version and the linux-headers version that everything is built against under Gentoo. Typically under Gentoo one runs a kernel that's newer than linux-headers. In an OpenVZ environment this isn't necessarily true. This is a bug that should be fixed as it would break Gentoo installs into virtualized containers environments like OpenVZ and Linux VServer.

Comment 6 Daniel Robbins 2008-07-30 23:13:53 UTC
Also, please note that the older coreutils which worked (6.10) also made this utimensat call which failed, but the older coreutils handled this failure and thus did not produce a non-zero exit code. It actually looks like touch is working "fine" in 6.10 - the file is created - but badness is happening by trickling the utimensat failure up to the exit code.

But I have not really researched what they are trying to do with utimensat and if the call is important in the context of what touch is trying to do - I just did an strace and saw utimensat failing in 6.10 as well but touch itself worked fine due to a zero error code (and no error message).
Comment 7 Peter Volkov (RETIRED) gentoo-dev 2008-08-22 19:40:27 UTC
Thank you guys. Should be fixed in openvz-sources-2.6.18.028.057.2.
Comment 8 Daniel Robbins 2008-08-22 21:48:00 UTC
Fantastic! Do you have any information from the OpenVZ team that confirmed this as an upstream bug? Any OpenVZ bug #, etc? I am interested in researching this issue in OpenVZ to gain more understanding of it.

Regards,

Daniel
Comment 9 Peter Volkov (RETIRED) gentoo-dev 2008-08-23 06:24:51 UTC
(In reply to comment #8)
> Do you have any information from the OpenVZ team that confirmed this
> as an upstream bug? Any OpenVZ bug #, etc? I am interested in researching this
> issue in OpenVZ to gain more understanding of it.

The issue is simple, they backported utimensat implementation, but they forgot to apply later Linus patch to make it workable with filename descriptors. It's pity that I didn't manage to fix this issue myself understanding all above.

And of course I've contacted upstream:
http://bugzilla.openvz.org/show_bug.cgi?id=970

BTW, I'm going to stabilize this kernel on x86 on Monday and maybe around that time and amd64 too so if you notice any problem, please, tell me that.
Comment 10 Daniel Robbins 2008-08-23 06:35:07 UTC
thanks for your work on this.
Comment 11 Peter Alfredsen (RETIRED) gentoo-dev 2009-04-19 09:27:44 UTC
*** Bug 266735 has been marked as a duplicate of this bug. ***
Comment 12 Alexey Borzenkov 2009-04-19 09:43:37 UTC
Why was my bug marked as a duplicate of this bug? My bug is about coreutils-7.1, not coreutils-6.12. This bug is resolved and fixed, my bug bit me just several hours ago. Which means either this bug is not resolved and not fixed, or my bug is not a duplicate of this bug.
Comment 13 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2009-04-19 10:17:04 UTC
Alexey: the problem you are experiencing is a kernel bug. it is fixed by upgrading the kernel, as described in the comments on this bug. that you cant change that, is just tough luck... but it's quite a stretch to demand that we do something about it.

sorry.
Comment 14 Peter Alfredsen (RETIRED) gentoo-dev 2009-04-27 18:38:04 UTC
*** Bug 267669 has been marked as a duplicate of this bug. ***
Comment 15 Peter Alfredsen (RETIRED) gentoo-dev 2009-04-29 12:04:46 UTC
Since this is the bug everyone gets referred to, I'll just post a work-around here:
As a work-around, do:
cd /
wget
http://tinderbox.dev.gentoo.org/default-linux/x86/sys-apps/coreutils-6.10-r2.tbz2
tar -xjf coreutils-6.10-r2.tbz2
<insert praying>
If this works, you should now mask >=sys-apps/coreutils-6.12
and do:
emerge -1 coreutils (to get your system into a sane state again)



Comment 16 Peter Alfredsen (RETIRED) gentoo-dev 2009-05-05 23:32:12 UTC
*** Bug 268372 has been marked as a duplicate of this bug. ***
Comment 17 Jack Lloyd 2009-07-20 19:15:16 UTC
Now that coreutils < 7 have been removed from portage, does any workaround remain? The binpkg for 6.10 is gone, as are the coreutils-6 ebuilds in portage.
Comment 18 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2009-07-20 19:28:55 UTC
you can find old coreutils ebuilds here:
http://sources.gentoo.org:80/viewcvs.py/gentoo-x86/sys-apps/coreutils/?hideattic=0
Comment 19 Peter Volkov (RETIRED) gentoo-dev 2009-07-21 12:40:24 UTC
I just marked 2.6.27 stable, so not workaround, but fix is to use this kernel. Thanks.
Comment 20 Anton Fedorov 2009-09-27 06:39:25 UTC
I can't change kernel, since that bought VPS -- so just do
  rm /bin/touch && ln -s /bin/bb /bin/touch
fixes troublie with touch.
Comment 21 SpanKY gentoo-dev 2009-09-30 02:59:57 UTC
then why are you *paying* someone who is providing *broken* software to you ?  sounds like you arent shopping smart.

at any rate, not a bug in coreutils, so base-system cc -> gone