Bug 1769713
| Summary: | RHEL8.1 RC1: lvdisplay giving segfault | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Akanksha.Pandey1 | ||||||
| Component: | lvm2 | Assignee: | LVM and device-mapper development team <lvm-team> | ||||||
| lvm2 sub component: | Command-line tools | QA Contact: | cluster-qe <cluster-qe> | ||||||
| Status: | CLOSED DUPLICATE | Docs Contact: | |||||||
| Severity: | high | ||||||||
| Priority: | unspecified | CC: | agk, Akanksha.Pandey1, ashankar, codonell, dj, fweimer, heinzm, jbrassow, marappan_gopinath, mcsontos, mnewsome, msnitzer, pfrankli, prajnoha, thornber, zkabelac | ||||||
| Version: | 8.1 | ||||||||
| Target Milestone: | rc | ||||||||
| Target Release: | 8.0 | ||||||||
| Hardware: | All | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2019-11-08 09:06:08 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: | |||||||||
| Attachments: |
|
||||||||
|
Description
Akanksha.Pandey1
2019-11-07 09:45:05 UTC
Would you please attach the coredump to this bug? You should be able to write to a file using “coredumpctl dump 4067 | gzip -9 > core.4067.gz”. Thanks. Created attachment 1633864 [details]
Core dump for the lvdisplay process
Thanks. It looks like that lvdisplay calls memcpy with a null pointer with a small offset:
(gdb) bt
#0 __memmove_sse2_unaligned_erms ()
at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:311
#1 0x000055752e001847 in memcpy (__len=6, __src=<optimized out>,
__dest=<optimized out>) at /usr/include/bits/string_fortified.h:34
#2 id_write_format (id=id@entry=0x60, buffer=<optimized out>,
buffer@entry=0x7ffc53bd4e60 "", size=size@entry=64) at uuid/uuid.c:180
#3 0x000055752df5c610 in process_each_lv_in_vg (cmd=cmd@entry=0x55752f563600,
vg=vg@entry=0x0, arg_lvnames=arg_lvnames@entry=0x7ffc53bd5030,
tags_in=tags_in@entry=0x0, stop_on_error=stop_on_error@entry=0,
handle=handle@entry=0x55752f658fc0, check_single_lv=0x0,
process_single_lv=0x55752df3ca10 <_lvdisplay_single>) at toollib.c:3040
#4 0x000055752df5e7b3 in _process_lv_vgnameid_list (
process_single_lv=0x55752df3ca10 <_lvdisplay_single>, check_single_lv=0x0,
handle=0x55752f658fc0, arg_tags=0x7ffc53bd4fe0,
arg_lvnames=0x7ffc53bd5000, arg_vgnames=0x7ffc53bd4ff0,
vgnameids_to_process=0x7ffc53bd5020, read_flags=0, cmd=0x55752f563600)
at toollib.c:3697
#5 process_each_lv (cmd=cmd@entry=0x55752f563600, argc=argc@entry=1,
argv=argv@entry=0x7ffc53bd5470, one_vgname=one_vgname@entry=0x0,
one_lvname=one_lvname@entry=0x0, read_flags=read_flags@entry=0,
handle=0x55752f658fc0, check_single_lv=<optimized out>,
process_single_lv=<optimized out>) at toollib.c:3854
#6 0x000055752df3cbe6 in lvdisplay (cmd=0x55752f563600, argc=1,
argv=0x7ffc53bd5470) at lvdisplay.c:61
#7 0x000055752df43435 in lvm_run_command (cmd=cmd@entry=0x55752f563600,
argc=<optimized out>, argc@entry=2, argv=<optimized out>,
argv@entry=0x7ffc53bd5468) at lvmcmdline.c:3036
#8 0x000055752df44763 in lvm2_main (argc=2, argv=0x7ffc53bd5468)
at lvmcmdline.c:3566
#9 0x00007f07ee2f1873 in __libc_start_main (main=0x55752df20bd0 <main>,
argc=2, argv=0x7ffc53bd5468, init=<optimized out>, fini=<optimized out>,
rtld_fini=<optimized out>, stack_end=0x7ffc53bd5458)
at ../csu/libc-start.c:308
And:
(gdb) up
#1 0x000055752e001847 in memcpy (__len=6, __src=<optimized out>,
__dest=<optimized out>) at /usr/include/bits/string_fortified.h:34
34 return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
(gdb)
#2 id_write_format (id=id@entry=0x60, buffer=<optimized out>,
buffer@entry=0x7ffc53bd4e60 "", size=size@entry=64) at uuid/uuid.c:180
180 memcpy(buffer, id->uuid + tot, group_size[i]);
(gdb) print id
$4 = (const struct id *) 0x60
This is probably a bug in lvm2. It's very unlikely that this is a glibc issue.
Please add version of 'lvm2' package in use and 'lvdisplay = -vvvv' trace. Also please attach lvm2 metadata backup (vgcfgbackup) actual state of DM table (dmsetup table & dmsetup status & dmsetup info -c) in case lvm2 tried to access something unexpected... (I also believe the upstream version has this issue fixed as I cannot reproduce it) Please find below: [root@ncpp243050 ~]# lvm version LVM version: 2.03.05(2)-RHEL8 (2019-06-15) Library version: 1.02.163-RHEL8 (2019-06-15) Driver version: 4.39.0 Configuration: ./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-default-dm-run-dir=/run --with-default-run-dir=/run/lvm --with-default-pid-dir=/run --with-default-locking-dir=/run/lock/lvm --with-usrlibdir=/usr/lib64 --enable-fsadm --enable-write_install --with-user= --with-group= --with-device-uid=0 --with-device-gid=6 --with-device-mode=0660 --enable-pkgconfig --enable-cmdlib --enable-dmeventd --enable-blkid_wiping --with-cluster=internal --enable-cmirrord --with-udevdir=/usr/lib/udev/rules.d --enable-udev_sync --with-thin=internal --with-cache=internal --enable-lvmpolld --enable-lvmlockd-dlm --enable-lvmlockd-dlmcontrol --enable-lvmlockd-sanlock --enable-dbus-service --enable-notify-dbus --enable-dmfilemapd --with-vdo=internal --with-vdo-format=/usr/bin/vdoformat --disable-silent-rules [root@ncpp243050 ~]# lvdisplay = -vvvv &> lvdisplay_trace.txt Segmentation fault (core dumped) [Output File is attached] [root@ncpp243050 ~]# vgcfgbackup /dev/sdb: open failed: No medium found /dev/sdc: open failed: No medium found /dev/sdd: open failed: No medium found [root@ncpp243050 ~]# dmsetup table No devices found [root@ncpp243050 ~]# dmsetup status No devices found [root@ncpp243050 ~]# dmsetup info -c No devices found Created attachment 1633929 [details]
lvdisplay -vvv trace
Yep assuming this commit: commit 7cfbf3a394c2663fbeed17705320b83e69781720 Author: David Teigland <teigland> Date: Thu Aug 29 11:35:46 2019 -0500 https://www.redhat.com/archives/lvm-devel/2019-August/msg00094.html is fixing this issue. *** This bug has been marked as a duplicate of bug 1746593 *** I see the commit but I am still getting the issue: [root@ncpp243050 ~]# cat /etc/os-release NAME="Red Hat Enterprise Linux" VERSION="8.1 (Ootpa)" ID="rhel" ID_LIKE="fedora" VERSION_ID="8.1" PLATFORM_ID="platform:el8" PRETTY_NAME="Red Hat Enterprise Linux 8.1 (Ootpa)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:redhat:enterprise_linux:8.1:GA" HOME_URL="https://www.redhat.com/" BUG_REPORT_URL="https://bugzilla.redhat.com/" REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8" REDHAT_BUGZILLA_PRODUCT_VERSION=8.1 REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux" REDHAT_SUPPORT_PRODUCT_VERSION="8.1" [root@ncpp243050 ~]# uname -r 4.18.0-147.el8.x86_64 [root@ncpp243050 ~]# lvdisplay = foo /dev/sdb: open failed: No medium found /dev/sdc: open failed: No medium found /dev/sdd: open failed: No medium found /dev/sdb: open failed: No medium found /dev/sdc: open failed: No medium found /dev/sdd: open failed: No medium found Volume group name "=" has invalid characters. Segmentation fault (core dumped) [root@ncpp243050 ~]# date Fri Nov 8 04:32:24 EST 2019 You lvm2 package is built: 2019-06-15 Commit is dated: 2019-08-29 Next released version of lvm2 package will have this fix included. Meanwhile as workaround please avoid using invalid characters in vgname. Got it! Do you have a tentative for the next release of the lvm2 package? |