Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 258710 - sys-fs/mdadm - RAID0 array hangs remounting / r/o during shutdown
Summary: sys-fs/mdadm - RAID0 array hangs remounting / r/o during shutdown
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-12 10:23 UTC by Mario Bachmann
Modified: 2009-08-24 10:53 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mario Bachmann 2009-02-12 10:23:42 UTC
My Hardware: AMD X2 3800+, 8GB RAM, 2 * 250 GB HD. 

I use a machine with 3 mdadm raid0 arrays including the root filesystem ("/"). when i type "reboot", the last lines on the screen are like that:
  Remounting / read only
  Give root password for maintenance
  (or type Control-D to continue)
[hanging]
My bad solution: i type in my root-password and than i type "reboot" again and the machine do a reboot. I could type other commands here like fuser?!

I think the hanging is related to mdadm (or somthing related) because two points: 
1. Some friends reported similar problems when using dmcrypt, lvm and mdadm. Perhaps it is related.
2. I have two other machines (i686) without raid (mdadm) and they do the reboot without hanging.

I use sys-fs/mdadm-2.6.8 and sys-apps/openrc-0.4.3 .

emerge --info
Portage 2.1.6.7 (default/linux/amd64/2008.0, gcc-4.3.3, glibc-2.9_p20081201-r1, 2.6.28.4 x86_64)
=================================================================
System uname: Linux-2.6.28.4-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_3800+-with-glibc2.2.5
Timestamp of tree: Thu, 12 Feb 2009 09:45:02 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:     3.2_p48-r1
dev-java/java-config: 1.3.7-r1, 2.1.7
dev-lang/python:     2.5.4-r2
dev-util/cmake:      2.6.2
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.3
sys-apps/sandbox:    1.3.5
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19.1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.28-r1
ACCEPT_KEYWORDS="amd64 ~amd64 ~x86"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe -m3dnow -mmmx -msse -msse2 -msse3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=athlon64 -O2 -pipe -m3dnow -mmmx -msse -msse2 -msse3"
DISTDIR="/mnt/data/gentoo/distfiles"
FEATURES="distlocks fixpackages metadata-transfer parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans"
GENTOO_MIRRORS="rsync://duron/distfiles rsync://amd2000/distfiles ftp://mirror.qubenet.net/mirror/gentoo/ ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://mirror.muntinternet.net/pub/gentoo/ ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://gentoo.imj.fr/pub/gentoo/ ftp://mirror.netcologne.de/gentoo/ ftp://mirror.cambrium.nl/pub/os/linux/gentoo/ ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ ftp://de-mirror.org/distro/gentoo/ ftp://gentoo.tiscali.nl/pub/mirror/gentoo/ http://mirror.switch.ch/ftp/mirror/gentoo/ http://de-mirror.org/distro/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ http://mirror.cambrium.nl/pub/os/linux/gentoo/ http://mirror.muntinternet.net/pub/gentoo/ http://gentoo.tiscali.nl/ http://mirror.qubenet.net/mirror/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://mirror.netcologne.de/gentoo/"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="de"
MAKEOPTS="-j5"
PKGDIR="/mnt/data/gentoo/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage_overlay"
SYNC="rsync://194.97.4.250/gentoo-portage"
USE="3dnow 3dnowext X aac acl acpi aiglx alsa amd64 berkdb bzip2 cli cracklib crypt cups dbus dri dvb dvd dvdr dvdread encode exif fam flac fortran gdbm glitz gpm hal iconv imagemagick imlib ipv6 isdnlog jpeg lcms lm_sensors midi mmx mmxext mp3 mudflap multilib ncurses nls nptl nptlonly ogg openal opengl openmp pam pcre pdf perl png pppd python qt3support qt4 readline reflection sdl session smp spell spl sse sse2 sse3 ssl svg sysfs tcpd threads tiff truetype unicode usb v4l v4l2 vorbis wmf x264 xcomposite xine xinerama xml xorg xulrunner xv xvid xvmc zlib" ALSA_CARDS="hda-intel intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="alias auth_basic authn_file authz_groupfile authz_host authz_user autoindex deflate dir filter ident log_config logio mime status" DVB_CARDS="dibusb-usb1" ELIBC="glibc" INPUT_DEVICES="joystick keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="fbdev nv nvidia vesa vga"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


Reproducible: Always

Steps to Reproduce:
1. use a machine with mdadm-raid0
2. type "reboot" (to do a reboot)
Actual Results:  
[hanging] and NO reboot. 

Expected Results:  
a nice reboot (machine should restart/reboot). 

some time before reboot worked but halt worked only sometimes. the halt-problems seems to be fixed.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2009-02-12 17:16:30 UTC
Looks like a duplicate of other bugs where remounting / r/o hangs.
Comment 2 SpanKY gentoo-dev 2009-02-12 21:01:10 UTC
has this ever worked ?  if so, what was the last version of mdadm that worked ?
Comment 3 Mario Bachmann 2009-02-12 21:18:14 UTC
it worked with the old baselayout (before openrc).
Comment 4 Mario Bachmann 2009-02-15 16:51:01 UTC
i solved the symptoms, but i really do not know how it is connected:

nano -w /etc/inittab
in:  l6r:6:wait:/sbin/reboot -dk
out: #z6:6:respawn:/sbin/sulogin

Now the reboot (and the halt) command works how expected... :-)

Perhaps somebody can explain it...
Comment 5 SpanKY gentoo-dev 2009-08-23 11:03:23 UTC
i dont know what you mean be "in" and "out".  are you saying you didnt have the l6r reboot command enabled before ?
Comment 6 Mario Bachmann 2009-08-24 06:08:23 UTC
in = i put this line in
out = i removed the line

since some month i do not use mdadm-raid at all. 
sometimes the halt-command hangs at the point where it wants to turn off the machine. turning off the machine do not happen. 

an other machine sometimes hangs while the reboot-command. reboot of the machine do not happen. 

perhaps these aspects are related to this bug, perhaps mdadm is not the reason. perhaps it is just a coincidence. 

i do not know how to debug these kind of bugs at the end of shutdown-phase. 
Comment 7 SpanKY gentoo-dev 2009-08-24 06:22:41 UTC
why did you change your inittab in this way in the first place ?  the "in" line you refer to has always been in the default inittab, as has the "out" line (commented out of course, so it doesnt matter)
Comment 8 Mario Bachmann 2009-08-24 07:32:51 UTC
i can not tell you what and why i changed a half year ago, sorry. 
Comment 9 SpanKY gentoo-dev 2009-08-24 09:08:50 UTC
well, if things work in the default configuration as shipped by our ebuilds, and they break when lines have been modified that (afaict) shouldnt have been modified, i guess there's nothing to look at here ?
Comment 10 Mario Bachmann 2009-08-24 10:53:00 UTC
things do not work with the default configuration, my inittab-change was only a try to solve the problem. it might be completely unrelated. please forget the inittab-change. 

the point is: my system hangs two times a week. the power off do not work automatically. that is scary. 

when i search bugs.gentoo.org for halt/hang/system hang, i get several bug-reports which have one thing common: the hang of the shutdown procedure. 
there are combinations [mdadm/hang] [nfs/hang] [something/hang]. 
so i fear the reason is not mdadm/nfs/something, but a race condition (different chronological order of execution) of the scripts.