Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 365679 - sys-fs/udev-168-r1 breaks dmcrypt
Summary: sys-fs/udev-168-r1 breaks dmcrypt
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: udev maintainers
URL:
Whiteboard:
Keywords:
: 365843 (view as bug list)
Depends on: 361349
Blocks: 367949
  Show dependency tree
 
Reported: 2011-05-02 08:17 UTC by Mark
Modified: 2019-04-29 10:52 UTC (History)
14 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 Mark 2011-05-02 08:17:00 UTC
As the computer boots up and starts udev, the following message appears:

udevd: error: runtime directory '/run/udev' not writable, for now falling back 
to '/dev/.udev'

This causes dmcrypt not to work, because after typing in the passphrase, there is a semop() waiting endlessly. Further, this breaks X input devices: one cannot use mouse or keyboard in kdm.
If I skip dmcrypt and xdm, login as root and restart udev from the shell, dmcrypt and kdm work again.

This happens after upgrading to udev-168-r1.
FYI: /run is very writable for user and group root and udev runs as root and udev creates /run/udev by itself so this should not be a problem.

Reproducible: Always

Steps to Reproduce:
1. emerge udev-168-r1
2. mkdir /run (as root)
3. reboot
Actual Results:  
see description

Expected Results:  
the computer should boot with working dmcrypt and input-devices in X

Portage 2.1.9.46 (default/linux/amd64/10.0/desktop/kde, gcc-4.6.0, libc-0-r0, 2.6.39-rc5-git3 x86_64)
=================================================================
System uname: Linux-2.6.39-rc5-git3-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_5200+-with-gentoo-2.0.2
Timestamp of tree: Mon, 02 May 2011 06:15:01 +0000
app-shells/bash:     4.2_p8-r1
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.7.1-r1, 3.1.3-r1
dev-util/cmake:      2.8.4-r1
sys-apps/baselayout: 2.0.2
sys-apps/openrc:     0.8.2-r1
sys-apps/sandbox:    2.5
sys-devel/autoconf:  2.13, 2.68
sys-devel/automake:  1.10.3, 1.11.1-r1
sys-devel/binutils:  2.21
sys-devel/gcc:       4.6.0
sys-devel/gcc-config: 1.5-r1
sys-devel/libtool:   2.4-r1
sys-devel/make:      3.82
sys-kernel/linux-headers: 2.6.38
sys-libs/glibc:      2.13-r2
virtual/os-headers:  0
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA PUEL AdobeFlash-10.1"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64-sse3 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/games/angband/edit/ /etc/gconf /etc/gentoo-release /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="-march=athlon64-sse3 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages metadata-transfer news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
FFLAGS=""
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo"
LANG="de_DE.utf8"
LC_ALL="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de"
MAKEOPTS="-j4"
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/ramdisk"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/x11 /var/lib/layman/zugaina /var/lib/layman/kde"
SYNC="rsync://rsync.informatik.rwth-aachen.de/gentoo-portage"
USE="3dnow X a52 aac acl acpi alsa amd64 bash-completion berkdb bluray branding bzip2 cairo cddb cdr cli consolekit cracklib crypt cups cxx dbus djvu dri dts dvd dvdr emboss encode exif fam ffmpeg firefox flac fortran ftp gdbm gdu gif gmp gnutls gstreamer gtk hddtemp iconv imagemagick ipv6 jpeg jpeg2k kde kpathsea lame lcms libass libnotify lm_sensors lzma mad matroska mbrola mmx mng modules mp3 mp4 mpeg mpi mudflap multilib musicbrainz ncurses nls nptl nptlonly ogg opengl pam pango pch pcre pdf png policykit ppds pppd qt3support qt4 readline sdl semantic-desktop session smp spell sse sse2 ssl startup-notification svg sysfs taglib tcpd theora threads tiff truetype udev unicode usb v4l v4l2 vorbis webkit x264 xcb xml xorg xulrunner xv xvid zlib" 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" 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" CAMERAS="ptp2" 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="wacom evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" SANE_BACKENDS="genesys" USERLAND="GNU" VIDEO_CARDS="radeon" 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, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Nikos Chantziaras 2011-05-02 08:21:41 UTC
I confirm this. This started happening with 168-r1, it was not an issue before.
Comment 2 Stefano Gessa 2011-05-02 12:30:23 UTC
I confirm this too.
I did not create /run directory, it just fallback to /dev/.udev
and X is still working properly.
That error message at startup is annoying.
Comment 3 Andrzej Kardas 2011-05-03 14:52:10 UTC
*** This bug has been confirmed by popular vote. ***
Comment 4 Matthias Schwarzott gentoo-dev 2011-05-03 15:55:11 UTC
Yeah, this message is annoying.
before udev did fall back to /dev/.udev, and did not announce this.

So do we want to downgrade that message to be just info or warning, as we do not want to force baselayout into creating /run if it is not strictly necessary.

Still udev support needs to be improved, as some scripts have /dev/.udev hardcoded that must be replaced by $(udevadm info --run).
Comment 5 Matthias Schwarzott gentoo-dev 2011-05-03 16:03:30 UTC
@baselayout:
What are the plans about supporting /run directory in baselayout and openrc?
I saw openrc-git contains code to mount a tmpfs to /run if it exists.

So all udev scripts need to work with /run instead and udev also needs to work with an udev database coming from udev out of an initramfs. (there is a new command in udevadm:
# udevadm info --cleanup-db

that is to clean the database from udev of initramfs.

commit introducing it:
http://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;h=9ead662791b5e59a95b6c5a9351d661cb61d76bb

udevadm: info --cleanup-db
    
    Most of the udev database from initramfs should be deleted before
    starting udev in the real root. udevadm: info --cleanup-db deletes
    all database entries in /run/udev. Events that processed IMPORT{db},
    or mark devices explicitely as persistent, will be excluded.
Comment 6 Serkan Kaba (RETIRED) gentoo-dev 2011-05-03 20:44:27 UTC
*** Bug 365843 has been marked as a duplicate of this bug. ***
Comment 7 Pepe Palau 2011-05-06 17:08:42 UTC
Just to get it working for now I changed rc of baselayout 1 like this:
$ sudo nano -w /sbin/rc
...
                # Actually start setting up /dev now
                if [[ ${udev} == "yes" ]] ; then
                        mount tmpfs /run -t tmpfs -o size=40m
                        start_addon udev
...

After reboot udevd is using the new place to store its database:
$ udevadm info --run
/run/udev
Comment 8 Matthias Schwarzott gentoo-dev 2011-05-06 19:41:15 UTC
(In reply to comment #7)
> Just to get it working for now I changed rc of baselayout 1 like this:
> $ sudo nano -w /sbin/rc
> ...
>                 # Actually start setting up /dev now
>                 if [[ ${udev} == "yes" ]] ; then
>                         mount tmpfs /run -t tmpfs -o size=40m
>                         start_addon udev
> ...
> 
> After reboot udevd is using the new place to store its database:
> $ udevadm info --run
> /run/udev

"To get it working"? It does work as before, it just prints this annoying warning.
Comment 9 Pepe Palau 2011-05-06 19:56:45 UTC
I meant to get it working in the new path, sorry :), not necessary at all
Comment 10 Reimundo Heluani 2011-05-09 12:28:03 UTC
My system does not have a /run directory and anyways after the upgrade I have broken X input devices. Booting into single mode, restarting udev and then starting xdm does not solve the problem for me.
Comment 11 James Lockie 2011-05-09 16:18:13 UTC
#10: Do "emerge x11-drivers/xf86-input-evdev x11-drivers/xf86-input-keyboard x11-drivers/xf86-input-mouse x11-drivers/xf86-video-fbdev x11-drivers/xf86-video-glint x11-drivers/xf86-video-nv x11-drivers/xf86-video-vesa"
Comment 12 Stefano Gessa 2011-05-09 20:26:11 UTC
I suggest you to run:
emerge -av $(qlist -I -C x11-driver)
Comment 13 Jeroen Roovers (RETIRED) gentoo-dev 2011-05-12 21:48:49 UTC
Don't do that.
Comment 14 Nikos Chantziaras 2011-05-12 22:34:50 UTC
(In reply to comment #12)
> I suggest you to run:
> emerge -av $(qlist -I -C x11-driver)

It should be "-a1v", not "-av".
Comment 15 Stefano Gessa 2011-05-13 10:36:20 UTC
I'd prefer to have them in world set.
Comment 16 Matthias Schwarzott gentoo-dev 2011-05-14 14:02:48 UTC
I now removed that warning message, so the boot looks nicer.
Comment 17 Nikos Chantziaras 2011-05-14 14:05:17 UTC
Er, wouldn't it be more correct to have a /run tmpfs mounted at boot?
Comment 18 Matthias Schwarzott gentoo-dev 2011-05-16 04:43:16 UTC
(In reply to comment #17)
> Er, wouldn't it be more correct to have a /run tmpfs mounted at boot?

Even if upstream decides that run is the better way, udev on gentoo should not print ugly errors on boot screen, if it is working fine. And I think it will take some time until we get a stable openrc that unconditionally mounts /run.

So the removal of this warning is not related to adding /run support.
Comment 19 Christian Loosli 2011-05-16 12:52:46 UTC
I don't know whether this is caused by the changes in udev-168-r2, but as soon as I do have a /run/udev directory, X input devices do not work until I remove it. 

I removed this directory manually, but after updating to 168-r2 it was there again, and after the next reboot I had a X login screen with no working input devices. Which is not really good. The only possibilities then are to either reboot in interactive mode, reboot in single user mode or hope that Magic SysRQ is in kernel and SyrRQ+R works. 

So, if there is any logic that creates this directory in r2: Please do not do this until this bug is solved in a clean matter, as it might leave people, as me, with a non-working X after a reboot. 

Kind regards, 

Christian
Comment 20 Matthias Schwarzott gentoo-dev 2011-05-16 18:41:07 UTC
udevd creates and uses /run/udev as soon as /run does exist.
And the only place in gentoo I have seen that uses /run is some code in openrc that is not yet in any released version.

But there should be no code that does create /run itself, so when it does not exist it should not auto-appear.
Comment 21 Matthias Schwarzott gentoo-dev 2011-05-18 20:00:35 UTC
I split these two issues into two bugs.
This bug #365679 for the dmcrypt issue
and bug #367949 for the X11 issue
Comment 22 Samuli Suominen (RETIRED) gentoo-dev 2013-01-07 19:01:03 UTC
This should be fixed with current versions. Try at least udev-196-r1 and up-to-date lvm2 and cryptsetup. 

Reopen the bug if the issue persists.

Thanks!