Subject: Re: 'kill -9' not always working...
To: Herb Peyerl <hpeyerl@beer.org>
From: Steven M. Bellovin <smb@cs.columbia.edu>
List: current-users
Date: 01/01/2006 15:35:02
In message <A3FCB187-21CF-4788-9C55-491F81C2E15E@beer.org>, Herb Peyerl writes:
>
>On Jan 1, 2006, at 9:10 AM, Steven M. Bellovin wrote:
>> If, in the root window that's running pppd, I do ^Z and 'kill -9  
>> <pid>',
>> nothing happens.  Not good, but not a big surprise; we've all seen
>> drivers that wedge in the kernel.
>>
>> If, however, I do the 'kill -9' from a second window, it works.  That
>> suggests some problem about killing a stopped process, especially if
>> it's slightly stuck on something todo with a device driver.
>
>When you do the SIGTSTP and then the SIGKILL, do a ps -axwl and see  
>what wchan the process is stuck in.  What happens if you type 'fg'  
>after you SIGKILL?
>
I always type 'fg', if for no other reason that to see it terminate.

Here are two 'ps' invocations, one before the 'kill -9' and one after:

# r
ps wwl926
UID PID PPID CPU PRI NI VSZ  RSS WCHAN  STAT TTY      TIME COMMAND
  0 926  613   0   2  0 332 1224 select I+   ttyp2 0:00.01 pppd ttyU0 
# r
ps wwl926
UID PID PPID CPU PRI NI VSZ  RSS WCHAN  STAT TTY      TIME COMMAND
  0 926  613   0   2  0 332 1224 select I+   ttyp2 0:00.01 pppd ttyU0 


		--Steven M. Bellovin, http://www.cs.columbia.edu/~smb