[Bug 969384] Re: mdadm --detail --scan segfaults during update-initramfs

Launchpad Bug Tracker 969384 at bugs.launchpad.net
Fri Jun 22 19:50:17 UTC 2012


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

---------------
mdadm (3.2.5-1ubuntu1) quantal; urgency=low

  * Merge from Debian testing. (LP: #920324)  Remaining changes:
    - Call checks in local-premount to avoid race condition with udev
      and opening a degraded array.
    - d/initramfs/mdadm-functions: Record in /run when boot-degraded
      question has been asked so that it is only asked once
    - pass --test to mdadm to enable result codes for degraded arrays.
    - debian/control: we need udev and util-linux in the right version. We
      also remove the build dependency from quilt and docbook-to-man as both
      are not used in Ubuntus mdadm.
    - debian/initramfs/hook: kept the Ubuntus version for handling the absence
      of active raid arrays in <initramfs>/etc/mdadm/mdadm.conf
    - debian/initramfs/script.local-top.DEBIAN, debian/mdadm-startall,
      debian/mdadm.raid.DEBIAN: removed. udev does its job now instead.
    - debian/mdadm-startall.sgml, debian/mdadm-startall.8: documentation of
      unused startall script
    - debian/mdadm.config, debian/mdadm.postinst - let udev do the handling
      instead. Resolved merge conflict by keeping Ubuntu's version.
    - 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/mkconf.in is the older mkconf. Kept the Ubuntu version.
    - debian/rules: Kept Ubuntus version for installing apport hooks, not
      installing un-used startall script.
    - debian/install-rc, check.d/_numbers, check.d/root_on_raid: Ubuntu partman
      installer changes
    - debian/presubj: Dropped this unused bug reporting file. Instead use
      source_mdadm.py act as an apport hook for bug handling.
    - d/p/debian-changes-3.1.4-1+8efb9d1ubuntu4: mdadm udev rule
      incrementally adds mdadm member when detected. Starting such an
      array in degraded mode is possible by mdadm -IRs. Using mdadm
      -ARs without stopping the array first does nothing when no
      mdarray-unassociated device is available. Using mdadm -IRs to
      start a previously partially assembled array through incremental
      mode. Keeping the mdadm -ARs for assembling arrays which were for
      some reason not assembled through incremental mode (i.e through
      mdadm's udev rule).

  * Additional Ubuntu changes:
      - debian/initramfs/local-premount: add call wait_for_udev to wait a
      little longer for RAID devices to appear (LP: #942106)

  * Dropped Ubuntu changes:
    - Build udeb with -O2 on ppc64, working around a link error. Builds
      fine without it on debian.
    - rename debian/mdadm.vol_id.udev to debian/mdadm.mdadm-blkid.udev so
      that the rules file ends up with a more reasonable name. debian/rules
      changes for adding ubuntu's udev rule corresponding to mdadm. As we
      are now using 'upstream' udev rules see 3.2.3-2ubuntu2.

  * Changes to Ubuntu changes:
    - debian/source_mdadm.py: make apport hook python 2 and 3 compatible
      (LP: #1013171).

  * New upstream release closes this bugs:
    - mdadm --detail --scan segfaults during update-initramfs (LP: #969384)
 -- Dmitrijs Ledkovs <dmitrij.ledkov at ubuntu.com>   Fri, 15 Jun 2012 15:31:59 +0100

** Changed in: mdadm (Ubuntu Quantal)
       Status: Triaged => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to mdadm in Ubuntu.
https://bugs.launchpad.net/bugs/969384

Title:
  mdadm --detail --scan segfaults during update-initramfs

Status in “mdadm” package in Ubuntu:
  Fix Released
Status in “mdadm” source package in Precise:
  Triaged
Status in “mdadm” source package in Quantal:
  Fix Released

Bug description:
  ubuntu precise, Installed version of  mdadm  is 3.2.3-2ubuntu1

  mdadm segfaults on ubuntu precise during update-initramfs step.  You
  can reproduce it by running the command separately.  Stealing an older
  mdadm binary from an older ubuntu can be used as a workaround.

  -------------------------

  root at yow-lpgnfs-02:/home/paul# mdadm --detail --scan
  Segmentation fault
  root at yow-lpgnfs-02:/home/paul# dmesg
  [  577.478657] scsi_verify_blk_ioctl: 6 callbacks suppressed
  [  577.478661] mdadm: sending ioctl 1261 to a partition!
  [  577.478664] mdadm: sending ioctl 1261 to a partition!
  [  577.487510] mdadm: sending ioctl 1261 to a partition!
  [  577.487514] mdadm: sending ioctl 1261 to a partition!
  [  577.488595] mdadm: sending ioctl 1261 to a partition!
  [  577.488598] mdadm: sending ioctl 1261 to a partition!
  [  577.508385] mdadm: sending ioctl 1261 to a partition!
  [  577.508389] mdadm: sending ioctl 1261 to a partition!
  [  577.508680] mdadm: sending ioctl 1261 to a partition!
  [  577.508683] mdadm: sending ioctl 1261 to a partition!
  [  577.509875] mdadm[2244]: segfault at 0 ip 00007fc3b44bcb91 sp 00007fffca905c28 error 4 in libc-2.15.so[7fc3b4434000+1b2000]

  ----------------------------

  Using old v3.1.4 is a workaround:

  root at yow-lpgnfs-02:/home/paul# mdadm --version
  mdadm - v3.2.3 - 23rd December 2011
  root at yow-lpgnfs-02:/home/paul# /sbin/mdadm.old --version
  mdadm - v3.1.4 - 31st August 2010
  root at yow-lpgnfs-02:/home/paul# /sbin/mdadm.old --detail --scan
  ARRAY /dev/md0 metadata=0.90 UUID=48165815:e3a4f8ba:63476e95:1b06b14d
  root at yow-lpgnfs-02:/home/paul# 

  ----------------------------------

  root at yow-lpgnfs-02:/home/paul# gdb --args mdadm --detail --scan
  GNU gdb (Ubuntu/Linaro 7.4-2012.02-0ubuntu2) 7.4-2012.02
  Copyright (C) 2012 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "x86_64-linux-gnu".
  For bug reporting instructions, please see:
  <http://bugs.launchpad.net/gdb-linaro/>...
  Reading symbols from /sbin/mdadm...(no debugging symbols found)...done.
  (gdb) run
  Starting program: /sbin/mdadm --detail --scan

  Program received signal SIGSEGV, Segmentation fault.
  0x00007ffff7aa5b91 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
  (gdb) bt
  #0  0x00007ffff7aa5b91 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
  #1  0x00007ffff7ae39c9 in fnmatch () from /lib/x86_64-linux-gnu/libc.so.6
  #2  0x0000000000409e88 in ?? ()
  #3  0x000000000040a1b3 in ?? ()
  #4  0x000000000044d10b in ?? ()
  #5  0x000000000044d585 in ?? ()
  #6  0x000000000044d67d in ?? ()
  #7  0x0000000000407335 in ?? ()
  #8  0x00007ffff7a3e76d in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
  #9  0x0000000000407ee9 in ?? ()
  #10 0x00007fffffffe668 in ?? ()
  #11 0x000000000000001c in ?? ()
  #12 0x0000000000000003 in ?? ()
  #13 0x00007fffffffe8a8 in ?? ()
  #14 0x00007fffffffe8b4 in ?? ()
  #15 0x00007fffffffe8bd in ?? ()
  #16 0x0000000000000000 in ?? ()
  (gdb) 

  -------------------------------

  Tail end of an strace:

  open("/dev/sda1", O_RDONLY|O_DIRECT)    = 3
  fstat(3, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 1), ...}) = 0
  ioctl(3, BLKGETSIZE64, 0x7fffc589fda0)  = 0
  ioctl(3, BLKFLSBUF, 0)                  = 0
  lseek(3, 250055622656, SEEK_SET)        = 250055622656
  read(3, "\374N+\251\0\0\0\0Z\0\0\0\0\0\0\0\0\0\0\0\25X\26H\332\374NN\0\0\0\0"..., 4096) = 4096
  fstat(3, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 1), ...}) = 0
  ioctl(3, BLKGETSIZE64, 0x7fffc589fc50)  = 0
  ioctl(3, BLKFLSBUF, 0)                  = 0
  lseek(3, 250055680000, SEEK_SET)        = 250055680000
  ioctl(3, BLKSSZGET, 0x7fffc589fc4c)     = 0
  read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1024) = 1024
  fstat(3, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 1), ...}) = 0
  ioctl(3, BLKGETSIZE64, 0x7fffc589fc50)  = 0
  ioctl(3, BLKFLSBUF, 0)                  = 0
  lseek(3, 0, SEEK_SET)                   = 0
  ioctl(3, BLKSSZGET, 0x7fffc589fc4c)     = 0
  read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1024) = 1024
  fstat(3, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 1), ...}) = 0
  ioctl(3, BLKGETSIZE64, 0x7fffc589fc50)  = 0
  ioctl(3, BLKFLSBUF, 0)                  = 0
  lseek(3, 4096, SEEK_SET)                = 4096
  ioctl(3, BLKSSZGET, 0x7fffc589fc4c)     = 0
  read(3, "\1\4\0\0\21\4\0\0!\4\0\0\331[\365\37\2\0\4\0\0\0\0\0\0\0\0\0\0\0E,"..., 1024) = 1024
  fstat(3, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 1), ...}) = 0
  ioctl(3, BLKGETSIZE64, 0x7fffc589fdb0)  = 0
  ioctl(3, BLKPG, 0x7fffc589fd10)         = -1 EINVAL (Invalid argument)
  ioctl(3, BLKPG, 0x7fffc589fd20)         = -1 EINVAL (Invalid argument)
  ioctl(3, BLKFLSBUF, 0)                  = 0
  lseek(3, 0, SEEK_SET)                   = 0
  read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
  ioctl(3, BLKFLSBUF, 0)                  = 0
  lseek(3, 0, SEEK_SET)                   = 0
  read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
  fstat(3, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 1), ...}) = 0
  ioctl(3, BLKGETSIZE64, 0x7fffc589fda0)  = 0
  ioctl(3, BLKFLSBUF, 0)                  = 0
  lseek(3, 250055622656, SEEK_SET)        = 250055622656
  read(3, "\374N+\251\0\0\0\0Z\0\0\0\0\0\0\0\0\0\0\0\25X\26H\332\374NN\0\0\0\0"..., 4096) = 4096
  fstat(3, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 1), ...}) = 0
  ioctl(3, BLKGETSIZE64, 0x7fffc589ff80)  = 0
  ioctl(3, BLKFLSBUF, 0)                  = 0
  lseek(3, 250055622656, SEEK_SET)        = 250055622656
  read(3, "\374N+\251\0\0\0\0Z\0\0\0\0\0\0\0\0\0\0\0\25X\26H\332\374NN\0\0\0\0"..., 4096) = 4096
  close(3)                                = 0
  --- SIGSEGV (Segmentation fault) @ 0 (0) ---
  +++ killed by SIGSEGV +++

  -------------------------------------
  root at yow-lpgnfs-02:/home/paul# cat /proc/mdstat 
  Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
  md0 : active raid0 sda1[0] sdb1[1]
        488389888 blocks 64k chunks
        
  unused devices: <none>
  root at yow-lpgnfs-02:/home/paul# cat /proc/partitions 
  major minor  #blocks  name

     8        0  293036184 sda
     8        1  244195008 sda1
     8        2   48837600 sda2
     8       16  244198584 sdb
     8       17  244195008 sdb1
     9        0  488389888 md0
  root at yow-lpgnfs-02:/home/paul#

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mdadm/+bug/969384/+subscriptions




More information about the foundations-bugs mailing list