Bug 119245 - mdadm 2.2 segfaults when doing Assemble and Scan
Bug#: 119245 Product:  Gentoo Linux Version: 2005.1 Platform: x86
OS/Version: Linux Status: RESOLVED Severity: major Priority: P2
Resolution: FIXED Assigned To: base-system@gentoo.org Reported By: fleshy_ai@hotmail.com
Component: Core system
URL:  http://www.mail-archive.com/linux-raid@vger.kernel.org/msg03242.html
Summary: mdadm 2.2 segfaults when doing Assemble and Scan
Keywords:  
Status Whiteboard: 
Opened: 2006-01-16 16:55 0000
Description:   Opened: 2006-01-16 16:55 0000
I just recently upgraded from mdadm-2.1 to mdadm-2.2.

$server: mdadm -As /dev/md/0
segmentation fault

I found this when I rebooted me server to update my kernel. I was able to
re-start my raid array via:

$server: mdadm -A /dev/md/0 /dev/hde1 /dev/hdg1
... 2 drives started ...

The problem is (I believe) with the scan option.  The init.d/mdadm uses the
scan option and fails to activate the array.

Here is a discussion on this topic:
http://www.mail-archive.com/linux-raid@vger.kernel.org/msg03242.html

Reverting to mdadm 2.1 fixed the problem.

------- Comment #1 From SpanKY 2006-01-16 17:32:24 0000 -------
Created an attachment (id=77308) [details]
mdadm-2.2-update-segv.patch

try this patch and see if it fixes things for you

------- Comment #2 From Nathan Blomquist 2006-01-16 18:10:05 0000 -------
(In reply to comment #1)
> Created an attachment (id=77308) [edit] [details]
> mdadm-2.2-update-segv.patch
> 
> try this patch and see if it fixes things for you
> 

Sorry, I am relatively new to Gentoo and the portage system.  How would I apply
this and make portage not replace it?

------- Comment #3 From SpanKY 2006-01-16 18:20:00 0000 -------
http://www.gentoo.org/doc/en/bugzilla-howto.xml#doc_chap8 should cover it

------- Comment #4 From Nathan Blomquist 2006-01-16 18:57:42 0000 -------
(In reply to comment #3)
> http://www.gentoo.org/doc/en/bugzilla-howto.xml#doc_chap8 should cover it
> 

Thanks for your help.  That patch and the howto doc helped out great. 
mdadm-2.2 built with the patch and I was able to execute an assemble/scan with
it.  The array started and seems to be functioning fine.

------- Comment #5 From SpanKY 2006-01-16 19:40:28 0000 -------
added to cvs then as 2.2-r1, thanks for testing