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 1583805 - vgcfgrestore segfaults if attempted with missing PV
Summary: vgcfgrestore segfaults if attempted with missing PV
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2
Version: 6.9
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: LVM and device-mapper development team
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On: 1348327
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-29 18:13 UTC by Corey Marthaler
Modified: 2019-02-07 20:50 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1348327
Environment:
Last Closed: 2018-06-04 21:37:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Comment 3 Corey Marthaler 2018-05-29 18:25:07 UTC
SCENARIO - [vgcfgrestore_mirror_with_missing_pv]
Create a mirror, force remove a leg, and then restore it's VG
mckinley-04: lvcreate  --type mirror -m 1 -n missing_pv_mirror -L 100M --nosync mirror_sanity
  WARNING: New mirror won't be synchronised. Don't read what you didn't write!
Deactivating missing_pv_mirror mirror
Backup the VG config
mckinley-04 vgcfgbackup -f /tmp/mirror_sanity.bkup.25530 mirror_sanity
Force removing PV /dev/mapper/mpathbp1 (used in this mirror)
mckinley-04: 'pvremove -ff --yes /dev/mapper/mpathbp1'
  WARNING: PV /dev/mapper/mpathbp1 belongs to Volume Group mirror_sanity (consider using vgreduce).
  WARNING: Wiping physical volume label from /dev/mapper/mpathbp1 of volume group "mirror_sanity"
Verifying that this VG is now corrupt
  WARNING: Device for PV LijBYU-jbu2-L4gF-fLib-rFFJ-yCaD-YhnUf4 not found or rejected by a filter.
  Failed to find physical volume "/dev/mapper/mpathbp1".
Attempt to restore the VG back to it's original state (should not segfault)
mckinley-04 vgcfgrestore -f /tmp/mirror_sanity.bkup.25530 mirror_sanity
  Couldn't find device with uuid LijBYU-jbu2-L4gF-fLib-rFFJ-yCaD-YhnUf4.
Checking syslog to see if vgcfgrestore segfaulted
vgcfgrestore segfaulted on mckinley-04



Core was generated by `vgcfgrestore -f /tmp/mirror_sanity.bkup.18353 mirror_sanity'.
Program terminated with signal 11, Segmentation fault.
#0  __strncpy_ssse3 () at ../sysdeps/x86_64/multiarch/strcpy.S:94
94              pcmpeqb (%rsi), %xmm0                   /* compare 16 bytes in (%rsi) and %xmm0 for equality, try to find null char*/
(gdb) 
(gdb) 
(gdb) bt
#0  __strncpy_ssse3 () at ../sysdeps/x86_64/multiarch/strcpy.S:94
#1  0x00005610d060fa6a in lvmcache_info_from_pvid (pvid=<value optimized out>, valid_only=0) at /usr/include/bits/string3.h:121
#2  0x00005610d062a5a8 in _restore_vg_should_write_pv (cmd=0x5610d0f91110, vg=0x5610d1d9b800, pp=0x0, drop_lvmetad=1) at format_text/archiver.c:342
#3  backup_restore_vg (cmd=0x5610d0f91110, vg=0x5610d1d9b800, pp=0x0, drop_lvmetad=1) at format_text/archiver.c:452
#4  0x00005610d062a8ca in backup_restore_from_file (cmd=0x5610d0f91110, vg_name=<value optimized out>, file=<value optimized out>, force=0) at format_text/archiver.c:534
#5  0x00005610d05fc9e9 in vgcfgrestore (cmd=0x5610d0f91110, argc=<value optimized out>, argv=<value optimized out>) at vgcfgrestore.c:63
#6  0x00005610d05e54e9 in lvm_run_command (cmd=0x5610d0f91110, argc=1, argv=0x7ffce7cff6b0) at lvmcmdline.c:1655
#7  0x00005610d05e9779 in lvm2_main (argc=4, argv=0x7ffce7cff698) at lvmcmdline.c:2121
#8  0x00007f39fd0d3d1d in __libc_start_main (main=0x5610d0606290 <main>, argc=4, ubp_av=0x7ffce7cff698, init=<value optimized out>, fini=<value optimized out>, rtld_fini=<value optimized out>, 
    stack_end=0x7ffce7cff688) at libc-start.c:226
#9  0x00005610d05ce299 in _start ()


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