Bug 1835450
Summary: | dmeventd segfault after attempting to derypt closed luks volume using OLD cryptsetup-reencrypt utility | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Corey Marthaler <cmarthal> |
Component: | lvm2 | Assignee: | David Teigland <teigland> |
lvm2 sub component: | dmeventd | QA Contact: | cluster-qe <cluster-qe> |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | high | ||
Priority: | unspecified | CC: | agk, heinzm, jbrassow, mcsontos, msnitzer, pasik, prajnoha, rhandlin, tbzatek, thornber, zkabelac |
Version: | 8.2 | ||
Target Milestone: | rc | ||
Target Release: | 8.0 | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | lvm2-2.03.09-4.el8 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-11-04 02:00:25 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 1809571 | ||
Bug Blocks: |
Description
Corey Marthaler
2020-05-13 19:53:03 UTC
Passing to Dave for exploration - since there were some 'hints' changes recently - f50e7ce76c0c6b2745d0ed2a766f46cea07f310c. Looking at bug 1809571 with QA failed - it likely might be duplicate. It's unusual to end up with a device where all path names have been removed, so it has no name. I don't know how to create/reproduce that, so I've not been able to verify this patch, but I expect it helps. If we found a way to routinely test devs with no name, we'd probably find other places with problems, and it's likely that we will want to just drop a device entirely from dev-cache if all names have been removed. https://sourceware.org/git/?p=lvm2.git;a=commit;h=2f29765e7fd1135d070310683cf486f07d041c81 Marking verified in the rpms. kernel-4.18.0-232.el8 BUILT: Mon Aug 10 02:17:54 CDT 2020 lvm2-2.03.09-5.el8 BUILT: Wed Aug 12 15:51:50 CDT 2020 lvm2-libs-2.03.09-5.el8 BUILT: Wed Aug 12 15:51:50 CDT 2020 lvm2-lockd-2.03.09-5.el8 BUILT: Wed Aug 12 15:51:50 CDT 2020 device-mapper-1.02.171-5.el8 BUILT: Wed Aug 12 15:51:50 CDT 2020 device-mapper-libs-1.02.171-5.el8 BUILT: Wed Aug 12 15:51:50 CDT 2020 device-mapper-event-1.02.171-5.el8 BUILT: Wed Aug 12 15:51:50 CDT 2020 device-mapper-event-libs-1.02.171-5.el8 BUILT: Wed Aug 12 15:51:50 CDT 2020 I ran many iterations of the scenario that caused this (listed in comment #0) and saw no issues. Create snapshots of origin with fs data, and then verify that data on snapshots in between encryption operations Making pool volume lvcreate --thinpool POOL -L 4G --zero y --poolmetadatasize 4M snapper_thinp Sanity checking pool device (POOL) metadata thin_check /dev/mapper/snapper_thinp-meta_swap.973 examining superblock examining devices tree examining mapping tree checking space map counts Making origin volume lvcreate --virtualsize 1G -T snapper_thinp/POOL -n origin lvcreate --virtualsize 1G -T snapper_thinp/POOL -n other1 lvcreate --virtualsize 1G -T snapper_thinp/POOL -n other2 lvcreate -V 1G -T snapper_thinp/POOL -n other3 lvcreate -V 1G -T snapper_thinp/POOL -n other4 WARNING: Sum of all thin volume sizes (5.00 GiB) exceeds the size of thin pool snapper_thinp/POOL (4.00 GiB). lvcreate -V 1G -T snapper_thinp/POOL -n other5 WARNING: Sum of all thin volume sizes (6.00 GiB) exceeds the size of thin pool snapper_thinp/POOL (4.00 GiB). Placing an xfs filesystem on origin volume Mounting origin volume Writing files to /mnt/origin Checking files on /mnt/origin syncing before snap creation... Making 1st snapshot of origin volume lvcreate -y -k n -s /dev/snapper_thinp/origin -n fs_snap1 Mounting 1st snap volume Checking files on /mnt/fs_snap1 Writing files to /mnt/origin syncing before snap creation... Making 2nd snapshot of origin volume lvcreate -y -k n -s /dev/snapper_thinp/origin -n fs_snap2 Mounting 2nd snap volume Checking files on /mnt/fs_snap2 Writing files to /mnt/origin syncing before snap creation... Encrypt existing filesystem using a detached header file (RFE 1566005) cryptsetup reencrypt --encrypt /dev/snapper_thinp/origin --header /tmp/luks_detachedheader.1766523 cryptsetup luksOpen --disable-keyring /dev/snapper_thinp/origin luks_origin --header /tmp/luks_detachedheader.1766523 Checking files on /mnt/origin Checking files on /mnt/origin Checking files on /mnt/origin Writing files to /mnt/origin Checking files on /mnt/origin Making 3rd snapshot of origin volume lvcreate -y -k n -s /dev/snapper_thinp/origin -n fs_snap3 cryptsetup luksOpen /dev/snapper_thinp/fs_snap3 fs_snap3 --header /tmp/luks_detachedheader_snap3.1766523 Mounting 3rd snap volume Checking files on /mnt/fs_snap1 Checking files on /mnt/fs_snap2 Checking files on /mnt/fs_snap2 Checking files on /mnt/fs_snap3 Checking files on /mnt/fs_snap3 Checking files on /mnt/fs_snap3 Checking files on /mnt/fs_snap3 umount /mnt/fs_snap1 /mnt/fs_snap2 /mnt/fs_snap3 /mnt/origin cryptsetup luksClose fs_snap3 cryptsetup luksClose luks_origin Decrypt and verify underlying LV before removal First w/ old utility (bug 1743891): cryptsetup-reencrypt --decrypt /dev/snapper_thinp/origin --header /tmp/luks_detachedheader.1766523 Second (attenpt) w/ new utility: cryptsetup reencrypt --decrypt /dev/snapper_thinp/origin --header /tmp/luks_detachedheader.1766523 mount /dev/snapper_thinp/origin /mnt/origin Checking files on /mnt/origin Checking files on /mnt/origin Checking files on /mnt/origin Checking files on /mnt/origin Removing snap volume snapper_thinp/fs_snap1 lvremove -f /dev/snapper_thinp/fs_snap1 Removing snap volume snapper_thinp/fs_snap2 lvremove -f /dev/snapper_thinp/fs_snap2 Removing snap volume snapper_thinp/fs_snap3 lvremove -f /dev/snapper_thinp/fs_snap3 Removing thin origin and other virtual thin volumes Removing pool snapper_thinp/POOL Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (lvm2 bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:4546 |