<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>119245</bug_id>
          
          <creation_ts>2006-01-16 16:55 0000</creation_ts>
          <short_desc>mdadm 2.2 segfaults when doing Assemble and Scan</short_desc>
          <delta_ts>2006-01-16 19:40:28 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Core system</component>
          <version>2005.1</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          <bug_file_loc>http://www.mail-archive.com/linux-raid@vger.kernel.org/msg03242.html</bug_file_loc>
          
          
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>fleshy_ai@hotmail.com</reporter>
          <assigned_to>base-system@gentoo.org</assigned_to>
          <cc>fleshy_ai@hotmail.com</cc>

      

      
          <long_desc isprivate="0">
            <who>fleshy_ai@hotmail.com</who>
            <bug_when>2006-01-16 16:55:23 0000</bug_when>
            <thetext>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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2006-01-16 17:32:24 0000</bug_when>
            <thetext>Created an attachment (id=77308)
mdadm-2.2-update-segv.patch

try this patch and see if it fixes things for you</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>fleshy_ai@hotmail.com</who>
            <bug_when>2006-01-16 18:10:05 0000</bug_when>
            <thetext>(In reply to comment #1)
&gt; Created an attachment (id=77308) [edit]
&gt; mdadm-2.2-update-segv.patch
&gt; 
&gt; try this patch and see if it fixes things for you
&gt; 

Sorry, I am relatively new to Gentoo and the portage system.  How would I apply this and make portage not replace it?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2006-01-16 18:20:00 0000</bug_when>
            <thetext>http://www.gentoo.org/doc/en/bugzilla-howto.xml#doc_chap8 should cover it</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>fleshy_ai@hotmail.com</who>
            <bug_when>2006-01-16 18:57:42 0000</bug_when>
            <thetext>(In reply to comment #3)
&gt; http://www.gentoo.org/doc/en/bugzilla-howto.xml#doc_chap8 should cover it
&gt; 

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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2006-01-16 19:40:28 0000</bug_when>
            <thetext>added to cvs then as 2.2-r1, thanks for testing</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>77308</attachid>
            <date>2006-01-16 17:32 0000</date>
            <desc>mdadm-2.2-update-segv.patch</desc>
            <filename>mdadm-2.2-update-segv.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIEFzc2VtYmxlLmMub3JpZwkyMDA2LTAxLTE2IDIwOjMzOjAwLjAwMDAwMDAwMCAtMDUwMAor
KysgQXNzZW1ibGUuYwkyMDA2LTAxLTE2IDIwOjMzOjE3LjAwMDAwMDAwMCAtMDUwMApAQCAtMjE5
LDcgKzIxOSw3IEBACiAJCX0KIAkJaWYgKGRmZCA+PSAwKSBjbG9zZShkZmQpOwogCi0JCWlmIChp
ZGVudC0+dXVpZF9zZXQgJiYgKCF1cGRhdGUgJiYgc3RyY21wKHVwZGF0ZSwgInV1aWQiKSE9IDAp
ICYmCisJCWlmIChpZGVudC0+dXVpZF9zZXQgJiYgdXBkYXRlICYmIHN0cmNtcCh1cGRhdGUsICJ1
dWlkIikhPSAwICYmCiAJCSAgICAoIXN1cGVyIHx8IHNhbWVfdXVpZChpbmZvLnV1aWQsIGlkZW50
LT51dWlkLCB0c3QtPnNzLT5zd2FwdXVpZCk9PTApKSB7CiAJCQlpZiAoKGluYXJndiAmJiB2ZXJi
b3NlID49IDApIHx8IHZlcmJvc2UgPiAwKQogCQkJCWZwcmludGYoc3RkZXJyLCBOYW1lICI6ICVz
IGhhcyB3cm9uZyB1dWlkLlxuIiwK
</data>        

          </attachment>
    </bug>

</bugzilla>