Bug#495949: grub-common: grub-probe segfaults

Jean-Luc Coulon (f5ibh) jean-luc.coulon at wanadoo.fr
Thu Aug 21 16:40:15 UTC 2008


Le 21.08.2008 17:52:46, Felix Zielcke a écrit :
>
>Am Donnerstag, den 21.08.2008, 17:35 +0200 schrieb Jean-Luc Coulon
>(f5ibh):
>> As I told, I've nothing removed:
>> 
>Ok just though you misunderstood me, well I even hoped that.
>Do you have maybe other mdraid super blocks lying around on other
>partitions
>`mdadm --zero-superblock /dev/sdxy' would get rid of them.

All the raid disks I have are used, active and clean.

The disk which is out of the raid doesnt have a syperblock

[jean-luc at tangerine] % sudo mdadm -E /dev/sda1
mdadm: No md superblock detected on /dev/sda1.

>GRUB and grub-probe use the superblock directly they find on the disk.
>Even grub-probe doestn't use at all the informations from the 
> assembled
>RAIDs it could get from kernel (for example /proc/mdstat)
>
>If this doestn't solve your problem then please do a debug compile
>with:
>apt-get build-dep grub2
>apt-get source grub2
>DEB_BUILD_OPTIONS=nostrip,noopt,debug dpkg-buildpackage -b

>You may need a `deb-src' line in /etc/apt/sources.list for this.
>It's just the same as the `deb' one, just with `-src'

Ok, done.

>
>grub-probe is in grub-common
>To get the core file you need to do `ulimit -c unlimited' first.
>
>I don't know where the core file then be placed but maybe it just
>segfaults ifyou just run `grub-probe /'
>Then you should have a `core' file in your current directory.
>Else do `find / -name "*core*"'
>
>Would be very good if you would forward this to grub-devel at gnu.org 
> (but
>you need to subscribe first) and the /usr/sbin/grub-probe else the
>corefile is useless.


Please find attached the core and the backtrace of a gdb session.

Regards

Jean-Luc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: core.bz2
Type: application/x-bzip
Size: 31305 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20080821/5cbed06b/attachment-0001.bin 
-------------- next part --------------
Program received signal SIGSEGV, Segmentation fault.
0x0000000000406ac7 in grub_strlen (
    s=0xffffffff00000003 <Address 0xffffffff00000003 out of bounds>)
    at /usr/local/src/tmp/grub2/grub2-1.96+20080724/kern/misc.c:531
531	  while (*p)
(gdb) bt
#0  0x0000000000406ac7 in grub_strlen (
    s=0xffffffff00000003 <Address 0xffffffff00000003 out of bounds>)
    at /usr/local/src/tmp/grub2/grub2-1.96+20080724/kern/misc.c:531
#1  0x00000000004069ad in grub_strdup (
    s=0xffffffff00000003 <Address 0xffffffff00000003 out of bounds>)
    at /usr/local/src/tmp/grub2/grub2-1.96+20080724/kern/misc.c:487
#2  0x0000000000404f5e in grub_disk_open (
    name=0xffffffff00000003 <Address 0xffffffff00000003 out of bounds>)
    at /usr/local/src/tmp/grub2/grub2-1.96+20080724/kern/disk.c:230
#3  0x0000000000423992 in grub_raid_scan_device (
    name=0xffffffff00000003 <Address 0xffffffff00000003 out of bounds>)
    at /usr/local/src/tmp/grub2/grub2-1.96+20080724/disk/raid.c:363
#4  0x00000000004049e6 in iterate_disk (
    disk_name=0xffffffff00000003 <Address 0xffffffff00000003 out of bounds>)
    at /usr/local/src/tmp/grub2/grub2-1.96+20080724/kern/device.c:93
#5  0x0000000000421ddf in grub_lvm_iterate (hook=0x7fff40743608)
    at /usr/local/src/tmp/grub2/grub2-1.96+20080724/disk/lvm.c:53
#6  0x0000000000404e9e in grub_disk_dev_iterate (hook=0x7fff40743608)
    at /usr/local/src/tmp/grub2/grub2-1.96+20080724/kern/disk.c:205
#7  0x0000000000404900 in grub_device_iterate (
    hook=0x42394d <grub_raid_scan_device>)
    at /usr/local/src/tmp/grub2/grub2-1.96+20080724/kern/device.c:138
#8  0x0000000000423fe4 in grub_mod_init (mod=0x0)
---Type <return> to continue, or q <return> to quit---
    at /usr/local/src/tmp/grub2/grub2-1.96+20080724/disk/raid.c:582
#9  0x0000000000423fcc in grub_raid_init ()
    at /usr/local/src/tmp/grub2/grub2-1.96+20080724/disk/raid.c:580
#10 0x0000000000424096 in grub_init_all () at grub_probe_init.c:46
#11 0x0000000000401d80 in main (argc=2, argv=0x7fff407437b8)
    at /usr/local/src/tmp/grub2/grub2-1.96+20080724/util/grub-probe.c:366
(gdb) 
(gdb) quit


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20080821/5cbed06b/attachment-0001.pgp 


More information about the Pkg-grub-devel mailing list