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 2150348 - lvm display cmds all segfault with sys_serial idtype devices present: "Checking 1 PVs with suspect serial numbers"
Summary: lvm display cmds all segfault with sys_serial idtype devices present: "Checki...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: lvm2
Version: 9.2
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:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-12-02 15:46 UTC by Corey Marthaler
Modified: 2023-05-09 10:37 UTC (History)
8 users (show)

Fixed In Version: lvm2-2.03.17-3.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-09 08:23:51 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker CLUSTERQE-6280 0 None None None 2022-12-02 20:07:57 UTC
Red Hat Issue Tracker RHELPLAN-141203 0 None None None 2022-12-02 15:52:27 UTC
Red Hat Product Errata RHBA-2023:2544 0 None None None 2023-05-09 08:24:05 UTC

Description Corey Marthaler 2022-12-02 15:46:40 UTC
Description of problem:
[root@hayes-03 ~]# lvmdevices --deviceidtype devname --adddev /dev/sdg1
[root@hayes-03 ~]# vgs
[root@hayes-03 ~]# pvs

[root@hayes-03 ~]# lvmdevices --deviceidtype sys_serial --adddev /dev/sdg1
[root@hayes-03 ~]# vgs
Segmentation fault
[root@hayes-03 ~]# pvs
Segmentation fault
[root@hayes-03 ~]# lvs
Segmentation fault
[root@hayes-03 ~]# lvdisplay
Segmentation fault


[root@hayes-03 ~]# pvs -vvvv
[...]
09:35:29.272607 pvs[27936] device/dev-io.c:120  /dev/sdn: size is 3905945600 sectors
09:35:29.272615 pvs[27936] device/dev-io.c:466  Closed /dev/sdn
09:35:29.272664 pvs[27936] device/dev-io.c:120  /dev/sdn1: size is 3905945520 sectors
09:35:29.272672 pvs[27936] device/dev-io.c:466  Closed /dev/sdn1
09:35:29.272737 pvs[27936] device/dev-io.c:120  /dev/sdo: size is 3905945600 sectors
09:35:29.272746 pvs[27936] device/dev-io.c:466  Closed /dev/sdo
09:35:29.272796 pvs[27936] device/dev-io.c:120  /dev/sdo1: size is 3905945520 sectors
09:35:29.272804 pvs[27936] device/dev-io.c:466  Closed /dev/sdo1
09:35:29.272870 pvs[27936] device/dev-io.c:120  /dev/sdp: size is 3905945600 sectors
09:35:29.272879 pvs[27936] device/dev-io.c:466  Closed /dev/sdp
09:35:29.272930 pvs[27936] device/dev-io.c:120  /dev/sdp1: size is 3905945520 sectors
09:35:29.272939 pvs[27936] device/dev-io.c:466  Closed /dev/sdp1
09:35:29.272998 pvs[27936] device/device_id.c:2526  Reading and filtering 2 devs with suspect serial numbers.
09:35:29.273010 pvs[27936] label/label.c:568  open /dev/sdg ro di 0 fd 5
09:35:29.273448 pvs[27936] device/device_id.c:2547  serial 0083c91d2209183c2300e1d883604609 no pvid /dev/sdg
09:35:29.273460 pvs[27936] device/device_id.c:2538  serial 0083c91d2209183c2300e1d883604609 nolabel /dev/sdg1
09:35:29.273468 pvs[27936] device/device_id.c:2562  Checking 1 PVs with suspect serial numbers.
Segmentation fault


[root@hayes-03 ~]# ls -ln /dev/sdg
brw-rw----. 1 0 6 8, 96 Dec  1 12:04 /dev/sdg
[root@hayes-03 ~]# cat /sys/dev/block/8:96/device/vpd_pg80
 0083c91d2209183c2300e1d883604609[root@hayes-03 ~]# 
[root@hayes-03 ~]# cat /sys/dev/block/8:96/device/vpd_pg80
 0083c91d2209183c2300e1d883604609[root@hayes-03 ~]# 
[root@hayes-03 ~]# 
[root@hayes-03 ~]# 
[root@hayes-03 ~]# hexdump -C /sys/dev/block/8\:96/device/vpd_pg80
00000000  00 80 00 20 30 30 38 33  63 39 31 64 32 32 30 39  |... 0083c91d2209|
00000010  31 38 33 63 32 33 30 30  65 31 64 38 38 33 36 30  |183c2300e1d88360|
00000020  34 36 30 39                                       |4609|
00000024
[root@hayes-03 ~]# cat /etc/lvm/devices/system.devices 
# LVM uses devices listed in this file.
# Created by LVM command lvmdevices pid 27933 at Fri Dec  2 09:34:46 2022
VERSION=1.1.1014
IDTYPE=sys_serial IDNAME=0083c91d2209183c2300e1d883604609 DEVNAME=/dev/sdg1 PVID=. PART=1


Version-Release number of selected component (if applicable):
kernel-5.14.0-176.el9    BUILT: Wed Oct 12 03:57:18 AM CDT 2022
lvm2-2.03.17-1.el9    BUILT: Thu Nov 10 10:02:16 AM CST 2022
lvm2-libs-2.03.17-1.el9    BUILT: Thu Nov 10 10:02:16 AM CST 2022

Comment 1 Corey Marthaler 2022-12-02 16:30:49 UTC
This is in the latest -2 9.2 build as well.

kernel-5.14.0-201.kpq1.el9    BUILT: Wed Nov 23 07:13:08 AM CST 2022
lvm2-2.03.17-2.el9    BUILT: Wed Nov 30 02:56:30 AM CST 2022
lvm2-libs-2.03.17-2.el9    BUILT: Wed Nov 30 02:56:30 AM CST 2022

Comment 2 Corey Marthaler 2022-12-02 17:51:56 UTC
Core was generated by `pvscan'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000055f4c82e9a50 in memcpy (__len=<optimized out>, __src=<optimized out>, __dest=<optimized out>) at ../base/data-struct/list.c:36
36              assert(head->n);
(gdb) bt
#0  0x000055f4c82e9a50 in memcpy (__len=<optimized out>, __src=<optimized out>, __dest=<optimized out>) at ../base/data-struct/list.c:36
#1  device_ids_check_serial (cmd=0x55f4c9935a30, scan_devs=0x7ffc93747070, update_needed=0x0, noupdate=0) at ../lib/device/device_id.c:2579
#2  0x000055f4c82ca88c in lvmcache_label_scan (cmd=0x55f4c9935a30) at ../lib/cache/lvmcache.c:1626
#3  0x000055f4c82ac4f1 in process_each_pv (cmd=0x55f4c9935a30, argc=<optimized out>, argv=<optimized out>, only_this_vgname=<optimized out>, 
    all_is_set=<optimized out>, read_flags=<optimized out>, handle=<optimized out>, process_single_pv=<optimized out>)
    at /usr/src/debug/lvm2-2.03.17-2.el9.x86_64/tools/toollib.c:4619
#4  0x000055f4c8297692 in pvscan_display_cmd (cmd=0x55f4c9935a30, argc=0, argv=0x7ffc93747b90) at /usr/src/debug/lvm2-2.03.17-2.el9.x86_64/tools/pvscan.c:162
#5  0x000055f4c8289cbf in lvm_run_command (cmd=<optimized out>, argc=<optimized out>, argv=<optimized out>)
    at /usr/src/debug/lvm2-2.03.17-2.el9.x86_64/tools/lvmcmdline.c:3314
#6  0x000055f4c828bb31 in lvm2_main (argc=1, argv=0x7ffc93747b88) at /usr/src/debug/lvm2-2.03.17-2.el9.x86_64/tools/lvmcmdline.c:3847
#7  0x00007fdc95c3feb0 in __libc_start_call_main (main=main@entry=0x55f4c8265e30 <main>, argc=argc@entry=1, argv=argv@entry=0x7ffc93747b88)
    at ../sysdeps/nptl/libc_start_call_main.h:58
#8  0x00007fdc95c3ff60 in __libc_start_main_impl (main=0x55f4c8265e30 <main>, argc=1, argv=0x7ffc93747b88, init=<optimized out>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x7ffc93747b78) at ../csu/libc-start.c:389
#9  0x000055f4c8265f05 in _start ()

Comment 3 David Teigland 2022-12-02 18:28:29 UTC
fix in main
https://sourceware.org/git/?p=lvm2.git;a=commit;h=6613a61d3b5ce4d12a6fef79195eac34f30ef4da

Non-PV devices (which have no PVID) were not being excluded from the serial number verification, which is based on using PVIDs.

Comment 4 Corey Marthaler 2022-12-08 21:43:21 UTC
Fix verified in the latest build. Marking Verified:Tested.

kernel-5.14.0-205.el9    BUILT: Fri Dec  2 07:14:37 AM CST 2022
lvm2-2.03.17-3.el9    BUILT: Wed Dec  7 10:41:40 AM CST 2022
lvm2-libs-2.03.17-3.el9    BUILT: Wed Dec  7 10:41:40 AM CST 2022



SCENARIO - attempt_all_valid_deviceidtypes:  Test basic devicesfile addition using all known deviceidtypes (1974337|2136906)
Available idtypes to attempt: ['sys_wwid', 'devname', 'sys_serial']

[...]

adding entry to the devices file for /dev/sdg1
removing entry from the devices file for /dev/sdg1
Add devices file entry with overriden type **sys_serial** for /dev/sdg1
lvmdevices --deviceidtype sys_serial --adddev /dev/sdg1
Grabbing serial name from /sys/dev/block/.../evice/vpd_pg80
major=8 minor=96
sysfs idname: 00e969781f062abd22001e0d65604609
devicesfile idname: 00e969781f062abd22001e0d65604609


[root@hayes-03 ~]# cat /etc/lvm/devices/system.devices 
# LVM uses devices listed in this file.
# Created by LVM command lvmdevices pid 2977 at Thu Dec  8 12:38:42 2022
VERSION=1.1.499
IDTYPE=sys_serial IDNAME=0083c91d2209183c2300e1d883604609 DEVNAME=/dev/sdg1 PVID=. PART=1
[root@hayes-03 ~]# pvs
[root@hayes-03 ~]# vgs
[root@hayes-03 ~]# lvs

Comment 10 errata-xmlrpc 2023-05-09 08:23:51 UTC
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:2544


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