mdadm seg faults when forced to assemble array

Bug #282492 reported by bexamous
20
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mdadm (Debian)
Fix Released
Unknown
mdadm (Ubuntu)
Fix Released
Critical
Dustin Kirkland 

Bug Description

Binary package hint: mdadm

Trying to force array to assemble causes mdadm to seg fault.

Eg:
bexamous@nine:~$ sudo mdadm -A -f /dev/md3 /dev/sdb3 /dev/sdc3 /dev/sde3 /dev/sdf3 /dev/sdg3 /dev/sdh3
mdadm: forcing event count in /dev/sdb3(0) from 93274 upto 93278
Segmentation fault (core dumped)

This is with mdadm version 2.6.7-3ubuntu7

Found same exact problem reported here:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=499643

Revision history for this message
bexamous (bexamous) wrote :

http://neil.brown.name/git?p=mdadm;a=commitdiff;h=60b435db5a7b085ad1204168879037bf14ebd6d1

BTW this patch fixes issue.

Before:
bexamous@nine:~$ sudo mdadm -A -f /dev/md3 /dev/sdb3 /dev/sdc3 /dev/sde3 /dev/sdf3 /dev/sdg3 /dev/sdh3
mdadm: forcing event count in /dev/sdb3(0) from 93274 upto 93278
Segmentation fault (core dumped)

After:
bexamous@nine:~$ sudo mdadm -v -A -f --run /dev/md3 /dev/sdb3 /dev/sdc3 /dev/sde3 /dev/sdf3 /dev/sdg3 /dev/sdh3
mdadm: looking for devices for /dev/md3
mdadm: /dev/sdb3 is identified as a member of /dev/md3, slot 0.
mdadm: /dev/sdc3 is identified as a member of /dev/md3, slot 1.
mdadm: /dev/sde3 is identified as a member of /dev/md3, slot 2.
mdadm: /dev/sdf3 is identified as a member of /dev/md3, slot 3.
mdadm: /dev/sdg3 is identified as a member of /dev/md3, slot 4.
mdadm: /dev/sdh3 is identified as a member of /dev/md3, slot 5.
mdadm: forcing event count in /dev/sdb3(0) from 93274 upto 93278
mdadm: forcing event count in /dev/sdc3(1) from 93274 upto 93278
mdadm: forcing event count in /dev/sde3(2) from 93274 upto 93278
mdadm: added /dev/sdc3 to /dev/md3 as 1
mdadm: added /dev/sde3 to /dev/md3 as 2
mdadm: added /dev/sdf3 to /dev/md3 as 3
mdadm: added /dev/sdg3 to /dev/md3 as 4
mdadm: added /dev/sdh3 to /dev/md3 as 5
mdadm: no uptodate device for slot 6 of /dev/md3
mdadm: added /dev/sdb3 to /dev/md3 as 0
mdadm: /dev/md3 has been started with 6 drives (out of 7).

Changed in mdadm:
assignee: nobody → kirkland
importance: Undecided → Critical
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.4 KiB)

This bug was fixed in the package mdadm - 2.6.7.1-1ubuntu1

---------------
mdadm (2.6.7.1-1ubuntu1) jaunty; urgency=low

  * This merge should solve the critical bug: LP: #282492.
  * Merge from debian unstable, remaining changes:
   * config.c, Assemble.c: retrieve the returned value from asprintf,
     and assert; should prevent mdadm from segfaulting if there is not enough
     memory available; Debian Bug #509167.
   * debian/README.initramfs-transition, debian/README.upgrading-2.5.3,
     debian/README.Debian: drop Debian-specific documentation.
   * debian/mkconf: initialize variable.
   * debian/mdadm-startall, debian/mdadm-startall.8, debian/mdadm.links,
     debian/mdadm.manpages, debian/mdadm-startall.sgm: dropped, not used
     in Ubuntu (thus dropping the build-dep on docbook-to-man).
   * debian/mdadm.preinst, debian/mdadm.udev: udev enablement, remove the
     Debian init script.
   * debian/mdadm.templates, debian/mdadm-udeb.templates: Ubuntu puts the
     debconf template questions in the udeb.
   * debian/mdadm.postrm: drop warnings in the initramfs update.
   * debian/mdadm.postinst, debian/mdadm.config, initramfs/init-premount:
     boot-degraded enablement; maintain udev starting of RAID devices;
     init-premount hook script for the initramfs, to provide information
     at boot.
   * debian/mdadm-udeb.dirs: udeb packaging for installer.
   * debian/mdadm.dirs: install init-premount script.
   * debian/control: maintainer updates, no need for docbook since we dropped
     the manpages that needed it, we need specific udev and initramfs-tools
     versions that don't ship 'mdrun'.
   * debian/mdadm-raid: drop, since we have a udev rule that automatically
     runs "mdadm --assemble --scan --no-degraded", activating any non-degraded
     device as their components are detected.
   * debian/rules: account for the various installation differences of the
     documentation, udev rules, the udeb, initramfs premount script, udeb
     templates and translation thereof.
   * debian/initramfs/hook: massively simplified by udev.
   * debian/install-rc, check.d/_numbers, check.d/root_on_raid: Ubuntu partman
     installer changes.

mdadm (2.6.7.1-1) unstable; urgency=low

  * New upstream release, specifically created for Debian lenny to fix the RC
    bugs, which
    - fixes typo in forced assembly code (closes: #496334, #499643, #498505).
    - fixes array component size detection (closes: 500309).
    Thanks Neil Brown, mdadm upstream: you are spoiling me. :)

  * Minor fixes to documentation:
    - Add David Pashley's Rebuilding RAID blog post.
    - Add new (bugfix) version 1.40 of the newdisk script
      (/usr/share/doc/mdadm/examples/newdisk.gz) (closes: #490955).
    - Add link to Warren Togami's writeup about remote RAID-1 conversion to
      README.recipes.
    - Fix probability of survival in FAQ 4b, since I erroneously labeled the
      chance of failure as the chance of survival; thanks to Per Olofssen for
      clarification (closes: #493577).
    - Cherry-picked 6d6de2e from Neil, which adds HOMEHOST to the manpage and
      closes: #489257.

mdadm (2.6.7-3.1) unstable; urgency=low

  * Non-maintainer upload with pe...

Read more...

Changed in mdadm:
status: Triaged → Fix Released
Changed in mdadm:
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.