mdadm-3.1.1 segfaults when mdadm -G -Z
Hello,
I tried to grow array size (i resized /dev/sdc5-> resync->remove /dev/sda6 -> resize /dev/sda6 -> resync-> curent situation ) and i got segfault:
# cat /proc/mdstat
md6 : active raid1 sdc5[1](W) sda7[0]
125001664 blocks [2/2] [UU]
bitmap: 16/239 pages [64KB], 256KB chunk# gdb /sbin/mdadm [...] <http://bugs.gentoo.org/>... Reading symbols from /var/tmp/portage/sys-fs/mdadm-3.1.1/work/mdadm-3.1.1/mdadm...done. (gdb) run -G -Z /dev/md6 Starting program: /var/tmp/portage/sys-fs/mdadm-3.1.1/work/mdadm-3.1.1/mdadm -G -Z /dev/md6
Program received signal SIGSEGV, Segmentation fault. 0xb7f067f8 in strcmp () from /lib/libc.so.6
(gdb) bt
#0 0xb7f067f8 in strcmp () from /lib/libc.so.6
#1 0x0804b70b in main (argc=4, argv=0xbffff3f4) at mdadm.c:408 (gdb)
$ uname -r 2.6.32-gentoo-r1
May i get any suggestions?
Regards
Quoted 26 lines · Marcin Mirosław
Hello,
I tried to grow array size (i resized/dev/sdc5->resync->remove/dev/sda6-> resize/dev/sda6-> resync-> curent situation ) and i got segfault:# cat /proc/mdstat md6 : active raid1 sdc5[1](W) sda7[0] 125001664 blocks [2/2] [UU] bitmap: 16/239 pages [64KB], 256KB chunk# gdb /sbin/mdadm [...] <http://bugs.gentoo.org/>... Reading symbols from /var/tmp/portage/sys-fs/mdadm-3.1.1/work/mdadm-3.1.1/mdadm...done. (gdb) run -G -Z /dev/md6 Starting program: /var/tmp/portage/sys-fs/mdadm-3.1.1/work/mdadm-3.1.1/mdadm -G -Z /dev/md6Program received signal SIGSEGV, Segmentation fault.
0xb7f067f8in strcmp () from/lib/libc.so.6
(gdb) bt
#00xb7f067f8in strcmp () from/lib/libc.so.6
#10x0804b70bin main (argc=4, argv=0xbffff3f4) at mdadm.c:408 (gdb)
Quoted 6 lines
$ uname -r 2.6.32-gentoo-r1May i get any suggestions?
Regards
-Z, --array-size=
This is only meaningful with --grow and its effect is
not per‐
sistent: when the array is stopped an restarted the
default
array size will be restored.
You didn't supply any argument to -Z at all, or to be precise, you supplied /dev/md6 as the argument, whereas you should have put in the array size.
Also, another thing I have noticed lately is, that _some_ short options seem to be somehow oddly broken on my system and not accepting arguments, even if they are supposed to be. If the segfault persists after using the correct syntax, try using the long opts instead. I was planning to dig more into this bug myself, so I might just kick self to do it now.
Zdenek
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
W dniu 2010-01-10 14:47, Zdenek Behan pisze:
Quoted 6 lines
-Z, --array-size=
This is only meaningful with --grow and its effect is
not per‐
sistent: when the array is stopped an restarted the
default
array size will be restored.
Yes, i missed it.
Quoted 10 lines
You didn't supply any argument to -Z at all, or to be precise, you supplied
/dev/md6as the argument, whereas you should have put in the array size.Also, another thing I have noticed lately is, that _some_ short options seem to be somehow oddly broken on my system and not accepting arguments, even if they are supposed to be. If the segfault persists after using the correct syntax, try using the long opts instead. I was planning to dig more into this bug myself, so I might just kick self to do it now.
long option, with suplied array size works correctly, so indeed problem is in short option.
Thank you!
Regards.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 21 lines · Marcin Mirosław
W dniu 2010-01-10 14:47, Zdenek Behan pisze:
Quoted 6 lines
-Z, --array-size=
This is only meaningful with --grow and its effect is
not per‐
sistent: when the array is stopped an restarted the
default
array size will be restored.Yes, i missed it.
Quoted 10 lines
You didn't supply any argument to -Z at all, or to be precise, you supplied
/dev/md6as the argument, whereas you should have put in the array size.Also, another thing I have noticed lately is, that _some_ short options seem to be somehow oddly broken on my system and not accepting arguments, even if they are supposed to be. If the segfault persists after using the correct syntax, try using the long opts instead. I was planning to dig more into this bug myself, so I might just kick self to do it now.
Quoted 4 lines
long option, with suplied array size works correctly, so indeed problem is in short option.
Thank you!
Regards.
attached patch fixes it.
Regards,
L.
Signature · 6 lines
Luca Berra -- [email protected] Communication Media & Services S.r.l. /"\ \ / ASCII RIBBON CAMPAIGN X AGAINST HTML MAIL / \
From d61bcf0c5f425bd4009f90cc1d467d933fde0a2c Mon Sep 17 00:00:00 2001
From: Luca Berra <[email protected]>
Date: Sat, 30 Jan 2010 10:46:07 +0100
Subject: [PATCH 2/2] =?UTF-8?q?fix=20segfault=20when=20-Z=20was=20given=20without=20argument=20(reported=20by=20Marcin =20Miros=C5=82aw)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
--- ReadMe.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
ReadMe.c +3 -3
@@ -86,11 +86,11 @@ char Version[] = Name " - v3.1.1 - 19th November 2009\n";* At the time if writing, there is only minimal support. */ -char short_options[]="-ABCDEFGIQhVXWZvqbc:i:l:p:m:n:x:u:c:d:z:U:N:sarfRSow1tye:" ; +char short_options[]="-ABCDEFGIQhVXWZ:vqbc:i:l:p:m:n:x:u:c:d:z:U:N:sarfRSow1tye:" ;char short_bitmap_options[]= -"-ABCDEFGIQhVXWZvqb:c:i:l:p:m:n:x:u:c:d:z:U:N:sarfRSow1tye:" ; +"-ABCDEFGIQhVXWZ:vqb:c:i:l:p:m:n:x:u:c:d:z:U:N:sarfRSow1tye:" ;char short_bitmap_auto_options[]= -"-ABCDEFGIQhVXWZvqb:c:i:l:p:m:n:x:u:c:d:z:U:N:sa:rfRSow1tye:" ; +"-ABCDEFGIQhVXWZ:vqb:c:i:l:p:m:n:x:u:c:d:z:U:N:sa:rfRSow1tye:" ;struct option long_options[] = { {"manage" ,0 ,0 ,'@' },
Signature · 1 line
1.6.6.1
Neil Brown
AppliedQuoted 22 lines · On Sat, 30 Jan 2010 10:56:11 +0100 Luca Berra <[email protected]> wrote:
Quoted 21 lines · Marcin Mirosław
W dniu 2010-01-10 14:47, Zdenek Behan pisze:
Quoted 6 lines
-Z, --array-size=
This is only meaningful with --grow and its effect is
not per‐
sistent: when the array is stopped an restarted the
default
array size will be restored.Yes, i missed it.
Quoted 10 lines
You didn't supply any argument to -Z at all, or to be precise, you supplied
/dev/md6as the argument, whereas you should have put in the array size.Also, another thing I have noticed lately is, that _some_ short options seem to be somehow oddly broken on my system and not accepting arguments, even if they are supposed to be. If the segfault persists after using the correct syntax, try using the long opts instead. I was planning to dig more into this bug myself, so I might just kick self to do it now.
Quoted 6 lines
Quoted 4 lines
long option, with suplied array size works correctly, so indeed problem is in short option.
Thank you!
Regards.attached patch fixes it.
Applied, thanks.
NeilBrown
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html