Re: How do I kill a process that is locked to a resource

Tom Zerucha (root@deimos.ceddec.com)
Mon, 23 Dec 1996 10:52:54 -0500 (EST)


On Sun, 22 Dec 1996, William Burrow wrote:

> On Sun, 22 Dec 1996, Grant R. Guenther wrote:
>
> > > This should also extend to hard disks that have gone south, which was the
> > > problem the original poster was experiencing.
> >
> > If a *device* vanishes - by being unplugged for instance - there's really
> > nothing the kernel can do - it most likely has cached pages for that device
> > which it cannot dispose of. This is what causes the deadlocks.
>
> My point is, is there a way for the various layers to get back to a
> usable state if the hardware is happy and back to its original state
> before going away?

EXACTLY! To be "robust", a point failure should be recoverable. Even if
a disk "disappears", as long as it is not root, swap, or some other vital
section of the system, I should be able to kill the process and recover
any resource it was using, and/or forceably umount the device, also
returning any recoverable resources. Even if the hardware won't be happy
until the power is cycled, the rest of the system should still continue to
work.

Floppies tend to be small, and it is possible that everything times out
quickly, or that other error detection occurs faster, so it simply appears
as 100% bad sectors if it gets removed, and quickly fails. I haven't
tried this, but I suspect it works better. It would be silly for a bad
floppy to cause a deadlock in a Linux system. My point is either
something fundamental needs to be fixed (if a bad floppy can cause a
deadlock), or that whatever method of recovery happens for floppies should
be propogated to other hardware block devices.

tz@execpc.com
finger tz@execpc.com for PGP key