Bug 796786

Summary: stripe legs <= number of parity legs causes raid creation to segfault
Product: Red Hat Enterprise Linux 6 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: Jonathan Earl Brassow <jbrassow>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: high Docs Contact:
Priority: high    
Version: 6.3CC: agk, djansa, dwysocha, heinzm, jbrassow, mbroz, prajnoha, prockai, thornber, zkabelac
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: lvm2-2.02.95-1.el6 Doc Type: Bug Fix
Doc Text:
New Feature to 6.3. No documentation required. Bug 732458 is the bug that requires a release note for the RAID features. Other documentation is found in the LVM manual. Operational bugs need no documentation because they are being fixed before their initial release.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 15:01:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Corey Marthaler 2012-02-23 16:29:24 UTC
Description of problem:

[root@taft-01 ~]# pvscan
  PV /dev/sdh1   VG black_bird   lvm2 [135.66 GiB / 135.66 GiB free]
  PV /dev/sdg1   VG black_bird   lvm2 [135.66 GiB / 135.66 GiB free]
  PV /dev/sdf1   VG black_bird   lvm2 [135.66 GiB / 135.66 GiB free]
  PV /dev/sde1   VG black_bird   lvm2 [135.66 GiB / 135.66 GiB free]
  PV /dev/sdd1   VG black_bird   lvm2 [135.66 GiB / 135.66 GiB free]
  PV /dev/sdc1   VG black_bird   lvm2 [135.66 GiB / 135.66 GiB free]
  PV /dev/sdb1   VG black_bird   lvm2 [135.66 GiB / 135.66 GiB free]

[root@taft-01 ~]# lvcreate --type raid6 -i 2 -n synced_random_raid6_2legs_1 -L 500M black_bird /dev/sdf1:0-1000 /dev/sdg1:0-1000 /dev/sdb1:0-1000 /dev/sdc1:0-1000
  Using default stripesize 64.00 KiB
  Rounding size (125 extents) up to stripe boundary size (126 extents)
Segmentation fault (core dumped)

Feb 23 10:07:22 taft-01 kernel: lvcreate[2106]: segfault at 55a275cf ip 00000000004613fb sp 00007fff72c64e80 error 4 in lvm[400000+d7000]


Core was generated by `lvcreate --type raid6 -i 2 -n synced_random_raid6_2legs_1 -L 500M black_bird /d'.
Program terminated with signal 11, Segmentation fault.
#0  _setup_alloced_segment (ah=<value optimized out>, first_area=<value optimized out>, num_areas=1, lv=0x1677430, segtype=0xb8a6a0, stripe_size=0, status=8589935360, region_size=0) at metadata/lv_manip.c:973
973             if (!(seg = alloc_lv_segment(segtype, lv, lv->le_count,
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.47.el6_2.5.x86_64 libsepol-2.0.41-4.el6.x86_64 ncurses-libs-5.7-3.20090208.el6.x86_64 readline-6.0-3.el6.x86_64
(gdb) bt
#0  _setup_alloced_segment (ah=<value optimized out>, first_area=<value optimized out>, num_areas=1, lv=0x1677430, segtype=0xb8a6a0, stripe_size=0, status=8589935360, region_size=0) at metadata/lv_manip.c:973
#1  _setup_alloced_segments (ah=<value optimized out>, first_area=<value optimized out>, num_areas=1, lv=0x1677430, segtype=0xb8a6a0, stripe_size=0, status=8589935360, region_size=0) at metadata/lv_manip.c:1009
#2  lv_add_segment (ah=<value optimized out>, first_area=<value optimized out>, num_areas=1, lv=0x1677430, segtype=0xb8a6a0, stripe_size=0, status=8589935360, region_size=0) at metadata/lv_manip.c:2180
#3  0x000000000046188e in _lv_extend_layered_lv (ah=0x167be18, lv=0x1676fb8, extents=126, first_area=<value optimized out>, stripes=1, stripe_size=0) at metadata/lv_manip.c:2520
#4  0x0000000000465677 in lv_extend (lv=0x1676fb8, segtype=0xb9cb40, stripes=2, stripe_size=128, mirrors=<value optimized out>, region_size=1024, extents=126, thin_pool_name=0x0, allocatable_pvs=0x16701d8, alloc=ALLOC_INHERIT)
    at metadata/lv_manip.c:2643
#5  0x0000000000466089 in _lv_create_an_lv (vg=0x1676450, lp=0x7fff72c65140, new_lv_name=<value optimized out>) at metadata/lv_manip.c:4335
#6  0x0000000000467228 in lv_create_single (vg=0x1676450, lp=0x7fff72c65140) at metadata/lv_manip.c:4548
#7  0x000000000041c59a in lvcreate (cmd=0xb61110, argc=<value optimized out>, argv=<value optimized out>) at lvcreate.c:1020
#8  0x000000000041f242 in lvm_run_command (cmd=0xb61110, argc=5, argv=0x7fff72c65570) at lvmcmdline.c:1079
#9  0x0000000000421b42 in lvm2_main (argc=14, argv=0x7fff72c65528) at lvmcmdline.c:1445
#10 0x000000347081ecdd in __libc_start_main () from /lib64/libc.so.6
#11 0x00000000004135d9 in _start ()



Version-Release number of selected component (if applicable):
2.6.32-236.el6.x86_64

lvm2-2.02.93-0.48.el6    BUILT: Thu Feb 23 07:04:40 CST 2012
lvm2-libs-2.02.93-0.48.el6    BUILT: Thu Feb 23 07:04:40 CST 2012
lvm2-cluster-2.02.93-0.48.el6    BUILT: Thu Feb 23 07:04:40 CST 2012
udev-147-2.40.el6    BUILT: Fri Sep 23 07:51:13 CDT 2011
device-mapper-1.02.72-0.48.el6    BUILT: Thu Feb 23 07:04:40 CST 2012
device-mapper-libs-1.02.72-0.48.el6    BUILT: Thu Feb 23 07:04:40 CST 2012
device-mapper-event-1.02.72-0.48.el6    BUILT: Thu Feb 23 07:04:40 CST 2012
device-mapper-event-libs-1.02.72-0.48.el6    BUILT: Thu Feb 23 07:04:40 CST 2012
cmirror-2.02.93-0.48.el6    BUILT: Thu Feb 23 07:04:40 CST 2012


How reproducible:
Everytime

Comment 5 Jonathan Earl Brassow 2012-04-23 18:29:43 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
New Feature to 6.3.  No documentation required.

Bug 732458 is the bug that requires a release note for the RAID features.  Other documentation is found in the LVM manual.

Operational bugs need no documentation because they are being fixed before their initial release.

Comment 7 errata-xmlrpc 2012-06-20 15:01:48 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, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0962.html