Bug#598257: grub-pc: segfaults on md raid1 device

Clint Adams schizo at debian.org
Mon Sep 27 20:42:54 UTC 2010


Package: grub-pc
Version: 1.98+20100804-5

/dev/md0 is a raid1 md comprising 5 physical devices, mounted on /boot

Core was generated by `/usr/sbin/grub-probe --device-map=/boot/grub/device.map --target=device /boot/g'.
Program terminated with signal 11, Segmentation fault.
#0  0x0807a05e in insert_array (disk=0x86e1508, new_array=0xbf9f8d98, 
    start_sector=2048, scanner_name=0x808007c "mdraid")
    at ../../disk/raid.c:505
505             if (array->device[new_array->index] != NULL)
(gdb) bt
#0  0x0807a05e in insert_array (disk=0x86e1508, new_array=0xbf9f8d98, 
    start_sector=2048, scanner_name=0x808007c "mdraid")
    at ../../disk/raid.c:505
#1  0x0807a4f1 in hook (name=0x86e0e28 "hd1,gpt2") at ../../disk/raid.c:666
#2  0x0804e36e in iterate_disk (disk_name=0x86db9f8 "hd1")
    at ../../kern/device.c:123
#3  0x0804a5bf in grub_util_biosdisk_iterate (hook=0xbf9f9008)
    at ../../kern/emu/hostdisk.c:206
#4  0x0804e8c7 in grub_disk_dev_iterate (hook=0xbf9f9008)
    at ../../kern/disk.c:212
#5  0x0804e415 in grub_device_iterate (hook=0x807a42d <hook>)
    at ../../kern/device.c:168
#6  0x0807a54d in grub_raid_register (raid=0x8081d24) at ../../disk/raid.c:683
#7  0x0807b557 in grub_mod_init (mod=0x0) at ../../disk/mdraid_linux.c:418
#8  0x0807b543 in grub_mdraid_init () at ../../disk/mdraid_linux.c:416
#9  0x0807cae4 in grub_init_all () at grub_probe_init.c:58
#10 0x0804a438 in main (argc=4, argv=0xbf9f9184) at ../../util/grub-probe.c:443

(gdb) bt full
#0  0x0807a05e in insert_array (disk=0x86e1508, new_array=0xbf9f8d98, 
    start_sector=2048, scanner_name=0x808007c "mdraid")
    at ../../disk/raid.c:505
        array = 0x86e0f88
        p = 0x86e0f88
#1  0x0807a4f1 in hook (name=0x86e0e28 "hd1,gpt2") at ../../disk/raid.c:666
        disk = 0x86e1508
        array = {number = 0, level = 1, layout = 0, total_devs = 2, 
          chunk_size = 0, disk_size = 39060308, index = 65535, uuid_len = 16, 
          uuid = 0x86e0f48 "", name = 0x86e09d0 "newmurphy:1", nr_devs = 0, 
          device = {0x0 <repeats 32 times>}, start_sector = {0, 0, 3076642070, 
            11145440133120, 578577998163334422, 550368259179273727, 
            18369619934385850831, 9849090910082695167, 34359738368, 0, 
            578580292894195729, 13217836159451743136, 3076642070, 
            13217836159451743136, 3077522336, 13214137166250086104, 
            577813648603469078, 5216668105570226176, 577834303239458552, 
            4436396296, 2522984048754705, 13217836159451743136, 3077522336, 
            13214137166250086168, 206158430233, 13217836159451743136, 
            3077522336, 13214137166250086200, 577835389866184536, 
            5216668105570226176, 577834303239458648, 13212233530591807952}, 
          next = 0x0}
        start_sector = 2048
#2  0x0804e36e in iterate_disk (disk_name=0x86db9f8 "hd1")
    at ../../kern/device.c:123
        next = 0x86e0950
        p = 0x86e0998
        ret = 0
        dev = 0x86dfb20
        hook = 0x807a42d <hook>
        ents = 0x86e09d0
#3  0x0804a5bf in grub_util_biosdisk_iterate (hook=0xbf9f9008)
    at ../../kern/emu/hostdisk.c:206
        i = 1
#4  0x0804e8c7 in grub_disk_dev_iterate (hook=0xbf9f9008)
    at ../../kern/disk.c:212
        p = 0x8081540
#5  0x0804e415 in grub_device_iterate (hook=0x807a42d <hook>)
    at ../../kern/device.c:168
        ents = 0x1
#6  0x0807a54d in grub_raid_register (raid=0x8081d24) at ../../disk/raid.c:683
No locals.
#7  0x0807b557 in grub_mod_init (mod=0x0) at ../../disk/mdraid_linux.c:418
No locals.
#8  0x0807b543 in grub_mdraid_init () at ../../disk/mdraid_linux.c:416
No locals.
#9  0x0807cae4 in grub_init_all () at grub_probe_init.c:58
No locals.
#10 0x0804a438 in main (argc=4, argv=0xbf9f9184) at ../../util/grub-probe.c:443
        dev_map = 0x86da858 "/boot/grub/device.map"
        argument = 0xbf9f99cc "/boot/grub"

-------------- next part --------------
disk/raid.c:658: Scanning for RAID devices on disk hd0
kern/disk.c:245: Opening `hd0'...
kern/emu/hostdisk.c:592: opening the device `/dev/sda' in open_device()
kern/emu/hostdisk.c:582: reusing open device `/dev/sda'
kern/emu/hostdisk.c:582: reusing open device `/dev/sda'
kern/emu/hostdisk.c:582: reusing open device `/dev/sda'
kern/disk.c:334: Closing `hd0'.
kern/disk.c:245: Opening `hd0'...
partmap/gpt.c:80: Read a valid GPT header
partmap/gpt.c:103: GPT entry 0: start=34, length=1000001
kern/emu/hostdisk.c:592: opening the device `/dev/sda' in open_device()
kern/emu/hostdisk.c:592: opening the device `/dev/sda1' in open_device()
partmap/apple.c:121: bad magic (found 0x0; wanted 0x4552
partmap/gpt.c:103: GPT entry 1: start=1000035, length=39062501
kern/emu/hostdisk.c:592: opening the device `/dev/sda' in open_device()
kern/emu/hostdisk.c:592: opening the device `/dev/sda2' in open_device()
partmap/apple.c:121: bad magic (found 0x0; wanted 0x4552
partmap/gpt.c:103: GPT entry 2: start=40062536, length=3866966599
kern/emu/hostdisk.c:592: opening the device `/dev/sda3' in open_device()
partmap/apple.c:121: bad magic (found 0x0; wanted 0x4552
kern/emu/hostdisk.c:592: opening the device `/dev/sda' in open_device()
kern/emu/hostdisk.c:582: reusing open device `/dev/sda'
partmap/apple.c:121: bad magic (found 0x0; wanted 0x4552
partmap/msdos.c:91: partition 0: flag 0x0, type 0xee, start 0x1, len 0xe8e088af
kern/disk.c:334: Closing `hd0'.
disk/raid.c:658: Scanning for RAID devices on disk hd0,gpt3
kern/disk.c:245: Opening `hd0,gpt3'...
partmap/gpt.c:80: Read a valid GPT header
partmap/gpt.c:103: GPT entry 0: start=34, length=1000001
partmap/gpt.c:103: GPT entry 1: start=1000035, length=39062501
partmap/gpt.c:103: GPT entry 2: start=40062536, length=3866966599
kern/emu/hostdisk.c:592: opening the device `/dev/sda3' in open_device()
kern/emu/hostdisk.c:582: reusing open device `/dev/sda3'
kern/emu/hostdisk.c:582: reusing open device `/dev/sda3'
disk/raid.c:600: Found array md/2 (mdraid)
disk/raid.c:658: Scanning for RAID devices on disk hd0,gpt2
kern/disk.c:245: Opening `hd0,gpt2'...
partmap/gpt.c:80: Read a valid GPT header
partmap/gpt.c:103: GPT entry 0: start=34, length=1000001
partmap/gpt.c:103: GPT entry 1: start=1000035, length=39062501
kern/emu/hostdisk.c:592: opening the device `/dev/sda2' in open_device()
kern/emu/hostdisk.c:582: reusing open device `/dev/sda2'
kern/emu/hostdisk.c:582: reusing open device `/dev/sda2'
kern/emu/hostdisk.c:582: reusing open device `/dev/sda2'
disk/raid.c:600: Found array md/1 (mdraid)
disk/raid.c:658: Scanning for RAID devices on disk hd0,gpt1
kern/disk.c:245: Opening `hd0,gpt1'...
partmap/gpt.c:80: Read a valid GPT header
partmap/gpt.c:103: GPT entry 0: start=34, length=1000001
kern/emu/hostdisk.c:592: opening the device `/dev/sda1' in open_device()
kern/emu/hostdisk.c:582: reusing open device `/dev/sda1'
kern/emu/hostdisk.c:582: reusing open device `/dev/sda1'
kern/emu/hostdisk.c:582: reusing open device `/dev/sda1'
disk/raid.c:600: Found array md/0 (mdraid)
disk/raid.c:658: Scanning for RAID devices on disk hd1
kern/disk.c:245: Opening `hd1'...
kern/emu/hostdisk.c:592: opening the device `/dev/sdb' in open_device()
kern/emu/hostdisk.c:582: reusing open device `/dev/sdb'
kern/emu/hostdisk.c:582: reusing open device `/dev/sdb'
kern/emu/hostdisk.c:582: reusing open device `/dev/sdb'
kern/disk.c:334: Closing `hd1'.
kern/disk.c:245: Opening `hd1'...
partmap/gpt.c:80: Read a valid GPT header
partmap/gpt.c:103: GPT entry 0: start=34, length=1000001
kern/emu/hostdisk.c:592: opening the device `/dev/sdb' in open_device()
kern/emu/hostdisk.c:592: opening the device `/dev/sdb1' in open_device()
partmap/apple.c:121: bad magic (found 0x0; wanted 0x4552
partmap/gpt.c:103: GPT entry 1: start=1000035, length=39062501
kern/emu/hostdisk.c:592: opening the device `/dev/sdb' in open_device()
kern/emu/hostdisk.c:592: opening the device `/dev/sdb2' in open_device()
partmap/apple.c:121: bad magic (found 0x1111; wanted 0x4552
partmap/gpt.c:103: GPT entry 2: start=40062536, length=3866966599
kern/emu/hostdisk.c:59


More information about the Pkg-grub-devel mailing list