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

NeilBrown neilb at suse.de
Mon Oct 17 01:55:37 UTC 2011


On Sun, 16 Oct 2011 21:00:40 -0400 Daniel Kahn Gillmor
<dkg at fifthhorseman.net> wrote:

> On 10/16/2011 08:46 PM, Daniel Kahn Gillmor wrote:
> > mdadm /dev/md0 --grow --level 0
> > 
> > 
> > I'm attaching an strace of the final command, which is what gives the
> > segmentation fault. 
> 
> and, after rebuilding mdadm with debug symbols, i gathered this
> backtrace from the same command under gdb:
> 
> (gdb) run /dev/md0 --grow --level 0
> Starting program: /sbin/mdadm /dev/md0 --grow --level 0
> 
> Program received signal SIGSEGV, Segmentation fault.
> connect_monitor (devname=0x0) at msg.c:469
> 469	}
> (gdb) bt
> #0  connect_monitor (devname=0x0) at msg.c:469
> #1  0x1004fff0 in ping_monitor (devname=<optimized out>) at msg.c:209
> #2  0x10022e2c in Grow_reshape (devname=0xffffee41 "/dev/md0", fd=7,
> quiet=0,
>     backup_file=0x0, size=101888, level=0, layout_str=0x0, chunksize=0,
>     raid_disks=0, devlist=0x0, assume_clean=0, force=0) at Grow.c:1556
> #3  0x10005ce8 in main (argc=5, argv=0xffffece4) at mdadm.c:1638
> (gdb)
> 
> hth,
> 
> 	--dkg
> 


Thanks for doing that.

On line 1556 for Grow.c you'll find something like:

		/* FIXME this is added with no justification - why is it here */
		ping_monitor(container);

Change  that to
		if (container)
			ping_monitor(container);

and the problem should go away.

I'll commit a similar patch upstream once I have had a chance to look at it
properly.

Thanks,
NeilBrown

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-mdadm-devel/attachments/20111017/26f32431/attachment.pgp>


More information about the pkg-mdadm-devel mailing list