Bug#589413: mdadm: Segmentation fault when converting to RAID6 from RAID5

2010-07-23 Thread Björn Påhlsson
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160

On 07/22/2010 08:33 AM, Neil Brown wrote:

>> on Debian, though I'm still running 2.6.32-5-amd64.  I doubt that would
>> make a difference, but it might.
> 
> And if fact it does.  I found a 2.6.34 kernel and hit the same bug.
> 
> The mdadm bug is fixed by upstream commit
> c03ef02d92e4b2a7397f7247ea5a25d932a1a889
> 
> It is triggered by a kernel bug that is fixed in upstream commit
> a64c876fd357906a1f7193723866562ad290654c
> (and many a few near by commits) which will be in 2.6.35, and is in
> the latest 2.6.34-stable: 2.6.34.1.

I can confirm that it works when running with
linux-image-2.6.35-3c5-amd64 and mdadm 3.1.2-2. Thanks!

/Björn

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEAREDAAYFAkxKFmUACgkQC+Cq+bUsy1JcsgCfbX2CSxvcXogwEuAbZvK8quiz
QPUAnifzHjjZ7/AIEQT68zz6WKm399hs
=C2x/
-END PGP SIGNATURE-



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#589413: mdadm: Segmentation fault when converting to RAID6 from RAID5

2010-07-21 Thread Neil Brown
On Thu, 22 Jul 2010 16:15:32 +1000
Neil Brown  wrote:


> on Debian, though I'm still running 2.6.32-5-amd64.  I doubt that would
> make a difference, but it might.

And if fact it does.  I found a 2.6.34 kernel and hit the same bug.

The mdadm bug is fixed by upstream commit
c03ef02d92e4b2a7397f7247ea5a25d932a1a889

It is triggered by a kernel bug that is fixed in upstream commit
a64c876fd357906a1f7193723866562ad290654c
(and many a few near by commits) which will be in 2.6.35, and is in
the latest 2.6.34-stable: 2.6.34.1.

NeilBrown



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#589413: mdadm: Segmentation fault when converting to RAID6 from RAID5

2010-07-21 Thread Neil Brown
On Sat, 17 Jul 2010 15:49:22 +0200
Björn Påhlsson  wrote:

.
> # mdadm --verbose --grow /dev/md0 --level=raid6 --raid-devices=4
> 
> The output of that last command is:
> 
> mdadm level of /dev/md0 changed to raid6
> Segmentation fault
> 

When I try that (thanks for providing precise commands!) it works:

While the array is still performing recovery I get:

# mdadm --verbose --grow /dev/md0 --level=raid6 --raid-devices=4
mdadm: /dev/md0 is performing resync/recovery and cannot be reshaped

and once recovery completes I get:

# mdadm --verbose --grow /dev/md0 --level=raid6 --raid-devices=4
mdadm level of /dev/md0 changed to raid6
mdadm: /dev/md0: Cannot grow - need backup-file
mdadm: aborting level change

This is with 
Version: 3.1.2-2

on Debian, though I'm still running 2.6.32-5-amd64.  I doubt that would
make a difference, but it might.

Can you run the --grow command under 'strace' and post the output.
e.g.
   strace -o /tmp/trace mdadm --verbose --grow /dev/md0 --level=raid6  
--raid-devices=4

 and post /tmp/trace.

NeilBrown



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#589413: mdadm: Segmentation fault when converting to RAID6 from RAID5

2010-07-17 Thread Björn Påhlsson
Package: mdadm
Version: 3.1.2-2
Severity: normal

Assuming /dev/md0 is not used, the following commands can be used to
reproduce a segmentation fault in the mdadm command:

# for a in dev0 dev1 dev2 dev3; do dd if=/dev/zero count=256 bs=$((1024*1024)) 
of="$a"; done
# for a in 0 1 2 3; do losetup /dev/loop$a dev$a; done
# mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/loop0 /dev/loop1 
/dev/loop2
# mkfs -t ext3 /dev/md0 # Just to make it sync
# mdadm --verbose /dev/md0 --add /dev/loop3
# mdadm --verbose --grow /dev/md0 --level=raid6 --raid-devices=4

The output of that last command is:

mdadm level of /dev/md0 changed to raid6
Segmentation fault

And the contents of /proc/mdstat is:
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] 
[raid10]
md0 : active raid6 loop3[4](S) loop2[3] loop1[1] loop0[0]
  523264 blocks super 1.2 level 6, 512k chunk, algorithm 18 [4/3] [UUU_]

unused devices: 

/Björn

-- Package-specific info:
--- mdadm.conf
DEVICE partitions
CREATE owner=root group=disk mode=0660 auto=yes
HOMEHOST 
MAILADDR root

--- /etc/default/mdadm
INITRDSTART='all'
AUTOSTART=true
AUTOCHECK=true
START_DAEMON=false
DAEMON_OPTIONS="--syslog"
VERBOSE=false

--- /proc/mdstat:
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] 
[raid10] 
md0 : active raid6 loop3[4](S) loop2[3] loop1[1] loop0[0]
  523264 blocks super 1.2 level 6, 512k chunk, algorithm 18 [4/3] [UUU_]
  
unused devices: 

--- /proc/partitions:
major minor  #blocks  name

   80  117220824 sda
   81 248976 sda1
   82  1 sda2
   85   97458291 sda5
   86 248832 sda6
   87   19262464 sda7
 2540   97457263 dm-0
 2541   95453184 dm-1
 25422002944 dm-2
   70 262144 loop0
   71 262144 loop1
   72 262144 loop2
   73 262144 loop3
   74 262144 loop4
   90 523264 md0

--- LVM physical volumes:
  PV VG Fmt  Attr PSize  PFree
  /dev/dm-0  braxen lvm2 a-   92.94g0 
--- mount output
/dev/dm-1 on / type ext3 (rw,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
/dev/sda1 on /boot type ext2 (rw)
overflow on /tmp type tmpfs (rw,size=1048576,mode=1777)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc 
(rw,noexec,nosuid,nodev)

--- initrd.img-2.6.34-1-amd64:
cpio: write error: No space left on device

gzip: stdout: Broken pipe

--- initrd's /conf/conf.d/md:
no conf/md file.

--- /proc/modules:
dm_crypt 10736 1 - Live 0xa0268000
raid10 18553 0 - Live 0xa025d000
raid456 45132 1 - Live 0xa024a000
async_raid6_recov 5242 1 raid456, Live 0xa0243000
async_pq 3551 2 raid456,async_raid6_recov, Live 0xa023d000
raid6_pq 77179 2 async_raid6_recov,async_pq, Live 0xa0224000
async_xor 2550 3 raid456,async_raid6_recov,async_pq, Live 0xa021e000
async_memcpy 1206 2 raid456,async_raid6_recov, Live 0xa0211000
async_tx 1774 5 raid456,async_raid6_recov,async_pq,async_xor,async_memcpy, Live 
0xa020b000
raid1 18769 0 - Live 0xa020
raid0 5541 0 - Live 0xa01f9000
multipath 6083 0 - Live 0xa01f2000
linear 3495 0 - Live 0xa01ec000
md_mod 78646 6 raid10,raid456,raid1,raid0,multipath,linear, Live 
0xa01ce000
dm_mirror 11833 0 - Live 0xa01c5000
dm_region_hash 6816 1 dm_mirror, Live 0xa01bd000
dm_log 7693 2 dm_mirror,dm_region_hash, Live 0xa01b6000
dm_mod 55398 11 dm_crypt,dm_mirror,dm_log, Live 0xa019d000

--- /var/log/syslog:

--- volume detail:
/dev/sda is not recognised by mdadm.
/dev/sda1 is not recognised by mdadm.
/dev/sda2 is not recognised by mdadm.
/dev/sda5 is not recognised by mdadm.
/dev/sda6 is not recognised by mdadm.
/dev/sda7 is not recognised by mdadm.

--- /proc/cmdline
BOOT_IMAGE=/vmlinuz-2.6.34-1-amd64 root=/dev/mapper/braxen-root ro quiet

--- grub2:
set root='(hd0,msdos1)'
set root='(hd0,msdos1)'
set root='(hd0,msdos1)'
set root='(hd0,msdos1)'
linux   /vmlinuz-2.6.34-1-amd64 root=/dev/mapper/braxen-root ro  quiet
set root='(hd0,msdos1)'
linux   /vmlinuz-2.6.34-1-amd64 root=/dev/mapper/braxen-root ro single 
set root='(hd0,msdos1)'
linux   /vmlinuz-2.6.32-5-amd64 root=/dev/mapper/braxen-root ro  quiet
set root='(hd0,msdos1)'
linux   /vmlinuz-2.6.32-5-amd64 root=/dev/mapper/braxen-root ro single 
set root='(hd0,msdos1)'
set root='(hd0,msdos1)'
set root='(hd0,msdos1)'
set root='(hd0,msdos1)'
set root=(hd0,6)

--- udev:
ii  udev   160-1  /