linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] ide dma_timer_expiry, then hard lockup
@ 2007-06-18 17:57 Linas Vepstas
  2007-06-18 18:11 ` Stuart_Hayes
                   ` (2 more replies)
  0 siblings, 3 replies; 28+ messages in thread
From: Linas Vepstas @ 2007-06-18 17:57 UTC (permalink / raw)
  To: linux-ide, linux-kernel



I've got a hard lockup in the ide subsystem, probably
due to some irq spew or something like that.

I've just bought a brand new Maxtor 320GB disk driver 
for the insane price of $70 US to replace another 
failing drive. It works well under light load;
I was able to copy about 60GB to it. However, 
under heavy load, such as reconstruction of an MD 
RAID-1 array, it'll lock up the kernel.  Which means
that my system won't boot :-(

I'm running 2.6.21.1, although the problem seems to occur 
in 2.6.19 and 2.6.18 too; its been there a while; I vageuly
remember similar problems in 2.6.5 or 2.6.10.

I get an 
"hdc: dma_timer_expiry: dma status == 0x21" 

and 10 seconds later,

"hdc: DMA Timeout error"

at which point the system is locked up hard.
Magic sysreq does not work at all. The hard drive activity light 
stays fully lit.  Inserting printk's into the kernel, I find the
hang to be in a surprising place: 


ide_dma_timeout_retry() in ide-io.c 
  prints the "hdc: DMA Timeout error" then calls
  HWIF(drive)->ide_dma_end(drive);
    which returns, and then calls 
  hwif->INB(IDE_STATUS_REG) which is needed as an argument to ide_error()

But this hangs! -- The INB never returns.
Now:  hwif->INB = ide_inb; in ide-iops.c

So putting a printk into ide_inb() shows that
the printk before the readb() is printed, and the
printk after the readb is not (!!)

I find this rather surpriseing, as I can't imagine how the
readb can fail. My current vague theory is that doing this
readb makes the hard drive go really nuts, and it probably
ties some interrupt line high, and so the linux kernel 
gets stuck trying to handle the irq flood. I just don't know
enough about the i386 architecture, or about interrupts, to 
prove or disprove this.

Background: this is on an old dual-cpu intel (coppermine??)
box; the controller is an HighPoint HPT366 on the motherboard.
This is an old parallel ATA (80-pin cable) setup.

I can get the system to boot by sneaking in an 
"hdparm -d0 /dev/hdc" early in the boot process, to turn off 
the use of DMA, but it seems that PIO is so slow, that it takes 
forever to get NFS started.

I can get it to boot, by unplugging /dev/hdc. Unfortunately,
given the RAID mirroring, the only usable copy of /, /usr is on
/dev/hda and te only usable copy of /home is on /dev/hdc, so 
I'm screwed ... 

Any suggestions, experiments, experimental patches, data gathering,
etc. is welcome. The sooner, the better... 

--linas




^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2007-06-29 18:51 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-18 17:57 [BUG] ide dma_timer_expiry, then hard lockup Linas Vepstas
2007-06-18 18:11 ` Stuart_Hayes
2007-06-19 14:07   ` Sergei Shtylyov
2007-06-19 15:05     ` Linas Vepstas
2007-06-19 16:10       ` Sergei Shtylyov
2007-06-19 16:48         ` Linas Vepstas
2007-06-19 18:43           ` Bartlomiej Zolnierkiewicz
2007-06-19 20:07             ` Sergei Shtylyov
2007-06-20 16:28               ` Linas Vepstas
2007-06-20 17:01                 ` Alan Cox
2007-06-21 17:58                   ` Sergei Shtylyov
2007-06-21 21:41                     ` Alan Cox
2007-06-21 19:47                   ` Linas Vepstas
2007-06-21 22:04                     ` Alan Cox
2007-06-18 20:27 ` Alan Cox
2007-06-18 20:46   ` Linas Vepstas
2007-06-18 21:04     ` Alan Cox
2007-06-18 21:22       ` Linas Vepstas
2007-06-19 14:56         ` bug in libata [was " Linas Vepstas
2007-06-19 14:10       ` Sergei Shtylyov
2007-06-19 14:19         ` Alan Cox
2007-06-19 14:24           ` Sergei Shtylyov
2007-06-19 15:38             ` Mark Lord
2007-06-19 15:51               ` Sergei Shtylyov
2007-06-19 16:17               ` Alan Cox
2007-06-19 16:32                 ` Sergei Shtylyov
2007-06-22 15:39 ` Sergei Shtylyov
2007-06-29 18:52   ` Sergei Shtylyov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).