[Pkg-cryptsetup-devel] Bug#444914: Bug#444914: temporary-cryptsetup-$$ files appear in /dev/mapper

David Härdeman david at hardeman.nu
Fri Oct 5 07:57:24 UTC 2007


On Mon, October 1, 2007 21:16, Dick Middleton wrote:
> Package: cryptsetup
> Version: 2:1.0.5-2
> Severity: important
>
>
> I have a curious effect; sometimes I get an error with luksOpen such as
> this:
>
> Failed to setup dm-crypt key mapping.
> Check kernel for support for the aes-cbc-plain cipher spec and verify that
> /dev/mapper/vg02-devil contains at least 261 sectors.
> Failed to read from key storage
> Command failed: No key available with this passphrase.
>
> None of these problems exist - it's a perfectly valid luks partition
> so the cause remains a mystery for the moment .... however:
>
> On a subsequent attempt to luksOpen it will most likely succeed but
> there then remains a file /dev/mapper/temporary-cryptsetup-$$ where $$
> is obviously a process number.  This file can be removed with a
> luksClose.
>
> To reiterate, this file remains after a subsequent successful attempt
> not after the preceeding failure.
>
> This problem has only appeared on my system after upgrading the
> hardware from a k7 system to an amd64 system and changing to a Debian
> stock kernel (2.6.22-2-amd64) rather than a home brew (2.6.19) one.

Ok, I've compared the two strace logs (they can be found in the bug
report) and the error in the failure log seems to be at line 287 where
some process has opened the temporary device that libdevmapper created
(meaning libdevmapper can't remove it and errors out).

I believe that you're seeing a race between libdevmapper and udev in the
creation of the dm-* devices (and you probably see it now because you have
a faster machine).

The problem seems to be documented here (and the ubuntu patch to
libdevmapper seems to contain some relevant code):
https://wiki.ubuntu.com/UdevDeviceMapper

So, I'm CC:ing the maintainers for libdevmapper and udev to ask their
advice before I reassign this BR.

-- 
David Härdeman






More information about the Pkg-cryptsetup-devel mailing list