[Gllug] Unkillable process

Alain Williams addw at phcomp.co.uk
Mon Jul 1 23:13:37 UTC 2002


On Mon, Jul 01, 2002 at 11:30:59PM +0100, Nix wrote:
> 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}

Even better, use by 2 favourite debugging tools:

strace -p pid -- shows system calls

ltrace -p pid -- shows library calls (eg C library)

Brilliant!

-- 
Alain Williams

#include <std_disclaimer.h>


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




More information about the GLLUG mailing list