I have a system with several encrypted partitions. root is unlocked using a statically linked version of cryptsetup inside the initramfs. The other partitions (swap and two data partitions) are unlocked using /etc/init.d/dmcrypt with keyfiles from the then-unlocked rootfs. This setup was working well for over one year now until suddenly (about a week ago), the system freezes on bootup at the dmcrypt init step (unlocking the rootfs with password worked without a problem). I used a backup system from bootable USB stick and cryptsetup works perfect there (the partitions are okay and readable). I removed dmcrypt from the runlevels and rebooted, which worked. Then I tried running cryptsetup manually and it freezes. When I unpack the binary from the initramfs it also just stalls (and that binary succeeded in unlocking the rootfs after all). The last lines from strace are: strace cryptsetup luksOpen -d /keyfiles/swapkey /dev/disk/by-id/ata-KINGSTON_SNV425S264GB_07MA20040388-part2 swap ... ioctl(3, DM_DEV_CREATE, 0x15118e0) = 0 ioctl(3, DM_TABLE_LOAD, 0x15118e0) = 0 ioctl(3, DM_DEV_SUSPEND, 0x15118e0) = 0 semget(0xd4daa40, 1, 0) = 1671189 semctl(1671189, 0, GETVAL, 0xffffffffffffffff) = 2 semop(1671189, {{0, -1, IPC_NOWAIT}}, 1) = 0 semop(1671189, {{0, 0, 0}}, 1 with some searching on the internet it looks like that is a problem with udev but I couldn't find a working solution. Reproducible: Always
Created attachment 335816 [details] emerge --info
This might fix it: emerge -1av $(qfile -CSq /usr/lib/udev | xargs) qfile belongs to app-portage/portage-utils package. *** This bug has been marked as a duplicate of bug 451266 ***
I had a similar issue with a similar strace, and rebuilding lvm2 solved it (don't know if you are using lvm or not).
(In reply to comment #3) > I had a similar issue with a similar strace, and rebuilding lvm2 solved it > (don't know if you are using lvm or not). Indeed, that fixed it here. Further discussion in https://bugs.gentoo.org/show_bug.cgi?id=451266