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

Jean-Luc Coulon (f5ibh) jean-luc.coulon at wanadoo.fr
Thu Aug 21 17:12:46 UTC 2008


Le 21.08.2008 19:03:43, Felix Zielcke a écrit :
>
>Am Donnerstag, den 21.08.2008, 18:40 +0200 schrieb Jean-Luc Coulon
>(f5ibh):
>Hi,
>
>> >
>> >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.
>> 
>Thanks very much, but as you can see from my sentence above the core
>file alone is unfortunately not that helpful.
>
>And I have assumed that you didn't know about gdb, else I would have
>told you to use `bt full' that gives a bit more useful output :)

So, attached the bt full output and the grub-probe binary (bzip2, 
warning, it is built for X86_64).

Remark, I subscribe grub-devel list but my message was rejeted :-o


J-L
-------------- next part --------------
Starting program: /usr/sbin/grub-probe /

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 full
#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
	p = 0xffffffff00000003 <Address 0xffffffff00000003 out of bounds>
#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
	len = 0
	p = 0x40 <Address 0x40 out of bounds>
#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
	p = 0x0
	disk = (grub_disk_t) 0x1aa5010
	dev = (grub_disk_dev_t) 0x0
	raw = 0xffffffff00000003 <Address 0xffffffff00000003 out of bounds>
	current_time = 0
#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
	err = 32523
	disk = (grub_disk_t) 0x424120
	sector = 4209580
---Type <return> to continue, or q <return> to quit---
	size = 6474336
	sb = {md_magic = 0, major_version = 0, minor_version = 0, 
  patch_version = 0, gvalid_words = 0, set_uuid0 = 0, ctime = 0, level = 0, 
  size = 0, nr_disks = 0, raid_disks = 0, md_minor = 0, not_persistent = 0, 
  set_uuid1 = 0, set_uuid2 = 0, set_uuid3 = 0, gstate_creserved = {
    0 <repeats 16 times>}, utime = 0, state = 0, active_disks = 0, 
  working_disks = 1321528399, failed_disks = 0, spare_disks = 8, 
  sb_csum = 4345861, events_lo = 0, events_hi = 0, cp_events_lo = 0, 
  cp_events_hi = 0, recovery_cp = 2595, gstate_sreserved = {2485512736, 32767, 
    4328695, 0, 0, 0, 4345856, 0, 0, 0, 0, 8, 2485512784, 32767, 4329825, 0, 
    0, 0, 4345856, 0}, layout = 0, chunk_size = 0, root_pv = 0, 
  root_block = 0, pstate_reserved = {2485513056, 32767, 4219118, 1321528399, 
    2485513072, 8, 4345861, 0, 4345700, 0, 4345513, 2595, 2485512880, 32767, 
    4328695, 0, 0, 0, 4345856, 0, 0, 0, 0, 8, 2485512928, 32767, 4329825, 0, 
    0, 0, 4345856, 0, 2349079008, 32523, 0, 0, 2485513200, 32767, 4219118, 0, 
    0, 0, 4219101, 0, 4350480, 0, 4350542, 0, 2485513056, 143, 4350552, 0, 
    2485517312, 32767, 0, 0, 0, 0, 0, 0}, disks = {{number = 2485514480, 
      major = 32767, minor = 4209580, raid_disk = 0, state = 6503496, 
      reserved = {0, 28169776, 0, 3, 0, 0, 0, 2485513344, 0, 2485514144, 
        32767, 0, 0, 4294967295, 4294967295, 2485514144, 32767, 27939248, 0, 
        27939272, 0, 2485514168, 32767, 2485513200, 32767, 4323819, 0}}, {
      number = 2485514304, major = 32767, minor = 0, raid_disk = 1, 
      state = 2485514176, reserved = {32767, 27938976, 0, 0, 0, 2485514144, 
---Type <return> to continue, or q <return> to quit---
        32767, 2485514256, 32767, 4322817, 0, 131, 32767, 156296385, 0, 
        3775275, 0, 4217580, 0, 4350744, 0, 4217477, 1, 2485514320, 32767, 
        27938976, 0}}, {number = 27939184, major = 0, minor = 6472864, 
      raid_disk = 0, state = 160086528, reserved = {0, 1, 0, 2, 0, 0, 0, 0, 0, 
        0, 0, 60232, 0, 17746, 0, 0, 0, 2485514146, 32767, 0, 0, 0, 0, 8, 0, 
        2485513568, 32767}}, {number = 28169776, major = 0, minor = 0, 
      raid_disk = 0, state = 28173888, reserved = {0, 0, 0, 2, 0, 0, 0, 
        536871167, 1, 2432303616, 2160260752, 2159149685, 8149482, 2394960128, 
        3167784664, 2485514256, 32767, 4325079, 0, 4127274216, 1416921282, 
        2864398772, 1511247189, 2169074258, 1974097403, 2084675651, 
        91603076}}, {number = 1946280323, major = 1284204087, 
      minor = 2080751120, raid_disk = 19, state = 2485514316, reserved = {
        32767, 27938976, 0, 27939184, 0, 6472864, 0, 160086528, 0, 1, 0, 2, 0, 
        0, 0, 0, 0, 0, 0, 9455851, 0, 0, 0, 0, 0, 0, 0}}, {number = 0, 
      major = 0, minor = 0, raid_disk = 0, state = 0, reserved = {0, 0, 
        33751040, 536871167, 1, 2432303616, 2160260752, 2159149685, 8149482, 
        2394960128, 3167784664, 2700812288, 4282154048, 3263693428, 
        2105523794, 4127274216, 1416921282, 2864398772, 1511247189, 
        2169074258, 1974097403, 2084675651, 91603076, 1946280323, 1284204087, 
        2080751120, 33506502}}, {number = 1142852454, major = 268748668, 
      minor = 38061824, raid_disk = 2305163265, state = 1153894492, 
      reserved = {1718616070, 1149878321, 1149855236, 3443700748, 3137696275, 
        2112581632, 332204212, 3270904435, 3934523264, 9300224, 3330016702, 
---Type <return> to continue, or q <return> to quit---
        1711341380, 4035493937, 1149855296, 2295476484, 48415178, 4102613128, 
        138709312, 3498623025, 1711466688, 2707817609, 828800068, 888628946, 
        1711953032, 4150710833, 1418200180, 205818123}}, {number = 2097693755, 
      major = 223644220, minor = 2315707072, raid_disk = 3254651468, 
      state = 1821036808, reserved = {1955224076, 1879096075, 3677471630, 
        3439460792, 2351591955, 1208389315, 3105775740, 3683516672, 
        4281464369, 530969596, 1109852001, 2105917052, 3942662376, 2106244622, 
        3942660328, 2106899974, 3187683560, 719879577, 1207888640, 541218130, 
        1868908288, 1632108653, 1142973554, 7041897, 1684104530, 1917132800, 
        7499634}}, {number = 3019899323, major = 2886782222, 
      minor = 4101308476, raid_disk = 1321528399, state = 0, reserved = {8, 
        4345861, 0, 4277993473, 4135999, 463339520, 2595, 2485514144, 32767, 
        4328695, 0, 0, 0, 4345856, 0, 0, 0, 2603288912, 8, 2485514192, 32767, 
        4329825, 0, 0, 0, 4345856, 1321528399}}, {number = 2349079008, 
      major = 8, minor = 4345861, raid_disk = 0, state = 2485514464, 
      reserved = {32767, 4219118, 2595, 2485514256, 32767, 4328695, 0, 0, 0, 
        4345856, 0, 0, 0, 28169776, 8, 2485514304, 32767, 4329825, 0, 0, 0, 
        4345856, 0, 28169760, 0, 0, 0}}, {number = 2485514576, major = 32767, 
      minor = 4219118, raid_disk = 0, state = 1, reserved = {0, 4219101, 0, 
        4345656, 0, 4345513, 0, 28170288, 312, 4345520, 0, 512, 0, 2349079008, 
        32523, 2485514464, 32767, 0, 0, 2485517312, 32767, 0, 0, 0, 0, 
        2346093174, 32523}}, {number = 27939184, major = 0, 
      minor = 4278124339, raid_disk = 4278124286, state = 2485514752, 
---Type <return> to continue, or q <return> to quit---
      reserved = {32767, 28169776, 0, 2485514608, 32767, 3, 0, 2485514576, 
        32767, 2349079008, 32523, 2485514576, 32767, 4199616, 0, 2485517312, 
        32767, 0, 0, 0, 0, 2346093174, 32523, 3, 0, 4209580, 0}}, {
      number = 512, major = 0, minor = 27938976, raid_disk = 0, 
      state = 2485514608, reserved = {32767, 4215294, 0, 4351707, 0, 27938976, 
        0, 2485515456, 32767, 4337196, 0, 0, 0, 27939152, 0, 123584, 0, 0, 0, 
        1883654730, 1429032302, 760038251, 1328696949, 946696749, 1129000243, 
        1261267560, 762003786}}, {number = 2485514960, major = 32767, 
      minor = 64, raid_disk = 0, state = 2485514961, reserved = {32767, 
        2485514752, 32767, 4221876, 0, 2485514960, 32767, 2485514960, 32767, 
        1183840, 0 <repeats 17 times>}}, {number = 0, major = 0, minor = 0, 
      raid_disk = 0, state = 0, reserved = {0 <repeats 27 times>}}, {
      number = 0, major = 0, minor = 0, raid_disk = 0, state = 0, reserved = {
        0 <repeats 27 times>}}, {number = 0, major = 0, minor = 0, 
      raid_disk = 0, state = 0, reserved = {0 <repeats 27 times>}}, {
      number = 0, major = 0, minor = 0, raid_disk = 0, state = 0, reserved = {
        0 <repeats 11 times>, 2485515280, 32767, 2346101400, 0, 27938976, 0, 
        2485515344, 32767, 27939376, 0, 27939184, 0, 3, 0, 0, 0}}, {
      number = 2485517312, major = 32767, minor = 0, raid_disk = 0, 
      state = 2485514752, reserved = {32767, 2346101400, 32523, 3, 0, 
        2349079008, 32523, 2485515456, 32767, 4199616, 0, 2485517312, 32767, 
        0, 0, 0, 0, 2346093174, 32523, 3, 0, 4209580, 0, 27952944, 0, 
        27939152, 0}}, {number = 2485515552, major = 32767, minor = 4213177, 
---Type <return> to continue, or q <return> to quit---
      raid_disk = 0, state = 28169776, reserved = {0, 2485516880, 32767, 
        28173888, 0, 2485516528, 32767, 27938832, 0, 0, 0, 27939184, 0, 
        27939152, 0, 27939376, 0, 0, 131, 2485516608, 32767, 4323251, 0, 131, 
        0, 156296385, 0}}, {number = 3775275, major = 0, minor = 0, 
      raid_disk = 0, state = 60232, reserved = {0, 17746, 0, 2485516911, 
        32767, 27938832, 0, 27939376, 0, 6472864, 0, 160086528, 0, 1, 0, 2, 0, 
        0, 0, 0, 0, 0, 0, 2, 0, 0, 0}}, {number = 536871167, major = 1, 
      minor = 2432303616, raid_disk = 2160260752, state = 2159149685, 
      reserved = {8149482, 2394960128, 3167784664, 2485516512, 32767, 4325079, 
        0, 4127274216, 1416921282, 2864398772, 1511247189, 2169074258, 
        1974097403, 2084675651, 91603076, 1946280323, 1284204087, 2080751120, 
        19, 4228198, 0, 27938832, 0, 27939376, 0, 6472864, 0}}, {
      number = 160086528, major = 0, minor = 1, raid_disk = 0, state = 2, 
      reserved = {0, 0, 0, 0, 0, 0, 0, 9455851, 0 <repeats 14 times>, 
        33751040, 536871167, 1, 2432303616, 2160260752}}, {
      number = 2159149685, major = 8149482, minor = 2394960128, 
      raid_disk = 3167784664, state = 9455851, reserved = {
        0 <repeats 14 times>, 33751040, 536871167, 1, 2432303616, 2160260752, 
        2159149685, 8149482, 2394960128, 3167784664, 2700812288, 4282154048, 
        3263693428, 2105523794}}, {number = 4127274216, major = 1416921282, 
      minor = 2864398772, raid_disk = 1511247189, state = 2169074258, 
      reserved = {1974097403, 2084675651, 91603076, 1946280323, 1284204087, 
        2080751120, 33506502, 1142852454, 268748668, 38061824, 2305163265, 
---Type <return> to continue, or q <return> to quit---
        1153894492, 1718616070, 1149878321, 1149855236, 3443700748, 
        3137696275, 2112581632, 332204212, 3270904435, 3934523264, 9300224, 
        3330016702, 1711341380, 4035493937, 1149855296, 1321528399}}, {
      number = 48415178, major = 8, minor = 4345861, raid_disk = 0, 
      state = 1711466688, reserved = {2707817609, 828800068, 2595, 2485516304, 
        32767, 4328695, 0, 0, 0, 4345856, 0, 0, 0, 1879096075, 8, 2485516352, 
        32767, 4329825, 0, 0, 0, 4345856, 0, 2105917052, 3942662376, 0, 0}}, {
      number = 2485516624, major = 32767, minor = 4219118, raid_disk = 0, 
      state = 541218130, reserved = {1868908288, 4219101, 0, 4345656, 0, 
        4345513, 0, 3019899323, 312, 4345520, 0, 0, 0, 28977, 16777216, 
        4277993473, 4135999, 0, 0, 4278000897, 467533823, 4286513159, 
        4261413757, 4278059007, 459079679, 3378840453, 4261414347}}}, 
  reserved = 0x7fff9425f8c0, this_disk = {number = 27939376, major = 0, 
    minor = 4278124339, raid_disk = 4278124286, state = 3, reserved = {
      4294967295, 131, 4294967295, 0, 0, 4342048, 0, 2485516624, 32767, 
      2349079008, 32523, 2485516624, 32767, 4199616, 0, 2485517312, 32767, 
      2349079008, 32523, 2485516656, 32767, 4199616, 0, 2485517312, 32767, 0, 
      0}}}
	p = (struct grub_raid_array *) 0x1aa5060
	array = (struct grub_raid_array *) 0x0
#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
---Type <return> to continue, or q <return> to quit---
	dev = (grub_device_t) 0x1aa5060
	hook = (int (*)(const char *)) 0x42394d <grub_raid_scan_device>
#5  0x0000000000421ddf in grub_lvm_iterate (hook=0x7fff9425fa58)
    at /usr/local/src/tmp/grub2/grub2-1.96+20080724/disk/lvm.c:53
	lv = (struct grub_lvm_lv *) 0x1aa51b0
	vg = (struct grub_lvm_vg *) 0x1aa84f0
#6  0x0000000000404e9e in grub_disk_dev_iterate (hook=0x7fff9425fa58)
    at /usr/local/src/tmp/grub2/grub2-1.96+20080724/kern/disk.c:205
	p = (grub_disk_dev_t) 0x62cba0
#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
No locals.
#8  0x0000000000423fe4 in grub_mod_init (mod=0x0)
    at /usr/local/src/tmp/grub2/grub2-1.96+20080724/disk/raid.c:582
No locals.
#9  0x0000000000423fcc in grub_raid_init ()
    at /usr/local/src/tmp/grub2/grub2-1.96+20080724/disk/raid.c:580
No locals.
#10 0x0000000000424096 in grub_init_all () at grub_probe_init.c:46
No locals.
#11 0x0000000000401d80 in main (argc=2, argv=0x7fff9425fc08)
    at /usr/local/src/tmp/grub2/grub2-1.96+20080724/util/grub-probe.c:366
---Type <return> to continue, or q <return> to quit---
	dev_map = 0x0
	argument = 0x7fff94261bb5 "/"
(gdb) 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: grub-probe.bz2
Type: application/x-bzip
Size: 176981 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20080821/2b2de562/attachment-0001.bin 
-------------- 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/2b2de562/attachment-0001.pgp 


More information about the Pkg-grub-devel mailing list