← Back to team overview

registry team mailing list archive

[Bug 484429] Re: Plugging in a LUKS device causes the following error: Error unlocking device: cryptsetup exited with exit code 239: Command failed: Device already exists

 

Launchpad has imported 5 comments from the remote bug at
http://bugs.freedesktop.org/show_bug.cgi?id=30332.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2010-09-22T13:21:00+00:00 Mathieu Trudel wrote:

As reported in Launchpad here:
https://bugs.edge.launchpad.net/ubuntu/lucid/+source/gnome-disk-
utility/+bug/484429

It seems that udisks doesn't tear down cleartext LUKS devices when its
slave is forcibly removed, for example, by unplugging a USB drive which
holds a LUKS-encrypted partition.

Re-inserting the device then yields the usual password prompt to decrypt
the device, but fails to load it with a cryptsetup error:

Error unlocking device: cryptsetup exited with exit code 239: Device
udisks-luks-uuid-7bdbda08-473f-41eb-9837-88a4285b1c05-uid1000 already
exists.

Reply at: https://bugs.launchpad.net/udisks/+bug/484429/comments/18

------------------------------------------------------------------------
On 2010-09-22T13:28:04+00:00 Mathieu Trudel wrote:

Created an attachment (id=38888)
use luks_holder property to identify luks cleartext device

It seems that using device->priv->luks_holder for the device that is
being remove still contains the name of the cleartext LUKS device that
requires that slave, so it's possible to use it to immediately get which
device to use for force_luks_teardown().

Reply at: https://bugs.launchpad.net/udisks/+bug/484429/comments/19

------------------------------------------------------------------------
On 2010-09-23T08:27:31+00:00 Mathieu Trudel wrote:

Created an attachment (id=38904)
updated patch

udisks would segfault if the device was ejected from Nautilus... this is
because luks_holder is NULL in that case.

Reply at: https://bugs.launchpad.net/udisks/+bug/484429/comments/21

------------------------------------------------------------------------
On 2010-09-27T05:46:15+00:00 Martin Pitt wrote:

I can reproduce this bug.

Reply at: https://bugs.launchpad.net/udisks/+bug/484429/comments/22

------------------------------------------------------------------------
On 2010-09-27T06:22:48+00:00 Martin Pitt wrote:

Thanks! This patch makes a sense, and I confirm that it now behaves
correctly with both regular unmount and yanking out a mounted encrypted
USB stick. Pushed to git master.

I'll try to write a test case for this, too.

Reply at: https://bugs.launchpad.net/udisks/+bug/484429/comments/23


** Changed in: udisks
       Status: Unknown => Fix Released

** Changed in: udisks
   Importance: Unknown => Medium

-- 
Plugging in a LUKS device causes the following error: Error unlocking device: cryptsetup exited with exit code 239: Command failed: Device already exists
https://bugs.launchpad.net/bugs/484429
You received this bug notification because you are a member of Registry
Administrators, which is the registrant for Debian.