Re: Freeze on bad media (bad disk sector, scratched CD)

Rik van Riel (H.H.vanRiel@phys.uu.nl)
Wed, 4 Nov 1998 16:19:01 +0100 (CET)


On Wed, 4 Nov 1998, Trever Adams wrote:

> Just curious! Has anyone been able to get the alt-sysrq debug keys to
> work while this is happening? If so can they post that info as well as

<sysrq>-p is the key combination to use.

Then you can use /boot/System.map to look up which
function the kernel was looping in.

> the symbols for that kernel. I am not the best programmer or kernel
> hacker in the world, but I wouldn't mind giving it a shot. It sounds
> like you have something similar to:
>
> while(!somecommand) /* loop until it reads/writes correctly */
> {
> ...
> }

The Advansys SCSI driver once had a bug like this. Using
the above sysrq trick I managed to find the offending
function. I changed it to a for() loop in the hope that
the higher-up routines would be able to cope with the
error. It turned out they could and now the Advansys
driver has my small hack in it :)

> Then again any fool can probably say the same.

Even better, any fool can perform the hack I did
and try to fix the driver themselves. Succes :-)

Rik -- typing slowly because my kbd is dvorak since sun 19:40...
+-------------------------------------------------------------------+
| Linux memory management tour guide. H.H.vanRiel@phys.uu.nl |
| Scouting Vries cubscout leader. http://www.phys.uu.nl/~riel/ |
+-------------------------------------------------------------------+

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/