Bug#500482: Segmentation fault in grub-probe
Zrin Ziborski
zrin.debian at ziborski.net
Sun Sep 28 17:34:59 UTC 2008
Package: grub
Version: 0.97-47
Severity: grave
Justification: renders package unusable for many users
Segmentation fault in grub-probe prevents any automated install.
Only manual installation within grub shell is possible.
"whg" Setup:
- 4 x 250 GB SATA HDD
- 5 GB RAID1 /dev/md0 over all 4 disks (hd[abcd]1) with ext3 /
- swap partition on each disk (hd[abcd]2)
- ~240 GB RAID1 /dev/md1 over hda3 and hdb3 type
- ~240 GB RAID1 /dev/md2 over hdc3 and hdd3
- RAID0 /dev/md3 over /dev/md1 and /dev/md2 with 16KiB chunk size
- therfore /dev/sd[cd]3 does not contain any recognizable signature
whg:~# hexdump -Cn 1024 /dev/sda3 ## mirrored on sdb3
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000200 4c 41 42 45 4c 4f 4e 45 01 00 00 00 00 00 00 00 |LABELONE........|
00000210 af 36 3b a3 20 00 00 00 4c 56 4d 32 20 30 30 31 |.6;. ...LVM2 001|
00000220 6a 78 38 63 6f 46 69 35 32 42 35 64 70 62 34 73 |jx8coFi52B5dpb4s|
00000230 7a 55 62 68 6f 47 38 62 58 36 6e 46 55 76 78 55 |zUbhoG8bX6nFUvxU|
00000240 00 00 e0 c1 6f 00 00 00 00 00 03 00 00 00 00 00 |....o...........|
00000250 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000260 00 00 00 00 00 00 00 00 00 10 00 00 00 00 00 00 |................|
00000270 00 f0 02 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000280 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000400
whg:~# hexdump -Cn 512 /dev/sdc3
00000000 64 22 0a 73 74 72 69 70 65 5f 63 6f 75 6e 74 20 |d".stripe_count |
00000010 3d 20 31 09 23 20 6c 69 6e 65 61 72 0a 0a 73 74 |= 1.# linear..st|
00000020 72 69 70 65 73 20 3d 20 5b 0a 22 70 76 30 22 2c |ripes = [."pv0",|
00000030 20 30 0a 5d 0a 7d 0a 7d 0a 0a 73 72 76 20 7b 0a | 0.].}.}..srv {.|
00000040 69 64 20 3d 20 22 34 32 6b 58 54 79 2d 75 65 66 |id = "42kXTy-uef|
00000050 4c 2d 43 61 65 41 2d 35 30 47 30 2d 5a 45 52 4d |L-CaeA-50G0-ZERM|
00000060 2d 6b 58 4e 73 2d 69 49 76 72 31 64 22 0a 73 74 |-kXNs-iIvr1d".st|
00000070 61 74 75 73 20 3d 20 5b 22 52 45 41 44 22 2c 20 |atus = ["READ", |
00000080 22 57 52 49 54 45 22 2c 20 22 56 49 53 49 42 4c |"WRITE", "VISIBL|
00000090 45 22 5d 0a 73 65 67 6d 65 6e 74 5f 63 6f 75 6e |E"].segment_coun|
000000a0 74 20 3d 20 31 0a 0a 73 65 67 6d 65 6e 74 31 20 |t = 1..segment1 |
000000b0 7b 0a 73 74 61 72 74 5f 65 78 74 65 6e 74 20 3d |{.start_extent =|
000000c0 20 30 0a 65 78 74 65 6e 74 5f 63 6f 75 6e 74 20 | 0.extent_count |
000000d0 3d 20 32 35 36 30 30 0a 0a 74 79 70 65 20 3d 20 |= 25600..type = |
000000e0 22 73 74 72 69 70 65 64 22 0a 73 74 72 69 70 65 |"striped".stripe|
000000f0 5f 63 6f 75 6e 74 20 3d 20 31 09 23 20 6c 69 6e |_count = 1.# lin|
00000100 65 61 72 0a 0a 73 74 72 69 70 65 73 20 3d 20 5b |ear..stripes = [|
00000110 0a 22 70 76 30 22 2c 20 34 30 39 36 0a 5d 0a 7d |."pv0", 4096.].}|
00000120 0a 7d 0a 0a 68 6f 6d 65 20 7b 0a 69 64 20 3d 20 |.}..home {.id = |
00000130 22 4c 59 71 70 49 30 2d 31 51 49 47 2d 6b 4c 45 |"LYqpI0-1QIG-kLE|
00000140 76 2d 4e 66 55 4d 2d 6a 7a 36 73 2d 4b 70 68 5a |v-NfUM-jz6s-KphZ|
00000150 2d 52 52 70 42 59 6d 22 0a 73 74 61 74 75 73 20 |-RRpBYm".status |
00000160 3d 20 5b 22 52 45 41 44 22 2c 20 22 57 52 49 54 |= ["READ", "WRIT|
00000170 45 22 2c 20 22 56 49 53 49 42 4c 45 22 5d 0a 73 |E", "VISIBLE"].s|
00000180 65 67 6d 65 6e 74 5f 63 6f 75 6e 74 20 3d 20 31 |egment_count = 1|
00000190 0a 0a 73 65 67 6d 65 6e 74 31 20 7b 0a 73 74 61 |..segment1 {.sta|
000001a0 72 74 5f 65 78 74 65 6e 74 20 3d 20 30 0a 65 78 |rt_extent = 0.ex|
000001b0 74 65 6e 74 5f 63 6f 75 6e 74 20 3d 20 31 35 33 |tent_count = 153|
000001c0 36 30 0a 0a 74 79 70 65 20 3d 20 22 73 74 72 69 |60..type = "stri|
000001d0 70 65 64 22 0a 73 74 72 69 70 65 5f 63 6f 75 6e |ped".stripe_coun|
000001e0 74 20 3d 20 31 09 23 20 6c 69 6e 65 61 72 0a 0a |t = 1.# linear..|
000001f0 73 74 72 69 70 65 73 20 3d 20 5b 0a 22 70 76 30 |stripes = [."pv0|
00000200
whg:~# grub-probe -v -d /dev/md0
grub-probe: info: the size of hd0 is 488397168
grub-probe: info: opening the device `/dev/sda'
grub-probe: info: the size of hd0 is 488397168
grub-probe: info: the size of hd0 is 488397168
grub-probe: info: opening the device `/dev/sda1'
grub-probe: info: opening the device `/dev/sda1'
grub-probe: info: opening the device `/dev/sda1'
grub-probe: info: the size of hd0 is 488397168
grub-probe: info: opening the device `/dev/sda2'
grub-probe: info: the size of hd0 is 488397168
grub-probe: info: opening the device `/dev/sda3'
[... line repeated ~40 times...]
grub-probe: info: opening the device `/dev/sda3'
grub-probe: info: the size of hd1 is 488397168
grub-probe: info: opening the device `/dev/sdb'
grub-probe: info: the size of hd1 is 488397168
grub-probe: info: the size of hd1 is 488397168
grub-probe: info: opening the device `/dev/sdb1'
grub-probe: info: opening the device `/dev/sdb1'
grub-probe: info: opening the device `/dev/sdb1'
grub-probe: info: the size of hd1 is 488397168
grub-probe: info: opening the device `/dev/sdb2'
grub-probe: info: the size of hd1 is 488397168
grub-probe: info: opening the device `/dev/sdb3'
[... line repeated ~40 times...]
grub-probe: info: opening the device `/dev/sdb3'
grub-probe: info: the size of hd2 is 488397168
grub-probe: info: opening the device `/dev/sdc'
grub-probe: info: the size of hd2 is 488397168
grub-probe: info: the size of hd2 is 488397168
grub-probe: info: opening the device `/dev/sdc1'
grub-probe: info: opening the device `/dev/sdc1'
grub-probe: info: opening the device `/dev/sdc1'
grub-probe: info: the size of hd2 is 488397168
grub-probe: info: opening the device `/dev/sdc2'
grub-probe: info: the size of hd2 is 488397168
grub-probe: info: opening the device `/dev/sdc3'
grub-probe: info: opening the device `/dev/sdc3'
grub-probe: info: opening the device `/dev/sdc3'
grub-probe: info: opening the device `/dev/sdc3'
grub-probe: info: opening the device `/dev/sdc3'
grub-probe: info: the size of hd3 is 488397168
grub-probe: info: opening the device `/dev/sdd'
grub-probe: info: the size of hd3 is 488397168
grub-probe: info: the size of hd3 is 488397168
grub-probe: info: opening the device `/dev/sdd1'
grub-probe: info: opening the device `/dev/sdd1'
grub-probe: info: opening the device `/dev/sdd1'
grub-probe: info: the size of hd3 is 488397168
grub-probe: info: opening the device `/dev/sdd2'
grub-probe: info: the size of hd3 is 488397168
grub-probe: info: opening the device `/dev/sdd3'
grub-probe: info: opening the device `/dev/sdd3'
grub-probe: info: opening the device `/dev/sdd3'
grub-probe: info: opening the device `/dev/sdd3'
grub-probe: info: opening the device `/dev/sdd3'
Segmentation fault
whg:~#
whg:~# strace grub-probe -v -d /dev/md0
[...]
write(2, "grub-probe: info: "..., 18grub-probe: info: ) = 18
write(2, "opening the device `/dev/sdd1'"..., 30opening the device `/dev/sdd1') = 30
write(2, "\n"..., 1
) = 1
open("/dev/sdd1", O_RDONLY|O_SYNC) = 3
ioctl(3, BLKFLSBUF, 0) = 0
lseek(3, 512, SEEK_SET) = 512
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\0"..., 4096) = 4096
close(3) = 0
open("/dev/sdd", O_RDONLY) = 3
fstat(3, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 48), ...}) = 0
ioctl(3, BLKGETSIZE64, 0x7fff9ad88058) = 0
close(3) = 0
write(2, "grub-probe: info: "..., 18grub-probe: info: ) = 18
write(2, "the size of hd3 is 488397168"..., 28the size of hd3 is 488397168) = 28
write(2, "\n"..., 1
) = 1
open("/dev/sdd1", O_RDONLY) = 3
ioctl(3, 0x301, 0x7fff9ad87fc0) = 0
close(3) = 0
open("/dev/sdd2", O_RDONLY) = 3
ioctl(3, 0x301, 0x7fff9ad87fc0) = 0
close(3) = 0
write(2, "grub-probe: info: "..., 18grub-probe: info: ) = 18
write(2, "opening the device `/dev/sdd2'"..., 30opening the device `/dev/sdd2') = 30
write(2, "\n"..., 1
) = 1
open("/dev/sdd2", O_RDONLY|O_SYNC) = 3
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\0"..., 4096) = 4096
close(3) = 0
open("/dev/sdd", O_RDONLY) = 3
fstat(3, {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 48), ...}) = 0
ioctl(3, BLKGETSIZE64, 0x7fff9ad88058) = 0
close(3) = 0
write(2, "grub-probe: info: "..., 18grub-probe: info: ) = 18
write(2, "the size of hd3 is 488397168"..., 28the size of hd3 is 488397168) = 28
write(2, "\n"..., 1
) = 1
open("/dev/sdd1", O_RDONLY) = 3
ioctl(3, 0x301, 0x7fff9ad87fc0) = 0
close(3) = 0
open("/dev/sdd2", O_RDONLY) = 3
ioctl(3, 0x301, 0x7fff9ad87fc0) = 0
close(3) = 0
open("/dev/sdd3", O_RDONLY) = 3
ioctl(3, 0x301, 0x7fff9ad87fc0) = 0
close(3) = 0
write(2, "grub-probe: info: "..., 18grub-probe: info: ) = 18
write(2, "opening the device `/dev/sdd3'"..., 30opening the device `/dev/sdd3') = 30
write(2, "\n"..., 1
) = 1
open("/dev/sdd3", O_RDONLY|O_SYNC) = 3
ioctl(3, BLKFLSBUF, 0) = 0
lseek(3, 18446744073709548544, SEEK_SET) = -1 EINVAL (Invalid argument)
close(3) = 0
open("/dev/sdd1", O_RDONLY) = 3
ioctl(3, 0x301, 0x7fff9ad87fc0) = 0
close(3) = 0
open("/dev/sdd2", O_RDONLY) = 3
ioctl(3, 0x301, 0x7fff9ad87fc0) = 0
close(3) = 0
open("/dev/sdd3", O_RDONLY) = 3
ioctl(3, 0x301, 0x7fff9ad87fc0) = 0
close(3) = 0
write(2, "grub-probe: info: "..., 18grub-probe: info: ) = 18
write(2, "opening the device `/dev/sdd3'"..., 30opening the device `/dev/sdd3') = 30
write(2, "\n"..., 1
) = 1
open("/dev/sdd3", O_RDONLY|O_SYNC) = 3
ioctl(3, BLKFLSBUF, 0) = 0
lseek(3, 0, SEEK_SET) = 0
read(3, "d\"\nstripe_count = 1\t# linear\n\nstr"..., 512) = 512
close(3) = 0
open("/dev/sdd1", O_RDONLY) = 3
ioctl(3, 0x301, 0x7fff9ad87fc0) = 0
close(3) = 0
open("/dev/sdd2", O_RDONLY) = 3
ioctl(3, 0x301, 0x7fff9ad87fc0) = 0
close(3) = 0
open("/dev/sdd3", O_RDONLY) = 3
ioctl(3, 0x301, 0x7fff9ad87fc0) = 0
close(3) = 0
write(2, "grub-probe: info: "..., 18grub-probe: info: ) = 18
write(2, "opening the device `/dev/sdd3'"..., 30opening the device `/dev/sdd3') = 30
write(2, "\n"..., 1
) = 1
open("/dev/sdd3", O_RDONLY|O_SYNC) = 3
ioctl(3, BLKFLSBUF, 0) = 0
lseek(3, 18446744073709548544, SEEK_SET) = -1 EINVAL (Invalid argument)
close(3) = 0
open("/dev/sdd1", O_RDONLY) = 3
ioctl(3, 0x301, 0x7fff9ad87fc0) = 0
close(3) = 0
open("/dev/sdd2", O_RDONLY) = 3
ioctl(3, 0x301, 0x7fff9ad87fc0) = 0
close(3) = 0
open("/dev/sdd3", O_RDONLY) = 3
ioctl(3, 0x301, 0x7fff9ad87fc0) = 0
close(3) = 0
write(2, "grub-probe: info: "..., 18grub-probe: info: ) = 18
write(2, "opening the device `/dev/sdd3'"..., 30opening the device `/dev/sdd3') = 30
write(2, "\n"..., 1
) = 1
open("/dev/sdd3", O_RDONLY|O_SYNC) = 3
ioctl(3, BLKFLSBUF, 0) = 0
lseek(3, 512, SEEK_SET) = 512
read(3, "\", 45056\n]\n}\n}\n\nbackup {\nid = \"AM"..., 512) = 512
close(3) = 0
open("/dev/sdd1", O_RDONLY) = 3
ioctl(3, 0x301, 0x7fff9ad87fc0) = 0
close(3) = 0
open("/dev/sdd2", O_RDONLY) = 3
ioctl(3, 0x301, 0x7fff9ad87fc0) = 0
close(3) = 0
open("/dev/sdd3", O_RDONLY) = 3
ioctl(3, 0x301, 0x7fff9ad87fc0) = 0
close(3) = 0
write(2, "grub-probe: info: "..., 18grub-probe: info: ) = 18
write(2, "opening the device `/dev/sdd3'"..., 30opening the device `/dev/sdd3') = 30
write(2, "\n"..., 1
) = 1
open("/dev/sdd3", O_RDONLY|O_SYNC) = 3
ioctl(3, BLKFLSBUF, 0) = 0
lseek(3, 1024, SEEK_SET) = 1024
read(3, "version 2.02.35 (2008-04-15): Sat"..., 4096) = 4096
close(3) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
whg:~#
-- Package-specific info:
*********************** BEGIN /boot/grub/device.map
(hd0) /dev/sda
(hd1) /dev/sdb
(hd2) /dev/sdc
(hd3) /dev/sdd
*********************** END /boot/grub/device.map
*********************** BEGIN /proc/mounts
/dev/md0 / ext3 rw,errors=remount-ro,data=ordered 0 0
/dev/mapper/vg-backup /backup ext3 rw,errors=continue,acl,data=ordered 0 0
/dev/mapper/vg-tmp /tmp ext3 rw,errors=continue,data=ordered 0 0
/dev/mapper/vg-home /home ext3 rw,errors=continue,acl,data=ordered 0 0
/dev/mapper/vg-srv /srv ext3 rw,errors=continue,data=ordered 0 0
*********************** END /proc/mounts
*********************** BEGIN /boot/grub/menu.lst
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-legacy-doc/.
## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not change this entry to 'saved' or your
# array will desync and will not let you boot your system.
default 0
## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 5
# Pretty colours
color cyan/blue white/blue
### PASSWORD LINE REMOVED ###
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
### PASSWORD LINE REMOVED ###
### PASSWORD LINE REMOVED ###
### PASSWORD LINE REMOVED ###
#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#
#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST
### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below
## DO NOT UNCOMMENT THEM, Just edit them to your needs
## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=/dev/md0 ro iommu=noaperture
## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,0)
## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true
## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false
## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet
## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false
## Xen hypervisor options to use with the default Xen boot option
# xenhopt=
## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0
## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(single-user) single
# altoptions=(single-user mode) single
## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all
## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true
## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false
## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false
## ## End Default Options ##
title Debian GNU/Linux, kernel 2.6.26-1-amd64
root (hd0,0)
kernel /boot/vmlinuz-2.6.26-1-amd64 root=/dev/md0 ro iommu=noaperture
initrd /boot/initrd.img-2.6.26-1-amd64
title Debian GNU/Linux, kernel 2.6.26-1-amd64 (single-user mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.26-1-amd64 root=/dev/md0 ro iommu=noaperture single
initrd /boot/initrd.img-2.6.26-1-amd64
title Debian GNU/Linux, kernel 2.6.24-1-amd64
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-1-amd64 root=/dev/md0 ro iommu=noaperture
initrd /boot/initrd.img-2.6.24-1-amd64
title Debian GNU/Linux, kernel 2.6.24-1-amd64 (single-user mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-1-amd64 root=/dev/md0 ro iommu=noaperture single
initrd /boot/initrd.img-2.6.24-1-amd64
### END DEBIAN AUTOMAGIC KERNELS LIST
*********************** END /boot/grub/menu.lst
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.26-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages grub depends on:
ii grub-common 1.96+20080724-10 GRand Unified Bootloader, version
grub recommends no packages.
Versions of packages grub suggests:
pn grub-legacy-doc <none> (no description available)
ii mdadm 2.6.7-3.1 tool to administer Linux MD arrays
pn multiboot-doc <none> (no description available)
-- no debconf information
More information about the Pkg-grub-devel
mailing list