Bug 593487 - CryptoError: luks_close failed
Summary: CryptoError: luks_close failed
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: cryptsetup-luks   
(Show other bugs)
Version: 6.0
Hardware: All
OS: Linux
Target Milestone: beta
: ---
Assignee: Milan Broz
QA Contact: Release Test Team
Keywords: Regression
: 593671 594789 596340 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2010-05-18 22:13 UTC by Alex Williamson
Modified: 2018-10-27 10:50 UTC (History)
10 users (show)

Fixed In Version: cryptsetup-luks-1.1.1-1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-07-02 18:57:22 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
error report (214.51 KB, text/xml)
2010-05-18 22:15 UTC, Alex Williamson
no flags Details
not some crazy xml format (232.70 KB, text/plain)
2010-05-20 15:56 UTC, Alex Williamson
no flags Details

Description Alex Williamson 2010-05-18 22:13:41 UTC
Description of problem:

Installing to a system with a LUKS encrypted logical volume for home, anaconda asks for the passphrase, then crashes with the below backtrace.

<report><binding name="localhash">06c818d03e8cf22c647924bf402b40049795b82b815a246e22d8fe0a6764dafa</binding><binding name="description">The following was filed automatically by anaconda:
anaconda 13.21.39 exception report
Traceback (most recent call first):
  File "/usr/lib/anaconda/storage/devicelibs/crypto.py", line 120, in luks_close
    raise CryptoError("luks_close failed for %s" % name)
  File "/usr/lib/anaconda/storage/formats/luks.py", line 182, in teardown
  File "/usr/lib/anaconda/storage/devices.py", line 1667, in teardown
  File "/usr/lib/anaconda/storage/__init__.py", line 1293, in findExistingRootDevices
  File "/usr/lib/anaconda/upgrade.py", line 94, in findExistingRoots
    rootparts = findExistingRootDevices(anaconda, upgradeany=upgradeany)
  File "/usr/lib/anaconda/upgrade.py", line 81, in findRootParts
  File "/usr/lib/anaconda/dispatch.py", line 205, in moveStep
    rc = stepFunc(self.anaconda)
  File "/usr/lib/anaconda/dispatch.py", line 126, in gotoNext
  File "/usr/lib/anaconda/gui.py", line 1348, in setScreen
  File "/usr/lib/anaconda/gui.py", line 1261, in nextClicked
    self.setScreen ()
CryptoError: luks_close failed for luks-94a3ee80-0366-41a9-9247-0802a4a50385

Full report to be attached

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Attempt to install to a system with an existing volume group containing an encrypted logical volume
Actual results:

Expected results:

Additional info:

Comment 1 Alex Williamson 2010-05-18 22:15:08 UTC
Created attachment 414976 [details]
error report

Comment 3 Bill Nottingham 2010-05-19 18:33:18 UTC
*** Bug 593671 has been marked as a duplicate of this bug. ***

Comment 4 Chris Lumens 2010-05-20 15:25:47 UTC
Can you please attach the /tmp/anaconda-tb-* file as plain text, not as some crazy xml format?

Comment 5 Alexander Todorov 2010-05-20 15:40:33 UTC
does the attachment on the duplicate bug help:

Comment 6 Alex Williamson 2010-05-20 15:56:18 UTC
Created attachment 415453 [details]
not some crazy xml format

Comment 7 David Lehman 2010-05-21 17:47:43 UTC
The error code from python-cryptsetup is -15 (-ENOTBLK).

This seems to be a general failure to close/unmap LUKS devices whose backing device is also a device-mapper device.

To reproduce, format any LV as LUKS. Activate the LV, run cryptsetup luksOpen to map it, then try to unmap it using cryptsetup luksClose. You will get a failure much like this:

  Device 253:0 doesn't exist or access denied.

Comment 8 Milan Broz 2010-05-21 19:00:44 UTC
I really wonder what I broke here... 
This should be covered by usptream regression tests.
Anyway, I can reproduce it in RHEL6.

Comment 9 Milan Broz 2010-05-23 14:31:09 UTC
Fixed upstream, POST for now.

Comment 10 Bill Burns 2010-05-24 17:44:14 UTC
*** Bug 594789 has been marked as a duplicate of this bug. ***

Comment 11 Milan Broz 2010-05-25 08:44:20 UTC
Fixed in cryptsetup-luks-1.1.1-1.el6.

Comment 13 David Cantrell 2010-05-27 15:58:34 UTC
*** Bug 596340 has been marked as a duplicate of this bug. ***

Comment 15 Alexander Todorov 2010-06-15 10:02:20 UTC
I've used the steps to reproduce from the duplicate bug and tested with 0610.n.0 tree. No traceback. Moving to VERIFIED.

Comment 17 releng-rhel@redhat.com 2010-07-02 18:57:22 UTC
Red Hat Enterprise Linux Beta 2 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

Note You need to log in before you can comment on or make changes to this bug.