[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Crashed dd, kill -9 doesn't even kill it.

Timothy Legg wrote:
> Hello,
> I have got another interesting problem here.  I found a way to crash dd so
> badly that even kill -9 `pidof dd` won't even phase it.  The only way I
> have found to kill it effectively is to shut down the machine.


> # dd if=/dev/sdb of=/media/disk-1/GPX.img bs=512
> I know it is best form to use the 'count' parameter to identify a stopping
> point for dd, but usually it reaches the end of the device and then stops
> anyway.  This is how it has done when I make periodic backups/restores of
> my flash based netbook.
> It created the 2Gb file and then hung.  I have had this happen when I
> attempted yesterday with the same device.
> # kill `pidof dd`
> and
> # kill -9 `pidof dd`
> does not phase it.  I went into dmesg and found this going on.  It looks


There are only two reasons I know of, where a 'kill -9' won't "work".

1.  The process is a "zombie".  This is not your situation, but
mentioned here for completeness. ;)  There is no real process, the
program has exited, but something was supposed to wait for it.  The
process slot is kept, so the 'wait' can be properly handled by the kernel.

2.  Or, and I think this is your case:  the process has called a kernel
service that is not interruptible (after all, you can't kill the kernel ;).

This appears to be related to the "usb-storage" and "hald-addon-stor"
modules (?) in the kernel, I think.

Regardless, the only "solution" for either of the above "hangs" is to
reboot, as you've discovered, though it might be possible to un-hang the
kernel code by pulling the USB device (though this may wreak havoc with
the contents).

I have a USB flash drive that causes me some problems with mounting
(nothing like what you saw, though I've never tried a 'dd' on it,
either) because the manufacturer did not create a partition table, but
rather uses the "whole" device for the file system (sdd is used rather
than sdd1).

I wonder if your device is partitioned or not, and if not, if that might
be the root cause of the hang?

I have no thoughts regarding fixing this, other than to suggest using a
different method to back it up, such as tar or cpio.  If the device
'dies' and you need to rebuild it, you'd need to reformat as FAT32 or
whatever, and copy files back on (a two step process '-(

Bob McGowan

Reply to: