RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 593487 - CryptoError: luks_close failed
Summary: CryptoError: luks_close failed
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: cryptsetup-luks
Version: 6.0
Hardware: All
OS: Linux
high
high
Target Milestone: beta
: ---
Assignee: Milan Broz
QA Contact: Release Test Team
URL:
Whiteboard:
: 593671 594789 596340 (view as bug list)
Depends On:
Blocks:
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:
Clone Of:
Environment:
Last Closed: 2010-07-02 18:57:22 UTC
Target Upstream Version:
Embargoed:


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
    crypto.luks_close(self.mapName)
  File "/usr/lib/anaconda/storage/devices.py", line 1667, in teardown
    self.slave.originalFormat.teardown()
  File "/usr/lib/anaconda/storage/__init__.py", line 1293, in findExistingRootDevices
    device.teardown(recursive=True)
  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
    flags.cmdline.has_key("upgradeany"))
  File "/usr/lib/anaconda/dispatch.py", line 205, in moveStep
    rc = stepFunc(self.anaconda)
  File "/usr/lib/anaconda/dispatch.py", line 126, in gotoNext
    self.moveStep()
  File "/usr/lib/anaconda/gui.py", line 1348, in setScreen
    self.anaconda.dispatch.gotoNext()
  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):
RHEL6.0-20100512.0-Server-x86_64-DVD1.iso

How reproducible:
100%

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

Expected results:
Success

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
Chris,
does the attachment on the duplicate bug help:
https://bugzilla.redhat.com/attachment.cgi?id=415103

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.