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

David Härdeman david at hardeman.nu
Tue Oct 2 21:26:43 UTC 2007


On Tue, Oct 02, 2007 at 10:10:40PM +0100, Dick Middleton wrote:
> David Härdeman wrote:
>> On Mon, October 1, 2007 21:16, Dick Middleton wrote:
>>> I have a curious effect; sometimes I get an error with luksOpen such as
>>> this:
>>>
>>> Failed to setup dm-crypt key mapping.
>
>> The first message is usually reported when a module is missing, but then
>> it is curious that it would work later.
>
> This is the last of some 5 encrypted partitions that are opened.  The main 
> difference is that it's on a different physical device.

Oh, I see, then the tests I suggested are not relevant.
(please keep the bug report address in the CC by the way)

> The effect I was getting would recur by doing a sequence of several Open 
> Close cycles in quick succession.  From that it doesn't sound like a 
> missing module problem.
>
>> As a test, could you do the following:
>
> Tricky, the first invocation is in initrd.  That usually fails though so I 
> need to do some work to prove the point.
>
> I've just tried doing this again tonight and I've had no Open failures but 
> I'm still getting the occasional (i.e. doesn't happen every time) temporary 
> file created.  There's this error in dmesg:
>
> device-mapper: ioctl: unable to remove open device 
> temporary-cryptsetup-7228

Sounds like a race condition in device-mapper, not in cryptsetup. 
Perhaps the creation of the device-mapper node is noted by something (my 
guess would be udev, which likes to inspect new device nodes) which 
open()'s the device node before device-mapper gets to delete it...

It sounds very much like this bug:
https://bugs.launchpad.net/ubuntu/+source/cryptsetup/+bug/105266

Could you please try running crypsetup under strace and capture a failed 
invocation so that we can compare them? Please scan the strace log to 
make sure it doesn't include any encryption keys or other sensitive data 
before posting it.

-- 
David Härdeman





More information about the Pkg-cryptsetup-devel mailing list