Bug#645563: mdadm: segmentation fault when converting raid10 to raid0

Daniel Kahn Gillmor dkg at fifthhorseman.net
Mon Oct 17 00:46:15 UTC 2011


Package: mdadm
Version: 3.2.2-1
Severity: normal

I can reproducibly get a segmentation fault from mdadm by trying to
convert a RAID10 array to a RAID0 array.

mdadm(8) says:

>       Grow   Grow (or shrink) an array, or otherwise reshape it in some  way.
>              Currently supported growth options including changing the active
>              size of component devices and  changing  the  number  of  active
>              devices  in  Linear and RAID levels 0/1/4/5/6, changing the RAID
>              level between 0, 1, 5, and 6, and between 0 and 10, changing the
>              chunk  size  and  layout  for RAID 0,4,5,6, as well as adding or
>              removing a write-intent bitmap.

here is a quick bash recipe for a system that is not already using the loop
devices or any other MD device to get the segmentation fault (must be
done as root):


for x in 0 1 2 3; do
  dd if=/dev/zero of=./d$x bs=1M count=100
  losetup /dev/loop$x ./d$x
done
mdadm /dev/md0 --create --level 10 --raid-devices 4 /dev/loop[0123]
# get the array synced up:
dd if=/dev/zero bs=512 count=1 of=/dev/md0
sleep 10
cat /proc/mdstat
mdadm /dev/md0 --grow --level 0


I'm attaching an strace of the final command, which is what gives the
segmentation fault.  Although i'm reporting this on powerpc, i've also
seen the same segfault on i386.  The same segfault happens with
metadata 0.9 and 1.2, so i don't think it's metadata version-related.

Thanks for maintaining mdadm in debian!

       --dkg

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing'), (50, 'unstable')
Architecture: powerpc (ppc64)

Kernel: Linux 3.0.0-1-powerpc64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages mdadm depends on:
ii  debconf      1.5.40       
ii  initscripts  2.88dsf-13.11
ii  libc6        2.13-21      
ii  lsb-base     3.2-28       
ii  makedev      2.3.1-89     
ii  udev         172-1        

Versions of packages mdadm recommends:
ii  exim4-daemon-light [mail-transport-agent]  4.76-3
ii  module-init-tools                          3.16-1

mdadm suggests no packages.

-- debconf information excluded
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mdadm.strace
Type: text/x-c
Size: 11856 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-mdadm-devel/attachments/20111016/98d9b7e8/attachment.bin>


More information about the pkg-mdadm-devel mailing list