With the 1MB kernel log buffer still configured, I edited drivers/ide
/ide-disk.c, adding some debug code that would do a stack trace when one
of the 8 sectors listed above was requested:

/* required for call-tracing */
#include <linux/sched.h>

....

static ide_startstop_t __ide_do_rw_disk(
...
        if (drive->select.b.lba) {
                if (lba48) {
...
                } else {
/* report when suspect sector numbers are addressed */
 unsigned int bad_index;
 if ( strcmp(drive->name,"hde") == 0) { /* is is one of the affected drives? */
  sector_t bad_address[8]; /* make it easy to compare the known sector 
addresses */
  bad_address[0] = 135202804ULL;
  bad_address[1] = 135202808ULL;
  bad_address[2] = 135202972ULL;
  bad_address[3] = 135202976ULL;
  bad_address[4] = 135203028ULL;
  bad_address[5] = 135203032ULL;
  bad_address[6] = 135203036ULL;
  bad_address[7] = 135203040ULL;
  /* simple loop to compare current sector request with known bad sector 
addresses */
  for (bad_index = 0; bad_index < 8; bad_index++) {
   if (block == bad_address[bad_index]) { /* force a stack-trace */
    printk("IDE: %s attempting to read sector address %lld\n",drive->name, 
bad_address[bad_index]);
    printk("Trace: Trying to force a stack trace\n");
    dump_stack();
    break;
   }
  }
 }
/* end of call-trace */
...

After starting the debugging kernel, the log typically shows:

IDE: hde attempting to read sector address 135203032
Trace: Trying to force a stack trace
<f883df91> ide_do_rw_disk+0x681/0x6b0 [ide_disk]  <c02525b1> 
ide_do_request+0x6a1/0x8a0
<c011b22d> find_busiest_group+0xcd/0x2f0  <c012bb70> lock_timer_base+0x20/0x50
<c0252abe> ide_intr+0x1de/0x1f0  <c012b819> do_timer+0x39/0x360
<c010f142> mark_offset_pmtmr+0x22/0xee0  <c0149323> handle_IRQ_event+0x33/0x60
<c01493ed> __do_IRQ+0x9d/0x110  <c0105c89> do_IRQ+0x19/0x30
<c010408a> common_interrupt+0x1a/0x20  <c0102080> default_idle+0x0/0x60
<c01020aa> default_idle+0x2a/0x60  <c0102122> cpu_idle+0x42/0xb0
<c03f07a1> start_kernel+0x321/0x3a0  <c03f0210> unknown_bootoption+0x0/0x270
hde: task_in_intr: status=0x59 { DriveReady SeekComplete DataRequest Error }
hde: task_in_intr: error=0x04 { DriveStatusError }
ide: failed opcode was: unknown
end_request: I/O error, dev hde, sector 135203032

-- 
Disk Read Errors during boot-time probe of physical softRAID drives
https://launchpad.net/bugs/77734

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to