Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 593487 - CryptoError: luks_close failed
CryptoError: luks_close failed
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: cryptsetup-luks (Show other bugs)
All Linux
high Severity high
: beta
: ---
Assigned To: Milan Broz
Release Test Team
: Regression
: 593671 594789 596340 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2010-05-18 18:13 EDT by Alex Williamson
Modified: 2018-10-27 06:50 EDT (History)
10 users (show)

See Also:
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 14:57:22 EDT
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 18:15 EDT, Alex Williamson
no flags Details
not some crazy xml format (232.70 KB, text/plain)
2010-05-20 11:56 EDT, Alex Williamson
no flags Details

  None (edit)
Description Alex Williamson 2010-05-18 18:13:41 EDT
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 18:15:08 EDT
Created attachment 414976 [details]
error report
Comment 3 Bill Nottingham 2010-05-19 14:33:18 EDT
*** Bug 593671 has been marked as a duplicate of this bug. ***
Comment 4 Chris Lumens 2010-05-20 11:25:47 EDT
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 11:40:33 EDT
does the attachment on the duplicate bug help:
Comment 6 Alex Williamson 2010-05-20 11:56:18 EDT
Created attachment 415453 [details]
not some crazy xml format
Comment 7 David Lehman 2010-05-21 13:47:43 EDT
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 15:00:44 EDT
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 10:31:09 EDT
Fixed upstream, POST for now.
Comment 10 Bill Burns 2010-05-24 13:44:14 EDT
*** Bug 594789 has been marked as a duplicate of this bug. ***
Comment 11 Milan Broz 2010-05-25 04:44:20 EDT
Fixed in cryptsetup-luks-1.1.1-1.el6.
Comment 13 David Cantrell 2010-05-27 11:58:34 EDT
*** Bug 596340 has been marked as a duplicate of this bug. ***
Comment 15 Alexander Todorov 2010-06-15 06:02:20 EDT
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 14:57:22 EDT
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.