[Gllug] Unkillable process

Nix nix at esperi.demon.co.uk
Mon Jul 1 22:30:59 UTC 2002


On Mon, 1 Jul 2002, Huw Lynes yowled:
> On Saturday 29 June 2002 17:01, you wrote:
>> On Fri, 28 Jun 2002, t. clarke said:
>> > Nix wrote:-
>> If a process is *ever* in user mode and in D state at the same time,
>> it's a truly massive bug: I've never seen it, and I doubt that in
>> that state the process would get any time from the scheduler
>> (although I haven't checked what the scheduler does in this case, or
>> even if it notices).
> 
> Ok now for a really dumb question. If you've got a process which is 
> refusing to die is there any way of telling if it is in kernel space or 
> user space? 

ps -l will tell you; if WCHAN is not `-', the process is in kernel
space. (Non-CPU-bound processes tend to be blocked in the kernel most of
the time, of course.)

> Dumb question no2: If it is in user space is there any way of telling 
> what it was doing when it hung. Assuming that it is a proprietary app 
> that you do not have the source for.

gdb {program} {pid}

:)

(It will be hard: without debugging symbols you're working in assembler.
Familiarity with the code that GCC generates for common constructs is
often useful here...)

-- 
`What happened?'
                 `Nick shipped buggy code!'
                                             `Oh, no dinner for him...'


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list