Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#26127 - [mdadm] 3.2.2-4 causes segmentation fault upon boot

Attached to Project: Arch Linux
Opened by Peter Dimou (pad76) - Tuesday, 27 September 2011, 15:08 GMT
Last edited by Tobias Powalowski (tpowa) - Wednesday, 12 October 2011, 06:49 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Tobias Powalowski (tpowa)
Architecture All
Severity Critical
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description:

mdadm 3.2.2-4 causes a Segmentation Fault when udev runs upon initial boot. Hard drives can't be found and user is then dropped to an emergency shell. Downgrading to mdadm 3.2.2-3 causes the problem to go away.

Additional info:
* package version(s) mdadm 3.2.2-4, linux 3.0.4.1, glibc 2.14-6
* config and/or log files etc.



Hardware:
Motherboard - ASUS P6TD
Two RAID 0 arrays using imsm (Intel Matrix Storage Manager)



Steps to reproduce:

Install/upgrade to mdadm 3.2.2-4.
Rebuild initrd using mdadm hooks in /etc/mkinitcpio.conf. command: mkinicpio -p linux
Rebuild /etc/mdadm.conf using the command: mdadm --examine --scan > /etc/mdadm.conf
This task depends upon

Closed by  Tobias Powalowski (tpowa)
Wednesday, 12 October 2011, 06:49 GMT
Reason for closing:  Fixed
Comment by Tobias Powalowski (tpowa) - Thursday, 29 September 2011, 06:54 GMT
you could try mdadm_udev hook instead, the new package just replaced the udev hook with the old mdassemble hook.
Comment by Jaap Crezee (jaapcrezee) - Wednesday, 05 October 2011, 18:07 GMT
I can confirm this bug. I have to manually boot my system now.
(eg mdadm --assemble --scan and ln -sf /dev/md<nr> /dev/disk/by-label/<label> )
Comment by Tobias Powalowski (tpowa) - Thursday, 06 October 2011, 06:15 GMT
Does the udev hook fix the problem? I didn't change anything. mdadm hook uses static mdassemble, mdadm_udev uses mdadm with udev.
Comment by Jaap Crezee (jaapcrezee) - Thursday, 06 October 2011, 06:22 GMT
The mdadm_udev hook does not exist.
"udev" is present in my HOOKS list.
Running mdassemble by hand in the shell does not reassemble the devices.
mdadm --assemble --scan does BUT does not create /dev/disk/by-label/* links
If you need more info, please ask.
Comment by Tobias Powalowski (tpowa) - Thursday, 06 October 2011, 06:25 GMT
mdadm /lib/initcpio/install/mdadm_udev
pacman -Qo /lib/initcpio/install/mdadm_udev


Comment by Jaap Crezee (jaapcrezee) - Thursday, 06 October 2011, 06:28 GMT
What I just don't like is that upgrading my system renders it unbootable.
Can this be fixed automatically?
I will try this fix tomorrow (currently not at home, rebooting this system remotely is scary)
Comment by Tobias Powalowski (tpowa) - Thursday, 06 October 2011, 06:29 GMT
Sure I have no clue why your systems don't work anymore,
The udev way also made systems unbootable, so I restored the old way of assembling.
Could you give me more input on what raid are you using, mdadm.conf and mkinitcpio.conf?
Comment by Jaap Crezee (jaapcrezee) - Thursday, 06 October 2011, 06:34 GMT
My mdadm.conf contains:
DEVICE partitions
MAILADDR <emailaddr>

My mkinitcpio.conf contains:
MODULES="raid1 raid456"
BINARIES="/sbin/mdadm /sbin/mdassemble"
FILES=""
HOOKS="base udev autodetect pata scsi sata filesystems usbinput mdadm"
COMPRESSION="xz"

I am using rai1 & raid6:

[jaap@server ~]$ cat /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4]
md124 : active raid1 sda1[0] sdf1[4] sdd1[3] sdc1[2] sdb1[1]
48756 blocks super 1.2 [6/5] [UUUUU_]

md125 : active raid6 sda2[0] sdf2[6] sdd2[3] sdc2[2] sdb2[1]
7995392 blocks super 1.2 level 6, 512k chunk, algorithm 2 [6/5] [UUUUU_]

md126 : active raid6 sda3[0] sdf3[6] sdd3[3] sdc3[2] sdb3[1]
280670208 blocks super 1.2 level 6, 512k chunk, algorithm 2 [6/5] [UUUUU_]

md127 : active raid6 sda4[0] sdf4[6] sdd4[3] sdc4[2] sdb4[1]
7525181440 blocks super 1.2 level 6, 512k chunk, algorithm 2 [6/5] [UUUUU_]

unused devices: <none>
[jaap@server ~]$
Comment by Jaap Crezee (jaapcrezee) - Thursday, 06 October 2011, 06:38 GMT
BTW I have not seen any segfault during startup, but maybe I am not looking good enough.
It just does not assemble the MD arrays.
Comment by Tobias Powalowski (tpowa) - Thursday, 06 October 2011, 06:39 GMT
Ok the mdadm hook cannot work for you, because you don't define arrays in mdadm.conf.
run: mdadm -D --scan >>/etc/mdadm.conf
to add the arrays.

Comment by Jaap Crezee (jaapcrezee) - Thursday, 06 October 2011, 06:40 GMT
I have never added the arrays to mdadm.conf and it has always worked (for all my machines). Please add a option to mkinicpio which activates/restores the old behaviour....
Comment by Tobias Powalowski (tpowa) - Thursday, 06 October 2011, 06:45 GMT
How long do you run this setup? Have you defined the arrays on bootloader commandline?
Comment by Jaap Crezee (jaapcrezee) - Thursday, 06 October 2011, 06:47 GMT
I run this kind of setup for over 2 years....
I have not defined md boot (kernel) commandline parameters.
Maybe I should look at the diff from 3.2.2-4 to 3.2.2-3 and suggest a patch?
Comment by Tobias Powalowski (tpowa) - Thursday, 06 October 2011, 06:57 GMT
This is strange the change to udev happened in june this year, it makes me wonder how it was working before.
The old way to assemble md arrays was only using mdadm.conf file with arrays defined or define it on commandline.
I think the best solution for you is to change to mdadm_udev in mkinitcpio.conf.
Comment by Jaap Crezee (jaapcrezee) - Thursday, 06 October 2011, 06:59 GMT
Ok, I will try the mdadm_udev (install) option.
Maybe I will bisect it exactly later.
Comment by Tobias Powalowski (tpowa) - Thursday, 06 October 2011, 07:03 GMT
No need to bisect, there happened not much in the last releases.
I just divided the both assemble methods.
It doesn't make sense to assemble arrays with 2 ways in 1 hook.
Comment by Jaap Crezee (jaapcrezee) - Saturday, 08 October 2011, 10:50 GMT
The mdadm_udev hook works for me. System boots itself again.
Comment by Peter Dimou (pad76) - Sunday, 09 October 2011, 16:37 GMT
I just upgraded my mdadm package to 3.2.2-4 and followed the above instructions for placing the mdadm_udev hook in /etc/mkinitpcio.conf. I can confirm that the solution works and I am no longer getting a Segmentation Fault error upon boot.
Comment by Tobias Powalowski (tpowa) - Wednesday, 12 October 2011, 06:49 GMT
So can we close this now?

Loading...