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.

Bug 2189270

Summary: Attempting to extend a stripe using the remaining FREE space, but only specifying one of the images will core dump
Product: Red Hat Enterprise Linux 9 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: LVM Team <lvm-team>
lvm2 sub component: Changing Logical Volumes QA Contact: cluster-qe <cluster-qe>
Status: CLOSED MIGRATED Docs Contact:
Severity: medium    
Priority: unspecified CC: agk, heinzm, jbrassow, msnitzer, prajnoha, zkabelac
Version: 9.3Keywords: MigratedToJIRA
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-09-23 19:02:23 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:

Description Corey Marthaler 2023-04-24 15:27:32 UTC
Description of problem:
This fails in rhel8.8 as well, so I'm not sure this ever worked.


[root@virt-506 ~]#  lvcreate --type raid0 -i 2 -L 200M -n stripe1 myvg
  Using default stripesize 64.00 KiB.
  Logical volume "stripe1" created.

[root@virt-506 ~]# lvs -a -o +devices
  LV                 VG            Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices                                
  stripe1            myvg          rwi-a-r--- 200.00m                                                     stripe1_rimage_0(0),stripe1_rimage_1(0)
  [stripe1_rimage_0] myvg          iwi-aor--- 100.00m                                                     /dev/sda(0)                            
  [stripe1_rimage_1] myvg          iwi-aor--- 100.00m                                                     /dev/sdb(0)                            

[root@virt-506 ~]# lvextend myvg/stripe1 -L 542G
  Using stripesize of last segment 64.00 KiB
  Insufficient free space: 138702 extents needed, but only 76745 available

[root@virt-506 ~]# lvextend -i1 -l+100%FREE myvg/stripe1
Segmentation fault (core dumped)

Apr 24 17:17:01 virt-506 kernel: traps: lvextend[993422] general protection fault ip:5654ba5ccfaf sp:7ffee0f26a60 error:0 in lvm[5654ba506000+192000]


Version-Release number of selected component (if applicable):
kernel-5.14.0-283.el9    BUILT: Fri Feb 24 12:35:52 AM CET 2023
lvm2-2.03.20-2.el9    BUILT: Thu Apr  6 01:40:29 PM CEST 2023
lvm2-libs-2.03.20-2.el9    BUILT: Thu Apr  6 01:40:29 PM CEST 2023

Comment 1 Corey Marthaler 2023-04-24 15:39:38 UTC
Core was generated by `lvextend -i1 -l+100%FREE myvg/stripe1'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000556c42e12faf in _setup_alloced_segment (region_size=0, aa=0x42554346684e4367, segtype=0x556c43e16180, stripe_size=0, area_count=1, status=17179869952, lv=0x556c43f35dc0)
    at ../lib/metadata/lv_manip.c:2065
2065            extents = aa[0].len * area_multiple;
(gdb) bt
#0  0x0000556c42e12faf in _setup_alloced_segment (region_size=0, aa=0x42554346684e4367, segtype=0x556c43e16180, stripe_size=0, area_count=1, status=17179869952, lv=0x556c43f35dc0)
    at ../lib/metadata/lv_manip.c:2065
#1  _setup_alloced_segments (region_size=0, segtype=0x556c43e16180, stripe_size=0, status=17179869952, area_count=1, alloced_areas=0x556c43f39de0, lv=0x556c43f35dc0) at ../lib/metadata/lv_manip.c:2100
#2  lv_add_segment (ah=ah@entry=0x556c43f39d70, first_area=first_area@entry=1, num_areas=num_areas@entry=1, lv=lv@entry=0x556c43f35dc0, segtype=segtype@entry=0x556c43e16180, stripe_size=stripe_size@entry=0, 
    status=17179869952, region_size=0) at ../lib/metadata/lv_manip.c:3852
#3  0x0000556c42e13f49 in _lv_extend_layered_lv (ah=0x556c43f39d70, lv=0x556c43f35af0, extents=343345, first_area=<optimized out>, mirrors=0, stripes=1, stripe_size=0) at ../lib/metadata/lv_manip.c:4323
#4  0x0000556c42e169a2 in lv_extend (lv=0x556c43f35af0, segtype=<optimized out>, stripes=1, stripe_size=0, mirrors=<optimized out>, region_size=<optimized out>, extents=343345, allocatable_pvs=0x556c43f354d8, 
    alloc=ALLOC_INHERIT, approx_alloc=1) at ../lib/metadata/lv_manip.c:4556
#5  0x0000556c42e1751a in _lv_resize_volume (lv=0x556c43f35af0, lp=0x7ffe463391e0, pvh=0x556c43f354d8) at ../lib/metadata/lv_manip.c:5863
#6  0x0000556c42e184f6 in lv_resize (cmd=<optimized out>, lv=<optimized out>, lp=0x7ffe463391e0) at ../lib/metadata/lv_manip.c:7025
#7  0x0000556c42d783de in _lvresize_single (cmd=cmd@entry=0x556c43de4a30, lv=0x556c43f35af0, handle=handle@entry=0x556c43ee7540) at /usr/src/debug/lvm2-2.03.20-2.el9.x86_64/tools/lvresize.c:346
#8  0x0000556c42d921ae in process_each_lv_in_vg (cmd=cmd@entry=0x556c43de4a30, vg=vg@entry=0x556c43f35410, arg_lvnames=arg_lvnames@entry=0x7ffe46339120, tags_in=tags_in@entry=0x7ffe46339110, 
    stop_on_error=stop_on_error@entry=0, handle=handle@entry=0x556c43ee7540, check_single_lv=<optimized out>, process_single_lv=<optimized out>) at /usr/src/debug/lvm2-2.03.20-2.el9.x86_64/tools/toollib.c:3451
#9  0x0000556c42d94170 in _process_lv_vgnameid_list (process_single_lv=0x556c42d783a0 <_lvresize_single>, check_single_lv=0x0, handle=0x556c43ee7540, arg_tags=0x7ffe46339110, arg_lvnames=0x7ffe463390f0, 
    arg_vgnames=0x7ffe46339100, vgnameids_to_process=0x7ffe463390d0, read_flags=1048576, cmd=0x556c43de4a30) at /usr/src/debug/lvm2-2.03.20-2.el9.x86_64/tools/toollib.c:3927
#10 process_each_lv (cmd=0x556c43de4a30, argc=<optimized out>, argv=<optimized out>, one_vgname=<optimized out>, one_lvname=<optimized out>, read_flags=<optimized out>, handle=0x556c43ee7540, 
    check_single_lv=<optimized out>, process_single_lv=<optimized out>) at /usr/src/debug/lvm2-2.03.20-2.el9.x86_64/tools/toollib.c:4087
#11 0x0000556c42d78880 in lvresize_cmd (cmd=0x556c43de4a30, argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/lvm2-2.03.20-2.el9.x86_64/tools/lvresize.c:394
#12 0x0000556c42d72e8f in lvm_run_command (cmd=<optimized out>, argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/lvm2-2.03.20-2.el9.x86_64/tools/lvmcmdline.c:3314
#13 0x0000556c42d74d01 in lvm2_main (argc=4, argv=0x7ffe463396c8) at /usr/src/debug/lvm2-2.03.20-2.el9.x86_64/tools/lvmcmdline.c:3847
#14 0x00007f41ec83feb0 in __libc_start_call_main (main=main@entry=0x556c42d4ee40 <main>, argc=argc@entry=4, argv=argv@entry=0x7ffe463396c8) at ../sysdeps/nptl/libc_start_call_main.h:58
#15 0x00007f41ec83ff60 in __libc_start_main_impl (main=0x556c42d4ee40 <main>, argc=4, argv=0x7ffe463396c8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffe463396b8)
    at ../csu/libc-start.c:389
#16 0x0000556c42d4ef15 in _start ()

Comment 3 RHEL Program Management 2023-09-23 19:00:41 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 4 RHEL Program Management 2023-09-23 19:02:23 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.