Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1354604 - extension of raid0 appears to cause deadlock
Summary: extension of raid0 appears to cause deadlock
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.3
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Heinz Mauelshagen
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-11 16:49 UTC by Corey Marthaler
Modified: 2016-11-04 04:15 UTC (History)
7 users (show)

Fixed In Version: lvm2-2.02.161-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 04:15:25 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1445 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2016-11-03 13:46:41 UTC

Description Corey Marthaler 2016-07-11 16:49:00 UTC
Description of problem:
lvcreate  --type raid0 -i 2 -n 100_percent -L 100M raid_sanity
lvextend -l+100%FREE raid_sanity/100_percent

[Apparent deadlock]


[337532.325600] device-mapper: raid: Choosing default region size of 4MiB
[337532.366254] md/raid0:mdX: md_size is 212992 sectors.
[337532.367513] md: RAID0 configuration for mdX - 1 zone
[337532.368685] md: zone0=[dm-2/dm-3]
[337532.369633]       zone-offset=         0KB, device-offset=         0KB, size=    106496KB
[337532.371511] 



Version-Release number of selected component (if applicable):
3.10.0-419.el7.x86_64

lvm2-2.02.160-1.el7    BUILT: Wed Jul  6 11:16:47 CDT 2016
lvm2-libs-2.02.160-1.el7    BUILT: Wed Jul  6 11:16:47 CDT 2016
lvm2-cluster-2.02.160-1.el7    BUILT: Wed Jul  6 11:16:47 CDT 2016
device-mapper-1.02.130-1.el7    BUILT: Wed Jul  6 11:16:47 CDT 2016
device-mapper-libs-1.02.130-1.el7    BUILT: Wed Jul  6 11:16:47 CDT 2016
device-mapper-event-1.02.130-1.el7    BUILT: Wed Jul  6 11:16:47 CDT 2016
device-mapper-event-libs-1.02.130-1.el7    BUILT: Wed Jul  6 11:16:47 CDT 2016
device-mapper-persistent-data-0.6.2-0.1.rc8.el7    BUILT: Wed May  4 02:56:34 CDT 2016
cmirror-2.02.160-1.el7    BUILT: Wed Jul  6 11:16:47 CDT 2016
sanlock-3.3.0-1.el7    BUILT: Wed Feb 24 09:52:30 CST 2016
sanlock-lib-3.3.0-1.el7    BUILT: Wed Feb 24 09:52:30 CST 2016
lvm2-lockd-2.02.160-1.el7    BUILT: Wed Jul  6 11:16:47 CDT 2016

Comment 2 Corey Marthaler 2016-07-11 17:03:51 UTC
[root@host-083 ~]# vgcreate test /dev/sd[abcdefgh]1
  Volume group "test" successfully created
[root@host-083 ~]# lvcreate  --type raid0 -i 2 -n zero -L 100M test
  Using default stripesize 64.00 KiB.
  Rounding size 100.00 MiB (25 extents) up to stripe boundary size 104.00 MiB (26 extents).
  Logical volume "zero" created.
[root@host-083 ~]# lvs -a -o +devices
  LV              VG            Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices                          
  root            rhel_host-083 -wi-ao----   6.67g                                                     /dev/vda2(205)                   
  swap            rhel_host-083 -wi-ao---- 820.00m                                                     /dev/vda2(0)                     
  zero            test          rwi-a-r--- 104.00m                                                     zero_rimage_0(0),zero_rimage_1(0)
  [zero_rimage_0] test          iwi-aor---  52.00m                                                     /dev/sda1(0)                     
  [zero_rimage_1] test          iwi-aor---  52.00m                                                     /dev/sdb1(0)                     


[root@host-083 ~]# strace lvextend -l+100%FREE test/zero
[...]
getdents(13, /* 0 entries */, 32768)    = 0
open("/proc/meminfo", O_RDONLY|O_CLOEXEC) = 14
fstat(14, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f13cb9a7000
read(14, "MemTotal:        1016812 kB\nMemF"..., 1024) = 1024
close(14)                               = 0
munmap(0x7f13cb9a7000, 4096)            = 0
brk(0)                                  = 0x7f13cdf14000
brk(0x7f13cdfb2000)                     = 0x7f13cdfb2000
brk(0)                                  = 0x7f13cdfb2000
brk(0)                                  = 0x7f13cdfb2000
brk(0x7f13cdf33000)                     = 0x7f13cdf33000
brk(0)                                  = 0x7f13cdf33000
close(13)                               = 0
brk(0)                                  = 0x7f13cdf33000
brk(0)                                  = 0x7f13cdf33000
brk(0x7f13cdb82000)                     = 0x7f13cdb82000
brk(0)                                  = 0x7f13cdb82000
link("/etc/lvm/archive/.lvm_host-083.virt.lab.msp.redhat.com_3035_1023540701", "/etc/lvm/archive/test_00002-945341733.vg") = 0
stat("/etc/lvm/archive/.lvm_host-083.virt.lab.msp.redhat.com_3035_1023540701", {st_mode=S_IFREG|0600, st_size=3939, ...}) = 0
unlink("/etc/lvm/archive/.lvm_host-083.virt.lab.msp.redhat.com_3035_1023540701") = 0

[DEADLOCK]

Comment 3 Heinz Mauelshagen 2016-07-13 13:20:07 UTC
This is a livelock in lv_manip on adjusting the region size, which doesn't apply to any raid0/raid0_meta LVs (these don't have a bitmap).
Fix by prohibiting the region size adjustment on any such LVs.

Upstream commit id: df5021a2017e395c68d1bee012a54a1d59c63c90

Comment 5 Corey Marthaler 2016-07-28 21:26:31 UTC
Fix verified in the latest rpms.

3.10.0-480.el7.x86_64

lvm2-2.02.161-3.el7    BUILT: Thu Jul 28 09:31:24 CDT 2016
lvm2-libs-2.02.161-3.el7    BUILT: Thu Jul 28 09:31:24 CDT 2016
lvm2-cluster-2.02.161-3.el7    BUILT: Thu Jul 28 09:31:24 CDT 2016
device-mapper-1.02.131-3.el7    BUILT: Thu Jul 28 09:31:24 CDT 2016
device-mapper-libs-1.02.131-3.el7    BUILT: Thu Jul 28 09:31:24 CDT 2016
device-mapper-event-1.02.131-3.el7    BUILT: Thu Jul 28 09:31:24 CDT 2016
device-mapper-event-libs-1.02.131-3.el7    BUILT: Thu Jul 28 09:31:24 CDT 2016
device-mapper-persistent-data-0.6.3-1.el7    BUILT: Fri Jul 22 05:29:13 CDT 2016
cmirror-2.02.161-3.el7    BUILT: Thu Jul 28 09:31:24 CDT 2016
sanlock-3.4.0-1.el7    BUILT: Fri Jun 10 11:41:03 CDT 2016
sanlock-lib-3.4.0-1.el7    BUILT: Fri Jun 10 11:41:03 CDT 2016
lvm2-lockd-2.02.161-3.el7    BUILT: Thu Jul 28 09:31:24 CDT 2016


[root@host-078 ~]# lvcreate  --type raid0 -i 2 -n zero -L 100M test
  Using default stripesize 64.00 KiB.
  Rounding size 100.00 MiB (25 extents) up to stripe boundary size 104.00 MiB (26 extents).
  Logical volume "zero" created.

[root@host-078 ~]# lvs -a -o +devices
  LV              VG    Attr       LSize   Devices
  zero            test  rwi-a-r--- 104.00m zero_rimage_0(0),zero_rimage_1(0)
  [zero_rimage_0] test  iwi-aor---  52.00m /dev/sda1(0)
  [zero_rimage_1] test  iwi-aor---  52.00m /dev/sdb1(0)

[root@host-078 ~]# lvextend -l+100%FREE test/zero
  Using stripesize of last segment 64.00 KiB
  Size of logical volume test/zero changed from 104.00 MiB (26 extents) to 56.00 GiB (14336 extents).
  Logical volume test/zero successfully resized.

[root@host-078 ~]# lvs -a -o +devices
  LV              VG    Attr       LSize   Devices
  zero            test  rwi-a-r---  56.00g zero_rimage_0(0),zero_rimage_1(0)
  [zero_rimage_0] test  iwi-aor---  28.00g /dev/sda1(0)
  [zero_rimage_0] test  iwi-aor---  28.00g /dev/sdc1(0)
  [zero_rimage_0] test  iwi-aor---  28.00g /dev/sde1(0)
  [zero_rimage_0] test  iwi-aor---  28.00g /dev/sdg1(0)
  [zero_rimage_1] test  iwi-aor---  28.00g /dev/sdb1(0)
  [zero_rimage_1] test  iwi-aor---  28.00g /dev/sdd1(0)
  [zero_rimage_1] test  iwi-aor---  28.00g /dev/sdf1(0)
  [zero_rimage_1] test  iwi-aor---  28.00g /dev/sdh1(0)

Comment 7 errata-xmlrpc 2016-11-04 04:15:25 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.

https://rhn.redhat.com/errata/RHBA-2016-1445.html


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