Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 73777 - [MDADM - v1.8.1 - 05 November 2004] segfaults when assembling
Summary: [MDADM - v1.8.1 - 05 November 2004] segfaults when assembling
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 84768 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-12-08 02:28 UTC by Avuton Olrich
Modified: 2005-03-10 10:55 UTC (History)
1 user (show)

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 Avuton Olrich 2004-12-08 02:28:17 UTC
mdadm has stopped working at v1.8.1 and segfaults:

This has only happened since upgrading. This is a simple stripe RAID just to join all my partitions together from different disks.



Reproducible: Always
Steps to Reproduce:
1. mdadm --assemble /dev/md0 /dev/sda1 /dev/sdb1 /dev/hdg1 /dev/hda4
2. Segmentation fault (core dumped)
3. # gdb /sbin/mdadm core
4. bt

Actual Results:  
#0  0x0804f09d in Assemble (st=0x8048f49, mddev=0xaffff15b "/dev/md0", mdfd=3,
ident=0xafffef00, conffile=0xff00c3c9 <Address 0xff00c3c9 out of bounds>,
devlist=0x8061070, readonly=0, runstop=0, update=0x0,
    verbose=0, force=0) at Assemble.c:211
#1  0x0804b6bf in main (argc=7, argv=0xafffefb4) at mdadm.c:723


Expected Results:  
1. mdadm --assemble /dev/md0 /dev/sda1 /dev/sdb1 /deb/hdg1 /dev/hda4
2. cat /proc/partitions
(some kind of /dev/md0 here)

Portage 2.0.51-r8 (default-linux/x86/2004.0, gcc-3.4.3, glibc-2.3.4.20041102-r0,
2.6.9-cko2 i686)
=================================================================
System uname: 2.6.9-cko2 i686 AMD Athlon(tm) XP 2800+
Gentoo Base System version 1.6.7
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Jun 23 2004, 04:06:19)]
distcc 2.18.2 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.6.3, 1.9.3, 1.5, 1.7.9
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.2-r7
virtual/os-headers:  2.4.22
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -O3 -pipe -ggdb"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config
/usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref
/usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -O3 -pipe -ggdb"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache digest distlocks nostrip sandbox sfperms"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aalib acl acpi aim alsa apm arts audiofile avi berkdb bitmap-fonts crypt
cups dba dga doc dvd emacs emacs-e3 encode esd f77 fam flac foomaticdb fortran
gd gdbm gif gnome gpm gtk gtk2 icq imagemagick imlib java jikes joystick jpeg
junit kde libg++ libwww mad mikmod motif mozilla mpeg ncurses nls offensive
oggvorbis opengl oscar oss pam pcre pdflib perl php png python qt quicktime
readline sdl slang speex spell ssl svga tcltk tcpd tetex theora tiff truetype
truetype-fonts unicode usb videos x86 xinerama xml xml2 xmms xosd xv xvid zlib"
Comment 1 Kenton Groombridge 2004-12-11 16:31:09 UTC
I have this same problem.  Reverted back to 1.7.  It may be related to this link I found via a Google search:

http://www.spinics.net/lists/raid/msg06867.html

There is a patch listed in one of the threads that supposidely fixes this problem.

Ken
Comment 2 Gentoo User 2005-02-25 19:34:09 UTC
1.8.1 segfaults for me, too, when assembling partitions.  Very simple setup: 2 partitions, raid0.  Another setup, same thing: 2 partition, raid 1.  Happens regardless if config file used, or driven only from command line.  1.9.0 works okay.  1.7.0 worked fine.

This is on x86.
Comment 3 maletek 2005-02-26 03:45:25 UTC
Same issue here, and downgrading to 1.7 does remedy the issue.

Gentoo Base System version 1.6.9
Portage 2.0.51-r15 (default-linux/x86/2004.3, gcc-3.3.5, glibc-2.3.4.20040808-r1, 2.6.10 i686)
=================================================================
System uname: 2.6.10 i686 AMD Athlon(tm) XP 2200+
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb  7 2005, 01:39:24)]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.4.3-r4, 1.5.10-r4
virtual/os-headers:  2.4.21-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo ftp://ftp6.uni-erlangen.de/pub/mirrors/gentoo ftp://vlaai.snt.ipv6.utwente.nl/pub/os/linux/gentoo/ http://vlaai.snt.ipv6.utwente.nl/pub/os/linux/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow X apm avi berkdb bitmap-fonts bonobo crypt cups curl emboss encode esd f77 fam flac font-server foomaticdb fortran gdbm gif gnome gpm gtk gtk2 gtkhtml imlib ipv6 jpeg libg++ libwww mad mikmod mmx motif mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib perl png python quicktime readline ruby sdl spell sse ssl svga tcltk tcpd tiff truetype truetype-fonts type1-fonts xml xml2 xmms xv zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY

Comment 4 Alin Năstac (RETIRED) gentoo-dev 2005-02-28 14:32:22 UTC
ver 1.9.0 is in portage tree. I think this one solve the segfault.
Comment 5 SpanKY gentoo-dev 2005-02-28 15:44:48 UTC
yes, 1.9.0 is now in the tree ... re-open if it segfaults too
Comment 6 daniel.johnston 2005-02-28 20:10:11 UTC
Maybe I don't know much about Gentoo release policies, but I don't think this should be closed until mdadm-1.9.0 is marked stable.  It is currently listed as (at least) ~x86.  

On most of my machines, I run with ~x86 just to try out new stuff.  When I went to install a home media server, I did a brand new install of gentoo without ~x86 to make sure that it is stable.  After installing a 1.2 TB raid and half filling it, I ran an emerge sync and update world just to make sure I had the latest patches installed.  This involved the mdadm-1.7.0 --> 1.8.1 upgrade.  On next reboot mdadm segfaults during assemble.  This freaked me out to say the least.  

After some research:

- I found the bug.  It's an uninitialized pointer.  Easy fix.
- I found the release notes for 1.8.1.  It's actually a pre-release for 2.0.

The 1.9.0 release is based off of 1.8.0 and is the latest stable build.  1.8.1 is BETA.  How this was ever put in the stable gentoo tree is curious, especially since it's been broken since November.

I'm sorry if this comes off as rude, but since Gentoo does have stable and experimental trees, I find it simply unacceptable that a version of crucial server software that segfaults in normal use has been marked stable 4 months after the bug was reported.  And the bug has been marked fixed when it isn't.  It seriously undermines any faith I had in the stable tree.
Comment 7 MKI 2005-03-01 13:16:48 UTC
Can someone either PLEASE mark the 1.8.1 release in portage as unstable
or provide a  patch within the portage that fixes the uninitialized
pointer bug?  This has bit us the second time around where our raid5
array could not be assembled while in degraded mode.

Thanks.

-mk
Comment 8 Avuton Olrich 2005-03-01 13:29:32 UTC
Either reopen the bug or file a new one, you may not get anyones attention otherwise.
Comment 9 Carsten Lohrke (RETIRED) gentoo-dev 2005-03-10 10:55:50 UTC
*** Bug 84768 has been marked as a duplicate of this bug. ***