Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 262475 - sys-fs/udev-140: sys-auth/pam_mount doesn't mount encrypted partition
Summary: sys-fs/udev-140: sys-auth/pam_mount doesn't mount encrypted partition
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: udev maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 264658
  Show dependency tree
 
Reported: 2009-03-14 20:35 UTC by adriancz
Modified: 2010-04-23 11:02 UTC (History)
3 users (show)

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


Attachments
git log between udev-139 and udev-140 (udev-git-log-139-140.txt,5.39 KB, text/plain)
2009-03-15 20:22 UTC, Matthias Schwarzott
Details

Note You need to log in before you can comment on or make changes to this bug.
Description adriancz 2009-03-14 20:35:01 UTC
pam_mount doesn't mount encrypted partition after upgrading udev to 140

In debug mode it says that it can't access file. After downgradeing udev to 135-r4 everything works fine again.


Reproducible: Always

Steps to Reproduce:
1. upgrade udev to 140
Comment 1 Matthias Schwarzott gentoo-dev 2009-03-15 13:47:06 UTC
Please attach emerge --info.

What debug mode? From pam_mount? Please attach it here, too.

And some more infos about your setup.

Could you try some versions between 135 and 140 to maybe cut down the point where the error was introduced.
Comment 2 Philipp 2009-03-15 18:41:07 UTC
same error for me. udev-139 is working, udev-140 not.


Portage 2.1.6.8 (default/linux/x86/2008.0/desktop, gcc-4.3.3, glibc-2.9_p20081201-r2, 2.6.28-gentoo-r3 i686)
=================================================================
System uname: Linux-2.6.28-gentoo-r3-i686-Intel-R-_Core-TM-_Duo_CPU_T2700_@_2.33GHz-with-glibc2.0
Timestamp of tree: Sun, 15 Mar 2009 10:15:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p10-r1
dev-java/java-config: 1.3.7-r1, 2.1.7
dev-lang/python:     2.5.4-r2
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.3-r1
sys-apps/sandbox:    1.6
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.28-r1
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=native -O2"
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/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=native -O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp.twaren.net/Linux/Gentoo/ ftp://de-mirror.org/distro/gentoo/ http://distfiles.gentoo.org"
LANG="de_DE.UTF-8"
LC_ALL="de_DE.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="de"
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="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/sectools /usr/local/portage/layman/jokey /usr/local/portage/layman/sunrise /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa avahi bash-completion berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread dvi emboss encode esd evo fam fbcondecor firefox fortran gdbm gif gnome gnome-keyring gpm gstreamer gtk hal hbci iconv inotify ipv6 isdnlog jpeg kpathsea laptop ldap libnotify libwww logrotate mad matroska midi mikmod mmx mp3 mpeg mudflap musepack nautilus ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3support quicktime readline reflection samba sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcpd theora threads thunderbird tiff truetype unicode usb vim-syntax vorbis wifi win32codecs x264 x86 xml xorg xulrunner xv xvid 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" FOO2ZJS_DEVICES="hp1020" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="radeon radeonhd"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


debug output from udev-139 says:

pam_mount(pam_mount.c:312): pam_mount 1.20: entering auth stage
pam_mount password:
Last login: Sun Mar 15 19:04:55 CET 2009 on tty2
pam_mount(pam_mount.c:458): pam_mount 1.20: entering session stage
pam_mount(misc.c:38): Session open: (uid=0, euid=0, gid=1005, egid=1005)
pam_mount(mount.c:172): Mount info: globalconf, user=***** <volume fstype="auto" server="(null)" path="/dev/vg/crypt" mountpoint="/home" cipher="(null)" fskeypath="(null)" fskeycipher="(null)" fskeyhash="(null)" options="" /> fstab=0
command: [mount] [-p0] [-t] [auto] [/dev/vg/crypt] [/home]
pam_mount(misc.c:38): set_myuid<pre>: (uid=0, euid=0, gid=1005, egid=1005)
pam_mount(misc.c:38): set_myuid<post>: (uid=0, euid=0, gid=1005, egid=1005)
Password:
key slot 0 unlocked.
pam_mount(mount.c:64): mount messages:
pam_mount(mount.c:67): Command successful.



same output for udev-140 but it hangs after the line that says "Password:"
Comment 3 adriancz 2009-03-15 18:44:16 UTC
139 is the last working version.
Comment 4 Matthias Schwarzott gentoo-dev 2009-03-15 20:20:33 UTC
This is the changelog for udev-140:

Summary of changes from v139 to v140
============================================

Harald Hoyer (1):
      libvolume_id: bump age

Kay Sievers (12):
      version bump
      update TODO
      volume_id: ntfs - fix uuid setting
      update TODO
      rules: Fedora update
      libudev: queue - use lstat() to check existence of symlink
      udevadm: settle - add --seq-start= --seq-end=
      udevd: switch watch symlinks to devpath
      udevadm: add text for new options to command and man page
      update TODO
      libudev: ctrl - return error after sending ctrl message
      udevadm: settle - use timeout signal, instead of loop counter

Michael Prokop (1):
      fix compile error in debug mode

Scott James Remnant (1):
      udevadm: settle - synchronise with the udev daemon

Most of these changes are small fixes. So if you find no better way you can try to bisect it by using the udev-9999 ebuild and telling it to use a specific version between udev-139 and udev-140.

I have not tried it, but it should work like this:
First enable using udev-9999:
# echo "=sys-fs/udev-9999 **" >> /etc/portage/package.keywords

Then emerge some version of udev:
EGIT_BRANCH="version" emerge udev

For successive tries you can set EGIT_OFFLINE to a non-empty value to stop it refetching every time.
Comment 5 Matthias Schwarzott gentoo-dev 2009-03-15 20:22:19 UTC
Created attachment 185111 [details]
git log between udev-139 and udev-140

Log messages for all commits between udev-139 and udev-140.

Use the hex code after the word commit for EGIT_BRANCH.
Comment 6 Hanno Böck gentoo-dev 2009-03-29 10:35:55 UTC
I encountered a similar bug, but it didn't occur any more with pam_mount-1.21. Can you test if this is still the case?
Comment 7 adriancz 2009-03-31 10:17:23 UTC
pam_mount 1.21 and udev 140 and I still have this problem.
Comment 8 Matthias Schwarzott gentoo-dev 2009-03-31 10:30:12 UTC
Some check possibilities:
1. Does newest git-version works:
emerge =udev-9999

2. Check a version between 139 and 140:
EGIT_BRANCH="89d080c3aedacadfb0b1022e101957998d4cdaf1" emerge =udev-9999
Comment 9 Philipp 2009-04-17 12:41:01 UTC
newest git-version is not working. Tried to check out a specific branch with the command
EGIT_BRANCH="whatever" emerge =udev-9999
but this does not seem to have an effect. I suppose EGIT_BRANCH is hard coded in the udev-9999 ebuild.
Comment 10 Matthias Schwarzott gentoo-dev 2009-04-18 08:56:54 UTC
(In reply to comment #9)
> EGIT_BRANCH="whatever" emerge =udev-9999
> but this does not seem to have an effect. I suppose EGIT_BRANCH is hard coded
> in the udev-9999 ebuild.
> 
You are right, it is hard coded, but removing this is of no effect, as EGIT_BRANCH is not the correct variable to use. Use EGIT_TREE and it will work, I verified this here.

After first emerging it you can also set EGIT_OFFLINE="yes" to net every time connecting to git.kernel.org
Comment 11 Philipp 2009-04-18 19:34:42 UTC
the bug is introduced with the last commit before release 140:

commit bb38678e3ccc02bcd970ccde3d8166a40edf92d3
Author: Scott James Remnant <scott@ubuntu.com>
Date:   Tue Mar 10 13:00:16 2009 +0000

    udevadm: settle - synchronise with the udev daemon
Comment 12 Matthias Schwarzott gentoo-dev 2009-07-16 09:02:48 UTC
(In reply to comment #11)
> the bug is introduced with the last commit before release 140:
> 
> commit bb38678e3ccc02bcd970ccde3d8166a40edf92d3
> Author: Scott James Remnant <scott@ubuntu.com>
> Date:   Tue Mar 10 13:00:16 2009 +0000
> 
>     udevadm: settle - synchronise with the udev daemon
> 
Very strange.
This patch should just stop some race conditions that could happen before.

Comment 13 adriancz 2009-11-02 19:19:03 UTC
This issue is still present with udev-146 and pam_mount-1.32.
Comment 14 Christian Schmidt 2009-11-05 09:37:42 UTC
Bug is fixed in GIT. Took me some until I was annoyed enough to look into it ;)

http://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;h=bc3ec7bd45814a75845529fd0aca5c5a9d9f0c14

Yes, the synchronization broke it, because some parent blocked the signals.
Comment 15 Matthias Schwarzott gentoo-dev 2009-11-13 13:39:31 UTC
This patch is contained in udev-147.
Comment 16 Hanno Böck gentoo-dev 2010-04-23 11:02:59 UTC
udev-149 is stable on most archs, so closing this.