Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 595586 - >=sys-fs/cryptsetup-1.6.8-r1 - dmcrypt init script hangs when GPG uses pinentry-curses
Summary: >=sys-fs/cryptsetup-1.6.8-r1 - dmcrypt init script hangs when GPG uses pinent...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
Depends on:
Reported: 2016-09-29 20:38 UTC by Felix Tiede
Modified: 2016-10-08 16:38 UTC (History)
0 users

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


Note You need to log in before you can comment on or make changes to this bug.
Description Felix Tiede 2016-09-29 20:38:09 UTC
Since upgrading from cryptsetup-1.6.5 to 1.7.2 my system hangs during opening my LUKS encrypted /home. The LUKS key is gpg-password protected and at this stage in the boot process gpg uses pinentry-curses for password entry (as opposed to the likewise encrypted root, at which point there's a basic prompt appearing on the screen).
A workaround is to hit CTRL-C and wait for the init-scripts to retry opening /home, which ultimately leads to a fault in fsck phase.

Ultimately I removed the 'timeout ${dmcrypt_max_timeout}' part from dmcrypt init script, which fixes this problem for me.
I suspect this command does interfere with pinentry-curses. Currently I have no idea how to get the timeout functionality to work here.

Reproducible: Always

Steps to Reproduce:
1. Use gpg protected LUKS key for a partition opened with /etc/init.d/dmcrypt
2. Have gpg and pinentry-curses installed
3. Boot system
Actual Results:  
dmcrypt hangs while trying to open the partition in question, apparently the pinentry window appears somewhere in a background as is observable on system shutdown where it reappears for a short time.

Expected Results:  
When dmcrypt is started during boot, a pinentry-curses window should appear right away when a LUKS encrypted partition is about to be opened by dmcrypt and subsequently the parition should be accessible and checked by fsck. This was the behavior before the upgrade.

# emerge --info
laymansync module's module_spec is old, missing attribute: 'sourcefile'.  Backward compatibility may be removed in the future.
File: /usr/lib64/python3.4/site-packages/portage/sync/modules/laymansync/
Portage 2.3.0 (python 3.4.3-final-0, default/linux/amd64/13.0/desktop/plasma, gcc-4.9.3, glibc-2.22-r4, 4.4.6-gentoo x86_64)
System uname: Linux-4.4.6-gentoo-x86_64-Intel-R-_Core-TM-_i7-2620M_CPU_@_2.70GHz-with-gentoo-2.2
KiB Mem:     8131036 total,   2507364 free
KiB Swap:    8794072 total,   8794072 free
Timestamp of repository gentoo: Thu, 29 Sep 2016 01:45:01 +0000
sh bash 4.3_p46-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
distcc 3.2rc1 x86_64-pc-linux-gnu [enabled]
app-shells/bash:          4.3_p46-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.22.2::gentoo
dev-lang/python:          2.7.10-r1::gentoo, 3.4.3-r1::gentoo
dev-util/cmake:           3.5.2-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.21.7::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r4::gentoo

    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://server/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: --ignore-errors

    location: /usr/local/svn-portage
    masters: gentoo
    priority: 0

    location: /usr/local/portage
    masters: gentoo
    priority: 1

    location: /var/lib/layman/betagarden
    sync-type: laymansync
    sync-uri: git://
    masters: gentoo
    priority: 50

    location: /var/lib/layman/java
    sync-type: laymansync
    sync-uri: git://
    masters: gentoo
    priority: 50

    location: /var/lib/layman/kde
    sync-type: laymansync
    sync-uri: git://
    masters: gentoo
    priority: 50

    location: /var/lib/layman/palemoon
    sync-type: laymansync
    masters: gentoo
    priority: 50

    location: /var/lib/layman/qt
    sync-type: laymansync
    sync-uri: git://
    masters: gentoo
    priority: 50

    location: /var/lib/layman/sft
    sync-type: laymansync
    masters: gentoo
    priority: 50

    location: /var/lib/layman/sunrise
    sync-type: laymansync
    sync-uri: git://
    masters: gentoo
    priority: 50

Installed sets: @kdevelop
ACCEPT_LICENSE="* -@EULA OPERA-12 cadsoft AdobeFlash-11.x PUEL Oracle-BCLA-JavaSE google-chrome"
CFLAGS="-march=corei7-avx -maes -mavx -mcx16 -mfxsr -mpclmul -mpopcnt -msahf -msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2 -mssse3 -mxsave -mxsaveopt -O2 -pipe -fomit-frame-pointer -fforce-addr -ftracer"
CONFIG_PROTECT="/etc /usr/lib64/fax /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.3/conf /var/lib/hsqldb /var/spool/fax/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /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=corei7-avx -maes -mavx -mcx16 -mfxsr -mpclmul -mpopcnt -msahf -msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2 -mssse3 -mxsave -mxsaveopt -O2 -pipe -fomit-frame-pointer -fforce-addr -ftracer"
EMERGE_DEFAULT_OPTS="--quiet-build=n --with-bdeps=y --keep-going"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distcc distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j13 -l3"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
USE="X Xaw3d a52 aac aalib acl acpi alsa amd64 avx baloo branding bzip2 c++0x cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus declarative dga dri dts dvd dvdr emboss encode exif fam fbcon ffmpeg firefox flac gif glamor gmp gpm gstreamer htmlhandbook http2 iconv imlib ipv6 jpeg kde kipi latex lcms ldap libnotify lzma mad mikmod mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses nepomuk nls nptl ogg opengl openmp opus pam pango pcre pdf pgo phonon plasma png policykit ppds qml qt3support qt4 qt5 quicktime readline sdl seccomp semantic-desktop session spell sse sse2 sse3 sse4_1 ssl ssse3 startup-notification svg tcpd theora threads tiff truetype udev udisks unicode upower usb v4l vaapi vim-syntax vorbis widgets x264 xattr xcb xcomposite xinerama xml xprint xscreensaver xv xvid zlib" ABI_X86="64" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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" CALLIGRA_FEATURES="braindump flow gemini karbon kexi krita plan stage tables sheets words" CAMERAS="canon ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" 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 ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev joystick keyboard mouse synaptics" KERNEL="linux" L10N="de de-1901 en en-US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer nlpsolver pdfimport" LINGUAS="de en en_US" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python3_4 python2_7" RUBY_TARGETS="ruby20 ruby21" SANE_BACKENDS="dell1600n_net net" USERLAND="GNU" VIDEO_CARDS="intel nvidia nouveau nv vesa vga" 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"
USE_PYTHON="2.7 3.4"