Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 297362 - sys-apps/coreutils < 6.12 needed for older kernels
Summary: sys-apps/coreutils < 6.12 needed for older kernels
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-18 00:04 UTC by Johannes Hirte
Modified: 2009-12-19 00:09 UTC (History)
0 users

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 Johannes Hirte 2009-12-18 00:04:44 UTC
As those old kernelsources like 2.6.16 are still in portage tree, compatible coreutils should be provided too. It results in an unusable system otherwise. See bug #233280.

Reproducible: Always
Comment 1 Rafał Mużyło 2009-12-18 10:21:32 UTC
Is this for restoring old coreutils or dropping
old kernels ?
Comment 2 Mike Pagano gentoo-dev 2009-12-18 13:33:25 UTC
I don't see this as a kernel bug as we don't own, maintain or make decisions on coreutils.  Base-system?

Comment 3 Daniel Drake (RETIRED) gentoo-dev 2009-12-18 14:26:11 UTC
You didn't specify which kernel package you are using, but at least in the case of the kernel-project supported kernels, just because they are in the tree doesn't mean they are supported. You should upgrade to a newer (supported) kernel, where this bug has already been fixed.
Comment 4 Johannes Hirte 2009-12-18 14:56:03 UTC
(In reply to comment #3)
> You didn't specify which kernel package you are using, 

I'm using linux-2.6.19.7 (vanilla), which I need for a project. For myself it's not that big problem, as I've solved it with an overlay.

> but at least in the case of the kernel-project supported kernels, just 
> because they are in the tree doesn't mean they are supported. 

That's a contradiction. Also it's rather ignorant to say that's provided but not supported.

> You should upgrade to a newer (supported)
> kernel, where this bug has already been fixed.
 
Gentoo shouldn't provide packages which lead to completely broken systems. Either all dependencies for a package are provided, or the package should be removed, if support isn't possible.
Comment 5 SpanKY gentoo-dev 2009-12-18 15:25:41 UTC
you need to post real problems.  Bug 233280 is not a real problem -- it is a bug specific to the openvz patches.  as such, we arent going to cater to their broken systems.

i can boot linux-2.6.10 just fine with coreutils-7.5
Comment 6 Johannes Hirte 2009-12-18 16:06:50 UTC
(In reply to comment #5)
> you need to post real problems.  Bug 233280 is not a real problem -- it is a
> bug specific to the openvz patches.  as such, we arent going to cater to their
> broken systems.
> 
> i can boot linux-2.6.10 just fine with coreutils-7.5
> 

The symptoms are similar as with bug 233280. touch fails with 'bad file descriptor'. As a result emerge doesn't work anymore and the init-scripts fail. I'm not sure if it's only restricted to touch. But after replacing by the one from the stage3-tarball, init-scripts and emerge worked again.
Comment 7 SpanKY gentoo-dev 2009-12-18 16:41:14 UTC
you need to start providing real details.  obvious things that are missing:
 - emerge info
 - exact coreutils version in use
 - exact command run and error displayed
 - exact system setup (are you running on real hardware or some vm)

debugging steps you should look into:
 - strace a simple touch
 - make sure /dev/fd is symlinked properly
 - make sure /proc is mounted properly
 - make sure /proc/self/fd/ is sane

linux-2.6.19.2 also boots just fine with coreutils-7.5-r1 and glibc-2.9
Comment 8 Johannes Hirte 2009-12-18 21:42:50 UTC
(In reply to comment #7)
> you need to start providing real details.  obvious things that are missing:
>  - emerge info

localhost ~ # emerge --info
Portage 2.1.6.13 (default/linux/x86/10.0, gcc-4.1.2, glibc-2.9_p20081201-r2, 2.6.19.7-noja i686)
=================================================================
System uname: Linux-2.6.19.7-noja-i686-Intel-R-_Pentium-R-_4_CPU_3.20GHz-with-gentoo-1.12.13
Timestamp of tree: Tue, 15 Dec 2009 08:00:24 +0000
app-shells/bash:     4.0_p35
dev-lang/python:     2.6.4
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.63-r1
sys-devel/automake:  1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j2"
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"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl berkdb bzip2 cli cracklib crypt cups cxx dri fortran gdbm gpm iconv ipv6 modules mudflap ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection session spl sqlite ssl sysfs tcpd unicode x86 xattr xorg 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 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 evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

It's a new install from stage3-i686-2008.0.tar.bz2, which was updated to the actual stable version.

>  - exact coreutils version in use
Coreutils first used was from the stage3-tarball. Don't know the exact version, but it works. After update to coreutils-7.5-r1 (stable), it doesn't work anymore. Downgrade to coreutils-6.10-r3 makes it work again. I had to take the touch binary from the stage3-tarball to get emerge work.

>  - exact command run and error displayed

localhost ~ # touch testfile
touch: setting times of `testfile': Bad file descriptor

>  - exact system setup (are you running on real hardware or some vm)

real hardware

> debugging steps you should look into:
>  - strace a simple touch

localhost ~ # strace touch testfile                                
execve("/usr/bin/touch", ["touch", "testfile"], [/* 27 vars */]) = 0
brk(0)                                  = 0x8053000                 
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3                                    
fstat64(3, {st_mode=S_IFREG|0644, st_size=24529, ...}) = 0                     
mmap2(NULL, 24529, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f9d000                  
close(3)                                = 0                                    
open("/lib/librt.so.1", O_RDONLY)       = 3                                    
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240\31\0\0004\0\0\0\200"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=30552, ...}) = 0                                      
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f9c000          
mmap2(NULL, 33392, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f93000           
mmap2(0xb7f9a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6) = 0xb7f9a000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`h\1\0004\0\0\0\244"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1290524, ...}) = 0
mmap2(NULL, 1295984, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e56000
mmap2(0xb7f8d000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x137) = 0xb7f8d000
mmap2(0xb7f90000, 9840, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7f90000
close(3)                                = 0
open("/lib/libpthread.so.0", O_RDONLY)  = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@H\0\0004\0\0\0\230"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=118210, ...}) = 0
mmap2(NULL, 94688, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e3e000
mmap2(0xb7e52000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13) = 0xb7e52000
mmap2(0xb7e54000, 4576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7e54000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7e3d000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7e3d6c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb7e52000, 4096, PROT_READ)   = 0
mprotect(0xb7f8d000, 8192, PROT_READ)   = 0
mprotect(0xb7f9a000, 4096, PROT_READ)   = 0
mprotect(0x8051000, 4096, PROT_READ)    = 0
mprotect(0xb7fc0000, 4096, PROT_READ)   = 0
munmap(0xb7f9d000, 24529)               = 0
set_tid_address(0xb7e3d708)             = 21864
set_robust_list(0xb7e3d710, 0xc)        = 0
futex(0xbfaa6b14, FUTEX_WAKE_PRIVATE, 1) = -1 ENOSYS (Function not implemented)
rt_sigaction(SIGRTMIN, {0xb7e422e0, [], SA_SIGINFO}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0xb7e42360, [], SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
uname({sys="Linux", node="noja", ...})  = 0
brk(0)                                  = 0x8053000
brk(0x8074000)                          = 0x8074000
open("testfile", O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK|O_LARGEFILE, 0666) = 3
dup2(3, 0)                              = 0
close(3)                                = 0
utimensat(0, NULL, NULL, 0)             = -1 EBADF (Bad file descriptor)
close(0)                                = 0
write(2, "touch: "..., 7touch: )               = 7
write(2, "setting times of `testfile'"..., 27setting times of `testfile') = 27
write(2, ": Bad file descriptor"..., 21: Bad file descriptor) = 21
write(2, "\n"..., 1
)                    = 1
close(1)                                = 0
close(2)                                = 0
exit_group(1)                           = ?


and a strace with a working 'touch':

localhost ~ # strace touch testfile
execve("/usr/bin/touch", ["touch", "testfile"], [/* 27 vars */]) = 0
brk(0)                                  = 0x8054000                 
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3                                    
fstat64(3, {st_mode=S_IFREG|0644, st_size=24529, ...}) = 0                     
mmap2(NULL, 24529, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f0b000                  
close(3)                                = 0                                    
open("/lib/librt.so.1", O_RDONLY)       = 3                                    
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240\31\0\0004\0\0\0\200"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=30552, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f0a000
mmap2(NULL, 33392, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f01000
mmap2(0xb7f08000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6) = 0xb7f08000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`h\1\0004\0\0\0\244"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1290524, ...}) = 0
mmap2(NULL, 1295984, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7dc4000
mmap2(0xb7efb000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x137) = 0xb7efb000
mmap2(0xb7efe000, 9840, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7efe000
close(3)                                = 0
open("/lib/libpthread.so.0", O_RDONLY)  = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@H\0\0004\0\0\0\230"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=118210, ...}) = 0
mmap2(NULL, 94688, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7dac000
mmap2(0xb7dc0000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13) = 0xb7dc0000
mmap2(0xb7dc2000, 4576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7dc2000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7dab000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7dab6c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb7dc0000, 4096, PROT_READ)   = 0
mprotect(0xb7efb000, 8192, PROT_READ)   = 0
mprotect(0xb7f08000, 4096, PROT_READ)   = 0
mprotect(0x8052000, 4096, PROT_READ)    = 0
mprotect(0xb7f2e000, 4096, PROT_READ)   = 0
munmap(0xb7f0b000, 24529)               = 0
set_tid_address(0xb7dab708)             = 21871
set_robust_list(0xb7dab710, 0xc)        = 0
futex(0xbffd9044, FUTEX_WAKE_PRIVATE, 1) = -1 ENOSYS (Function not implemented)
rt_sigaction(SIGRTMIN, {0xb7db02e0, [], SA_SIGINFO}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0xb7db0360, [], SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
uname({sys="Linux", node="noja", ...})  = 0
brk(0)                                  = 0x8054000
brk(0x8075000)                          = 0x8075000
close(0)                                = 0
open("testfile", O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK|O_LARGEFILE, 0666) = 0
utimensat(0, NULL, NULL, 0)             = -1 EBADF (Bad file descriptor)
utimes("testfile", NULL)                = 0
close(0)                                = 0
close(1)                                = 0
close(2)                                = 0
exit_group(0)                           = ?

>  - make sure /dev/fd is symlinked properly

localhost ~ # ls -l /dev/fd
lrwxrwxrwx 1 root root 13 Dec 18 16:51 /dev/fd -> /proc/self/fd

>  - make sure /proc is mounted properly

localhost ~ # mount | grep proc
proc on /proc type proc (rw,nosuid,nodev,noexec)
usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode=0664,devgid=85)

>  - make sure /proc/self/fd/ is sane

localhost ~ # ls /proc/self/fd/ -l
total 0
lrwx------ 1 root root 64 Dec 19 00:43 0 -> /dev/pts/1
lrwx------ 1 root root 64 Dec 19 00:43 1 -> /dev/pts/1
lrwx------ 1 root root 64 Dec 19 00:43 2 -> /dev/pts/1
lr-x------ 1 root root 64 Dec 19 00:43 3 -> /proc/21866/fd

> linux-2.6.19.2 also boots just fine with coreutils-7.5-r1 and glibc-2.9
> 

Comment 9 SpanKY gentoo-dev 2009-12-18 22:25:24 UTC
once again, it looks like it's your kernel sucks.  "noja" is not a vanilla kernel source.  utimensat() should return ENOSYS.  it isnt.  fix your kernel and stop blaming other things.
Comment 10 SpanKY gentoo-dev 2009-12-18 22:25:42 UTC
dont need anymore info ...
Comment 11 Johannes Hirte 2009-12-19 00:09:09 UTC
(In reply to comment #9)
> once again, it looks like it's your kernel sucks.  "noja" is not a vanilla
> kernel source.  
> utimensat() should return ENOSYS.  it isnt.  fix your kernel
> and stop blaming other things.

Aargh, I was working with the wrong kernel. Yes, noja is a modification to the vanilla kernel. Since the older coreutils ignored the wrong returned EBADF, I suspected coreutils wrongly here. Sorry for the noise.