Bug#550682: grub-common: grub-probe segfaults scanning lvm devices
Matthew Gabeler-Lee
cheetah at fastcat.org
Mon Oct 12 07:35:48 UTC 2009
Package: grub-common
Version: 1.97~beta4-1
Severity: important
grub-setup is segfaulting in its lvm scanning code. This made my system
unbootable. Since even grub-legacy uses grub-probe from grub-common,
getting my system to boot again was quite the ordeal :(
A stack trace of the crash, from a debug-enabled build:
cheetah at cheetah:/usr/src/debian/grub2-1.97~beta4/build/grub-pc$ sudo gdb grub-probe
GNU gdb (GDB) 6.8.50.20090628-cvs-debian
Copyright (C) 2009 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://www.gnu.org/software/gdb/bugs/>...
(gdb) run --target=device /
Starting program: /usr/src/debian/grub2-1.97~beta4/build/grub-pc/grub-probe --target=device /
Program received signal SIGSEGV, Segmentation fault.
0x000000000040667c in grub_memmove (dest=0x775530, src=0x745f30, n=1519428325448037217)
at /usr/src/debian/grub2-1.97~beta4/kern/misc.c:48
48 *--d = *--s;
(gdb) bt
#0 0x000000000040667c in grub_memmove (dest=0x775530, src=0x745f30, n=1519428325448037217)
at /usr/src/debian/grub2-1.97~beta4/kern/misc.c:48
#1 0x0000000000428a6b in grub_lvm_scan_device (name=0x647628 "hd3,3")
at /usr/src/debian/grub2-1.97~beta4/disk/lvm.c:302
#2 0x0000000000405019 in iterate_disk (disk_name=0x6442e0 "hd3")
at /usr/src/debian/grub2-1.97~beta4/kern/device.c:118
#3 0x0000000000402061 in grub_util_biosdisk_iterate (hook=0x7fffffffe380)
at /usr/src/debian/grub2-1.97~beta4/util/hostdisk.c:156
#4 0x0000000000405623 in grub_disk_dev_iterate (hook=0x7fffffffe380)
at /usr/src/debian/grub2-1.97~beta4/kern/disk.c:212
#5 0x00000000004050d2 in grub_device_iterate (hook=0x42876f <grub_lvm_scan_device>)
at /usr/src/debian/grub2-1.97~beta4/kern/device.c:157
#6 0x0000000000429574 in grub_mod_init (mod=0x0) at /usr/src/debian/grub2-1.97~beta4/disk/lvm.c:603
#7 0x000000000042955c in grub_lvm_init () at /usr/src/debian/grub2-1.97~beta4/disk/lvm.c:601
#8 0x0000000000429649 in grub_init_all () at grub_probe_init.c:53
#9 0x0000000000401ee2 in main (argc=3, argv=0x7fffffffe528)
at /usr/src/debian/grub2-1.97~beta4/util/grub-probe.c:413
Note: this same stack trace (more or less) also happens in grub-setup, so
one can't even recover a system's bootability by doing the grub-setup bit
manually!
In order to get the system to boot at all, I had to replace grub-probe with
a shell script with hard coded ouptuts for all the queries grub-install and
update-grub make. Not Fun.
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.31-1 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash
Versions of packages grub-common depends on:
ii base-files 5.0.0 Debian base system miscellaneous f
ii libc6 2.9-25 GNU C Library: Shared libraries
ii libfreetype6 2.3.9-5 FreeType 2 font engine, shared lib
ii zlib1g 1:1.2.3.3.dfsg-15 compression library - runtime
Versions of packages grub-common recommends:
pn os-prober <none> (no description available)
Versions of packages grub-common suggests:
pn grub-emu <none> (no description available)
pn multiboot-doc <none> (no description available)
-- no debconf information
More information about the Pkg-grub-devel
mailing list