Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
DescriptionCorey Marthaler
2022-08-24 21:24:37 UTC
Cloning for 8.8 tracking as well.
+++ This bug was initially created as a clone of Bug #2119473 +++
Description of problem: lvm crashes during recreation of a PV with a uuid of a missing PV
Version-Release number of selected component (if applicable): lvm2-2.03.16-3.el9
How reproducible: always
Steps to Reproduce:
1. Get an empty disk (e.g. /dev/vdb).
2. Install lvm2 package.
2. Create one partition on /dev/vdb (e.g. using fdisk).
3. # pvcreate /dev/vdb1
4. # pvscan -u
PV /dev/vdb1 with UUID LQbrRY-PusD-1f3b-bW0U-akcG-wEwy-s2DqBA lvm2 [<10.00 GiB]
Total: 1 [<10.00 GiB] / in use: 0 [0 ] / in no VG: 1 [<10.00 GiB]
5. # wipefs -fa /dev/vdb1
6. # lvm pvcreate -ff --yes -v --uuid LQbrRY-PusD-1f3b-bW0U-akcG-wEwy-s2DqBA --norestorefile /dev/vdb1
Devices file PVID LQbrRYPusD1f3bbW0UakcGwEwys2DqBA not found on device /dev/vdb1.
Wiping signatures on new PV /dev/vdb1.
WARNING: adding device /dev/vdb1 with PVID LQbrRYPusD1f3bbW0UakcGwEwys2DqBA which is already used for missing device.
Segmentation fault (core dumped)
Actual results: segmentation fault
Expected results: PV will be recreated without a crash.
Additional info:
Originally reported in bz2117937. This is not critical because a workaround on rear's side exists (see https://bugzilla.redhat.com/show_bug.cgi?id=2117937#c4).
Coredump stack trace:
#0 0x00007f65a449f8e2 __strcmp_evex (libc.so.6 + 0xcd8e2)
#1 0x000055e3471c76ec device_id_add (lvm + 0xb96ec)
#2 0x000055e3471914fa pvcreate_each_device (lvm + 0x834fa)
#3 0x000055e34717715d pvcreate (lvm + 0x6915d)
#4 0x000055e34716a935 lvm_run_command (lvm + 0x5c935)
#5 0x000055e34716c561 lvm2_main (lvm + 0x5e561)
#6 0x00007f65a4411eb0 __libc_start_call_main (libc.so.6 + 0x3feb0)
#7 0x00007f65a4411f60 __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x3ff60)
#8 0x000055e347146e45 _start (lvm + 0x38e45)
ELF object binary architecture: AMD x86-64
--- Additional comment from David Teigland on 2022-08-19 18:39:27 UTC ---
fixed on main branch
https://sourceware.org/git/?p=lvm2.git;a=commit;h=8c3cfc75c72696ae8b620555fcc4f815b0c1d6b6
Note that the test above requires the device to use IDTYPE=devname which causes the IDNAME to be cleared in the devices file when it becomes invalid. The blank IDNAME field is what reveals the bug. I used /dev/ram0 (which uses IDNAME=devname) to reproduced and verify.
--- Additional comment from Corey Marthaler on 2022-08-24 21:22:24 UTC ---
Adding QA ack for 9.2
SCENARIO - recreation_of_brd_pv_using_uuid_after_device_goes_missing: Ensure lvm can recreate a brd PV, which uses IDNAME=devname, using uuid once the device is wiped (bug 2119473)
Loading block ram disk module
adding entry to the devices file for /dev/ram6
creating PV on hayes-01 using device /dev/ram6
pvcreate --yes -ff /dev/ram6
Physical volume "/dev/ram6" successfully created.
PV uuid for /dev/ram6: UnPPU9M2CpjZFovviKRkBJ9NsnQvsw8G
Wiping brd header (wipefs -fa /dev/ram6)
/dev/ram6: 8 bytes were erased at offset 0x00000218 (LVM2_member): 4c 56 4d 32 20 30 30 31
pvcreate -ff --yes -v --uuid UnPPU9M2CpjZFovviKRkBJ9NsnQvsw8G --norestorefile /dev/ram6
Devices file PVID UnPPU9M2CpjZFovviKRkBJ9NsnQvsw8G not found on device /dev/ram6.
Wiping signatures on new PV /dev/ram6.
WARNING: adding device /dev/ram6 with PVID UnPPU9M2CpjZFovviKRkBJ9NsnQvsw8G which is already used for missing device.
pv-recreation failed with a valid uuid and wiped header (bug 2119473)
Aug 24 16:18:02 hayes-01 kernel: pvcreate[157676]: segfault at 0 ip 00007fb45bdb8192 sp 00007ffe16f5ff48 error 4 in libc-2.28.so[7fb45bcf0000+1bc000]
Aug 24 16:18:02 hayes-01 kernel: Code: 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 89 f8 31 d2 c5 c5 ef ff 09 f0 25 ff 0f 00 00 3d 80 0f 00 00 0f 8f 52 03 00 00 c5 fe 6f 0f <c5> f5 74 06 c5f
Marking Verifed:Tested in the latest 8.8 rpms.
kernel-4.18.0-442.el8.v2 BUILT: Mon Dec 5 21:06:21 CET 2022
lvm2-2.03.14-9.el8 BUILT: Thu Dec 8 17:40:55 CET 2022
lvm2-libs-2.03.14-9.el8 BUILT: Thu Dec 8 17:40:55 CET 2022
SCENARIO - recreation_of_brd_pv_using_uuid_after_device_goes_missing: Ensure lvm can recreate a brd PV, which uses IDNAME=devname, using uuid once the device is wiped (bug 2119473|2121237)
Loading block ram disk module
adding entry to the devices file for /dev/ram6
creating PV on virt-131.cluster-qe.lab.eng.brq.redhat.com using device /dev/ram6
pvcreate --yes -ff /dev/ram6
Physical volume "/dev/ram6" successfully created.
PV uuid for /dev/ram6: RjifW4aIJYYcM1YhOjNXzz25RHFvt8cC
Wiping brd header (wipefs -fa /dev/ram6)
/dev/ram6: 8 bytes were erased at offset 0x00000218 (LVM2_member): 4c 56 4d 32 20 30 30 31
pvcreate -ff --yes -v --uuid RjifW4aIJYYcM1YhOjNXzz25RHFvt8cC --norestorefile /dev/ram6
Physical volume "/dev/ram6" successfully created.
Devices file PVID RjifW4aIJYYcM1YhOjNXzz25RHFvt8cC not found on device /dev/ram6.
Wiping signatures on new PV /dev/ram6.
WARNING: adding device /dev/ram6 with PVID RjifW4aIJYYcM1YhOjNXzz25RHFvt8cC which is already used for missing device device_id none.
Set up physical volume for "/dev/ram6" with 32768 available sectors.
Zeroing start of device /dev/ram6.
Writing physical volume data to disk "/dev/ram6".
Checking for segfault notification (bug 2119473|2121237)
Re-scanning lvm PVs (pvscan --cache)
pvscan[2241] PV /dev/ram6 not used.
removing pv /dev/ram6 on virt-131.cluster-qe.lab.eng.brq.redhat.com
Labels on physical volume "/dev/ram6" successfully wiped.
removing entry from the devices file for /dev/ram6
Unloading block ram disk module
Marking VERIFIED with the latest kernel as well as prior fixed rpms.
kernel-4.18.0-449.el8.kpq0.g8c9e BUILT: Fri Jan 13 16:20:45 CET 2023
lvm2-2.03.14-9.el8 BUILT: Thu Dec 8 17:40:55 CET 2022
lvm2-libs-2.03.14-9.el8 BUILT: Thu Dec 8 17:40:55 CET 2022
SCENARIO - recreation_of_brd_pv_using_uuid_after_device_goes_missing: Ensure lvm can recreate a brd PV, which uses IDNAME=devname, using uuid once the device is wiped (bug 2119473|2121237)
Loading block ram disk module
adding entry to the devices file for /dev/ram6
creating PV on virt-520.cluster-qe.lab.eng.brq.redhat.com using device /dev/ram6
pvcreate --yes -ff /dev/ram6
Physical volume "/dev/ram6" successfully created.
WARNING: D-Bus notification failed: Connection timed out
PV uuid for /dev/ram6: 39o3Ijdtv1qsYygixXUX4ox0RQ3G6Tc9
Wiping brd header (wipefs -fa /dev/ram6)
/dev/ram6: 8 bytes were erased at offset 0x00000218 (LVM2_member): 4c 56 4d 32 20 30 30 31
pvcreate -ff --yes -v --uuid 39o3Ijdtv1qsYygixXUX4ox0RQ3G6Tc9 --norestorefile /dev/ram6
Physical volume "/dev/ram6" successfully created.
Devices file PVID 39o3Ijdtv1qsYygixXUX4ox0RQ3G6Tc9 not found on device /dev/ram6.
Wiping signatures on new PV /dev/ram6.
WARNING: adding device /dev/ram6 with PVID 39o3Ijdtv1qsYygixXUX4ox0RQ3G6Tc9 which is already used for missing device device_id none.
Set up physical volume for "/dev/ram6" with 32768 available sectors.
Zeroing start of device /dev/ram6.
Writing physical volume data to disk "/dev/ram6".
Checking for segfault notification (bug 2119473|2121237)
Re-scanning lvm PVs (pvscan --cache)
pvscan[26985] PV /dev/ram6 not used.
removing pv /dev/ram6 on virt-520.cluster-qe.lab.eng.brq.redhat.com
Labels on physical volume "/dev/ram6" successfully wiped.
removing entry from the devices file for /dev/ram6
Unloading block ram disk module
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-2023:3048