Complete.Org: Mailing Lists: Archives: linux-help: June 2003:
[linux-help] Re: floppy problem
Home

[linux-help] Re: floppy problem

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: linux-help@xxxxxxxxx
Subject: [linux-help] Re: floppy problem
From: Tom Hull <thull2@xxxxxxx>
Date: Mon, 02 Jun 2003 00:06:37 -0500
Reply-to: linux-help@xxxxxxxxx

Here's an explanation (of sorts) of this problem:

   http://www.linuxgazette.com/issue83/tag/6.html

Personally, putting a process into an "uinterruptible sleep" state sounds
like bad kernel (or driver) design. I hadn't heard of this, but I have
read about the fast/slow interrupt handler distinctions. I don't know
how frequently this occurs, or on what devices, but letting something
like this happen with a floppy disk sounds like really bad design. As
they state in this piece, such a state should be treated as a bug, and
fixed by getting a new driver that works correctly.

My guess is that if killing the parent process works to free the device,
that's just dumb luck. (It's possible, as they suggest, that a timeout
may have independently corrected the problem.)

As far as process in state Z (zombie), you can't kill them because they're
already dead. The only thing that exists of the process is the process table
entry, which holds the exit status code, which is being held so it can be
reported to the parent process. Most parent processes call wait(2) to wait
until their children exit (others, like shells running background processes,
can be signalled). Zombies occur when a parent process doesn't wait, so
cannot be informed about the exiting child process. Killing the parent
process works there because when a parent process dies before its children
the children are assigned a new parent process, init (pid 1), and init is
better behaved.

Jeff Vian wrote:
> As long as the mcopy command has the device (/dev/floppy) busy you will 
> not be able to use the cp command to copy anything to it. Nor will you 
> be able to mount or umount it.
> 
>      ps -auxw    --or--   ps -auxww
> can be used  to display more than the 80 chars that default to display. 
>  Also, if you are using a terminal window under X (I am using gnome); 
>  simply stretching the width of the window prior to issuing the ps 
> command will display the output line to the current width of the window.
> 
> looking at the man page for the ps command will give you all the options 
> available.
> 
> I often use the "kill -9 PID" option to kill processes that will not die 
> by other means. However, some processes will not respond to that and may 
> need the parent process killed (the terminal window or the Xwindow 
> server) in order to force the system to kill it.
> 
> I have not tried to kill anything with a status of D, but a status of 
> (defunct) or a (Z) cannot be killed without killing the parent process.
> 
> Your question on grep --
> grep can only look at the displayed line.  If the phrase being grepped 
> for (floppy) is not in the displayed output of the ps command grep 
> cannot find it to select and display.  Using the ps -auxw or multiple 
> "w"s  will display more of the line and then grep will work as expected.
> 
> 
> bruce wrote:
> 
> 
>>This isn't an earthshaking problem, but is mysterious to me.
>>
>>I tried to copy a small file (~95k) to a blank floppy using mcopy.  Got 
>>a segmentation fault.  Tried again and the terminal gave me a blank 
>>line.  Cntl-C had no effect.  Couldn't get my terminal back.
>>
>>Opened another terminal and tried "cp file-name  /mnt/floppy/" then 
>>"umount /mnt/floppy"    Got back "device busy"
>>
>>Looked in ps -aux and the mcopy command is there with pid 12310 and 
>>status D.  It can't be killed with kill 12310.  
>>
>>Status D means uninterruptible sleep according to the man page.
>>
>>The line that shows up with "ps -aux" is this:
>>bruce    12310  0.0  0.0  1612  552 ?        D    10:38   0:00 mcopy 
>>gcc /mnt/floppy/
>>
>>Short of restarting kde, is there any way to kill an uninterruptible 
>>sleeping process?  Or perhaps restarting kde won't kill it?
>>
>>A sidenote:
>>
>>When I try "ps -aux  |grep floppy"  the line doesn't show up, but most 
>>of the line does show up with "ps -aux  |grep 12310".  (I think maybe 
>>grep only looks at the first 80 characters???)
>>
>>bruce


-- 
/*
  *  Tom Hull * thull2(cox.net) * http://www.tomhull.com/
  */

-- This is the linux-help@xxxxxxxxx list.  To unsubscribe,
visit http://www.complete.org/cgi-bin/listargate-aclug.cgi


[Prev in Thread] Current Thread [Next in Thread]