Bug#664088: mdadm fails to initialize components for bitmap

Markus Hochholdinger Markus at hochholdinger.net
Fri Apr 13 11:07:16 UTC 2012


Hello Michael,

Am 12.04.2012 um 22:28 Uhr schrieb Michael Tokarev <mjt at tls.msk.ru>:
> On 13.04.2012 00:22, Markus Hochholdinger wrote:
> > Am 12.04.2012 um 21:38 Uhr schrieb Michael Tokarev <mjt at tls.msk.ru>:
> >> On 31.03.2012 01:28, Markus Hochholdinger wrote:
> >>> Package: mdadm
> >>> Version: 3.2.3-2
> >>> Followup-For: Bug #664088
> >>> Dear Maintainer,
> >>> seems I've been stumbled over this bug. I'm running wheezy and can
> >>> reproduce a crash: mdadm --grow /dev/md0 --bitmap=none
> >>> mdadm --grow /dev/md0 --bitmap=internal
> >>> A few seconds after this, the system is still alive, I see the newly
> >>> created bitmap in /proc/mdstat, and then the system crashes: [
> >>> 342.437949] md0: bitmap file is out of date (0 < 322) -- forcing full
> >>> recovery [  342.437967] created bitmap (1 pages) for device md0
> >>> [  347.949946] BUG: unable to handle kernel NULL pointer dereference at
> >>> 00000008 [  347.949969] IP: [<eda5edbd>] bitmap_endwrite+0x138/0x199
> >>> [md_mod] [  347.949991] *pdpt = 0000000002660007 *pde =
> >>> 0000000000000000 [  347.950010] Oops: 0000 [#1] SMP
> >> Oh.  This is a kernel bug, kernel should not crash like this even if
> >> incorrect bitmap is created.
> >> Marcus, what's your kernel version?
> > Linux 3.2.0-2-686-pae from wheezy.
> This was obvious from your initial message, but I wasn't clear.
> I meant to ask what kernel PACKAGE version is that.

oh, sorry. The installed kernel package is:
ii  linux-image-3.2.0-2-686-pae          3.2.12-1                Linux 3.2 for 
modern PCs
ii  linux-image-686-pae                  3.2+44                  Linux for 
moder

I still can reproduce this:
mdadm --grow /dev/md0 --bitmap=none
mdadm --grow /dev/md0 --bitmap=internal
And a few seconds later, the kernel crashes.


> Sigh, how many times I suggested kernel folks to include debian
> package version in the kernel OOPs test, but has been ignored
> every time... :(

I understand and will include kernel package versions in the future.


> > Hm, perhaps I could use mdadm from squeeze to check weather the kernel
> > also crashes.
> I doubt it is easily reproducible.  The original bug in mdadm (which is
> fixed upstream btw, in git, not any released version) does not initialize

It's sad, that there's no released version of mdadm which fixes this issue.


> bitmap, leaving some garbage in it.  Obviously not every garbage triggers
> the bug in kernel.  So if another attempt will not crash your kernel it
> does not tell anything.

Well, I can clearly reproduce this behaviour.


> I asked for the kernel package version in order to clone and reassign
> this bugreport to kernel properly.

Wow, that would be very kind of you!

So I'll do a little try and error, perhaps it helps for the kernel bugreport:
* I've done "aptitude update && aptitude safe-upgrade" now and rebooted.
* Still using mdadm (3.2.3-2) and linux-image-3.2.0-2-686-pae (3.2.12-1).
  Doing "mdadm --grow /dev/md0 --bitmap=none" and
  "mdadm --grow /dev/md0 --bitmap=internal" still crashes the kernel as
  reported in this bug.
* Now using (a very old) statically linked mdadm (v2.6.7 - 6th June 2008)
  which I used successful for years removing and making raid1 bitmaps.
  Doing "mdadm.static --grow /dev/md0 --bitmap=none" and
  "mdadm.static --grow /dev/md0 --bitmap=internal" works as expected and the
  kernel doesn't crash.
* Using mdadm.static to remove the bitmap and mdadm to add it also crashes the
  kernel.
* (mdadm from squeeze has a dependency problem with initscripts, so I can't
  simple use this version.)

So far so good. Hope it helps a little. Now I will try this with arch amd64 
instead of i386...


-- 
greetings

eMHa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.alioth.debian.org/pipermail/pkg-mdadm-devel/attachments/20120413/f716913e/attachment.pgp>


More information about the pkg-mdadm-devel mailing list