Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 128799 - installation of /lib/udev/devices content break the system
Summary: installation of /lib/udev/devices content break the system
Status: RESOLVED DUPLICATE of bug 115810
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High blocker (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: udev-meta
  Show dependency tree
 
Reported: 2006-04-04 11:14 UTC by djinnZ
Modified: 2006-04-07 17:35 UTC (History)
3 users (show)

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


Attachments
my emerge info (info.txt,6.30 KB, text/plain)
2006-04-04 11:16 UTC, djinnZ
Details

Note You need to log in before you can comment on or make changes to this bug.
Description djinnZ 2006-04-04 11:14:35 UTC
emerge udev will break the system in creation of devices in /lib/udev.
As I can see the ebuild create the devices and will do a cp .../zero /lib/udev.
The result if the device exist is a loop or if it not exist is a disk full.
Is a new coreutils (5.2.1-r7 tyed 5.94-r1 also) bug?
Comment 1 djinnZ 2006-04-04 11:16:05 UTC
Created attachment 83904 [details]
my emerge info
Comment 2 Greg Kroah-Hartman (RETIRED) gentoo-dev 2006-04-04 12:34:55 UTC
I don't understand.  What exactly are the errors that happen when you
merge the udev package.

And what version of udev are you merging that causes this problem?
Comment 3 djinnZ 2006-04-04 14:18:47 UTC
(In reply to comment #2)
> I don't understand.  What exactly are the errors that happen when you
> merge the udev package.

the emerge crash the system in install at diasplay of ">>> /lib/udev/devices/null" line
no errors only create a zero file who fill the root partition
so i try to run manually mknod /lib/.../devices/null and reemerging udev
and at the same point the emerge loop by copy the null device on itself. 

reemerging libc and coreutils (or downgrade to stable) not solve the problem

> And what version of udev are you merging that causes this problem?

sorry, 087, I not remember the previous release because I have resolved in two step:
adding an rm .../udev/image/lib/udev/devices/* in ebuild
emerging udev
manually create null zero and console in /lib/udev/devices
remove rm line
reemerging udev work fine without errors now.

run install /dev/zero test will result in a core dump so I think is a coreutils problem.
Comment 4 Sascha G. 2006-04-04 17:16:35 UTC
I was bitten by this and other things. So let me rant a little. :-)

1) (not related to this bug) My /var partition was mounted "nodev", so I had to remount it (first time this ever happened, I consider this to be a bug in udev or the ebuild), because I got this error:

!!! [Errno 13] Permission denied: '/var/tmp/portage/udev-087/image/lib/udev/devices/console'
!!! Failed to move /var/tmp/portage/udev-087/image/lib/udev/devices/console to /lib/udev/devices/console

2) (not related to this bug) 
install: cannot stat `extras/raid-devfs.sh': No such file or directory

3) (finally! related) During the install phase:

--- /lib/udev/
--- /lib/udev/devices/
!!! /lib/udev/devices/console
>>> /lib/udev/devices/null
!!! Failed to move /var/tmp/portage/udev-087/image/lib/udev/devices/zero to /lib/udev/devices/zero
!!! [Errno 28] No space left on device

Leaving me with a somewhat, but not quite installed udev.

du /lib/udev/devices/zero 
454M	/lib/udev/devices/zero

My coreutils version is 5.94-r1, but I don't see how this has to do with this bug.

Gentoo Base System version 1.6.14
Portage 2.1_pre7-r4 (selinux/2005.1/x86/hardened, gcc-3.4.6, glibc-2.3.6-r3, 2.6.16-hardened i686)
=================================================================
System uname: 2.6.16-hardened i686 Intel(R) Pentium(R) 4 CPU 1.60GHz
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=pentium4 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/x
kb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe -march=pentium4 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--alphabetical"
FEATURES="autoconfig distlocks loadpolicy metadata-transfer parallel-fetch sandbox selinux sfperms str
ict userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp.wh2.tu-dresden.de/pub/mi
rrors/gentoo ftp://mirrors.sec.informatik.tu-darmstadt.de/gentoo/"
LANG="en_US.UTF-8"
LINGUAS="en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 X a52 aac alsa bzip2 caps cdparanoia cjk crypt cups curl dri dts dvd dvdread ffmpeg flac gif 
glut gnutls gtk hardened ipv6 joystick jpeg kdeenablefinal mad matroska mikmod mmap mmx mp3 ncurses np
tl offensive ogg opengl pam pic png readline sdl selinux sndfile sse sse2 ssl theora threads tiff true
type unicode usb vorbis win32codecs wxwindows xine xv xvid zlib elibc_glibc input_devices_keyboard inp
ut_devices_mouse kernel_linux linguas_en userland_GNU"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LC_ALL, LDFLAGS
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2006-04-05 03:37:52 UTC
(In reply to comment #4)
> I was bitten by this and other things. So let me rant a little. :-)
> 
> 1) (not related to this bug) My /var partition was mounted "nodev", so I had to
> remount it (first time this ever happened, I consider this to be a bug in udev
> or the ebuild), because I got this error:
> 
> !!! [Errno 13] Permission denied:
> '/var/tmp/portage/udev-087/image/lib/udev/devices/console'
> !!! Failed to move /var/tmp/portage/udev-087/image/lib/udev/devices/console to
> /lib/udev/devices/console

Here we go again with Bug 128302; gregkh, if you really insist on doing this, you should do it outside of sandbox on live fs, it's really legitimate to have /var mounted as nodev.

> 2) (not related to this bug) 
> install: cannot stat `extras/raid-devfs.sh': No such file or directory

Already fixed (Bug 128682).

> 3) (finally! related) During the install phase:
> !!! Failed to move /var/tmp/portage/udev-087/image/lib/udev/devices/zero to
> /lib/udev/devices/zero
> !!! [Errno 28] No space left on device
> 
> Leaving me with a somewhat, but not quite installed udev.
> 
> du /lib/udev/devices/zero 
> 454M    /lib/udev/devices/zero

Uh, not reproducible here w/ exactly same version of coreutils (but no selinux).

Comment 6 djinnZ 2006-04-05 11:40:43 UTC
> Uh, not reproducible here w/ exactly same version of coreutils (but no
> selinux).

Also I think is related to selinux patch for now, how can be reported to hardened team?
The function insinto in the ebuild run an install command to move the devices in /lib/udev/devices?

Starting emerge in debug mode not show anything only !!! /lib/udev/devices/zero (not even in audit) later (tomorrow I hope) I try to label files after creation in ebuild and report the result.

As requested in previous post I report the old version, was 070-r1 and the new is 087, as found in my logs.
Comment 7 Sascha G. 2006-04-05 13:14:01 UTC
I now looked a little closer at this. AFAICS, this has nothing to do with coreutils. The first time I try to update to udev 087, I get this:

>>> Setting SELinux security labels
/usr/sbin/setfiles:  labeling files, pretending /var/tmp/portage/udev-087/image is /
/usr/sbin/setfiles:  labeling files under /var/tmp/portage/udev-087/image/
/var/tmp/portage/udev-087/image/etc/hotplug.d/default/10-udev.hotplug: Operation not permitted
/usr/sbin/setfiles:  unable to relabel /var/tmp/portage/udev-087/image/etc/hotplug.d/default/10-udev.hotplug to system_u:object_r:etc_t
/var/tmp/portage/udev-087/image/lib/udev/devices/console: Operation not permitted
/usr/sbin/setfiles:  unable to relabel /var/tmp/portage/udev-087/image/lib/udev/devices/console to system_u:object_r:lib_t
/var/tmp/portage/udev-087/image/lib/udev/devices/null: Operation not permitted
/usr/sbin/setfiles:  unable to relabel /var/tmp/portage/udev-087/image/lib/udev/devices/null to system_u:object_r:lib_t
/var/tmp/portage/udev-087/image/lib/udev/devices/zero: Operation not permitted
/usr/sbin/setfiles:  unable to relabel /var/tmp/portage/udev-087/image/lib/udev/devices/zero to system_u:object_r:lib_t
matchpathcon_filespec_eval:  hash table stats: 75 elements, 75/65536 buckets used, longest chain length 1
/usr/sbin/setfiles:  Done.
--- /etc/
--- /etc/dev.d/
--- /etc/dev.d/default/
--- /etc/dev.d/net/
>>> /etc/dev.d/net/hotplug.dev
--- /etc/hotplug.d/
--- /etc/hotplug.d/default/
>>> /etc/hotplug.d/default/10-udev.hotplug -> ../../../sbin/udevsend
>>> /etc/scsi_id.config
--- /etc/udev/
--- /etc/udev/rules.d/
>>> /etc/udev/rules.d/05-udev-early.rules
>>> /etc/udev/rules.d/50-udev.rules
>>> /etc/udev/udev.conf
--- /lib/
--- /lib/rcscripts/
--- /lib/rcscripts/addons/
>>> /lib/rcscripts/addons/udev-start.sh
>>> /lib/rcscripts/addons/udev-stop.sh
>>> /lib/udev/
>>> /lib/udev/devices/

There it stops, no keyboard input whatsoever is possible. Fortunately, the mouse still works, so I can close the terminal and the keyboard works again.
If I try to install udev again, after deleting /var/db/pkg/sys-fs/-MERGING-udev-087, I get this:

>>> Setting SELinux security labels
/usr/sbin/setfiles:  labeling files, pretending /var/tmp/portage/udev-087/image is /
/usr/sbin/setfiles:  labeling files under /var/tmp/portage/udev-087/image/
/var/tmp/portage/udev-087/image/etc/hotplug.d/default/10-udev.hotplug: Operation not permitted
/usr/sbin/setfiles:  unable to relabel /var/tmp/portage/udev-087/image/etc/hotplug.d/default/10-udev.hotplug to system_u:object_r:etc_t
/var/tmp/portage/udev-087/image/lib/udev/devices/console: Operation not permitted
/usr/sbin/setfiles:  unable to relabel /var/tmp/portage/udev-087/image/lib/udev/devices/console to system_u:object_r:lib_t
/var/tmp/portage/udev-087/image/lib/udev/devices/null: Operation not permitted
/usr/sbin/setfiles:  unable to relabel /var/tmp/portage/udev-087/image/lib/udev/devices/null to system_u:object_r:lib_t
/var/tmp/portage/udev-087/image/lib/udev/devices/zero: Operation not permitted
/usr/sbin/setfiles:  unable to relabel /var/tmp/portage/udev-087/image/lib/udev/devices/zero to system_u:object_r:lib_t
matchpathcon_filespec_eval:  hash table stats: 75 elements, 75/65536 buckets used, longest chain length 1
/usr/sbin/setfiles:  Done.
--- /etc/
--- /etc/dev.d/
--- /etc/dev.d/default/
--- /etc/dev.d/net/
>>> /etc/dev.d/net/hotplug.dev
--- /etc/hotplug.d/
--- /etc/hotplug.d/default/
>>> /etc/hotplug.d/default/10-udev.hotplug -> ../../../sbin/udevsend
>>> /etc/scsi_id.config
--- /etc/udev/
--- /etc/udev/rules.d/
>>> /etc/udev/rules.d/05-udev-early.rules
>>> /etc/udev/rules.d/50-udev.rules
>>> /etc/udev/udev.conf
--- /lib/
--- /lib/rcscripts/
--- /lib/rcscripts/addons/
>>> /lib/rcscripts/addons/udev-start.sh
>>> /lib/rcscripts/addons/udev-stop.sh
--- /lib/udev/
--- /lib/udev/devices/
!!! /lib/udev/devices/console
>>> /lib/udev/devices/null
!!! Failed to move /var/tmp/portage/udev-087/image/lib/udev/devices/zero to /lib/udev/devices/zero
!!! [Errno 28] No space left on device

Maybe this has to do with some SELinux policy? I am only using SELinux for learning purposes now, I don't know enough about it to be able to find out.
Comment 8 Greg Kroah-Hartman (RETIRED) gentoo-dev 2006-04-05 13:26:27 UTC
It's an old selinux issue, see the referenced bug that shows how to properly
merge this package if you are using selinux.

*** This bug has been marked as a duplicate of 115810 ***