Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't kill (-9) process
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
sulek
n00b
n00b


Joined: 04 Jun 2005
Posts: 55

PostPosted: Tue Mar 21, 2006 8:55 pm    Post subject: Can't kill (-9) process Reply with quote

Hello gyus!
I can't access my streamer (resource is busy) nor can I kill process that blocks it:
Code:

[root@server ~]# mt -f /dev/nst0 tell
/dev/nst0: Device or resource busy
[root@server ~]# ps aux|grep cpio
root      7170  1.4  0.0  4164  432 ?        D    Mar20  22:36 cpio -itv -I /dev/nst0
root      8581  0.0  0.0  5084  652 pts/0    S+   21:49   0:00 grep cpio
[root@server ~]# kill -9 7170
[root@server ~]# kill -9 7170
[root@server ~]# ps aux|grep cpio
root      7170  1.4  0.0  4164  432 ?        D    Mar20  22:36 cpio -itv -I /dev/nst0
root      8583  0.0  0.0  4468  652 pts/0    S+   21:49   0:00 grep cpio


What can I do (please don't advise me to reboot server;)

Any help would be appreciated!
Back to top
View user's profile Send private message
Zwartoog
Tux's lil' helper
Tux's lil' helper


Joined: 13 Mar 2006
Posts: 87
Location: Netherlands

PostPosted: Tue Mar 21, 2006 9:02 pm    Post subject: Reply with quote

The 'D' means the process is dead, i.e. not responding. The process is probably waiting for a device to respond or something.

There are 2 options: reset or wait for about a month or so (it is said that the process eventually gives up).

Dead processes are bad :cry:
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Tue Mar 21, 2006 9:07 pm    Post subject: Reply with quote

I had a similar issue on AIX once.

What was happening is that something being called by /etc/inittab was taking a long time to execute. As a result, the init process could not get around to do housekeeping.

I had what were called zombie processes hanging around, which were processes that had terminated but had not been cleaned up by the OS.

This was self-inflicted. I knew everything about /etc/inittab since I had read the man page (!) and started hacking my own scripts in. This issue took me a while to figure out, but I suddenly realized that having read a man page does not make one an expert on the underpinnings of unix.
Back to top
View user's profile Send private message
bollucks
l33t
l33t


Joined: 27 Oct 2004
Posts: 606

PostPosted: Thu Mar 23, 2006 1:14 am    Post subject: Reply with quote

D means sleeping in uninterruptible sleep. This means it is waiting for some kernel process to finish on its behalf and return... and it hasn't returned. There is no way to kill such a task. It means there has been a bug in some kernel process, NFS on removed mounts being the most common scenario. Z means zombie and it means the process wasn't responsible for cleaning up after itself but the parent, and the parent has not yet cleaned up.
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Thu Mar 23, 2006 1:44 am    Post subject: Reply with quote

A bug in the kernel process is not really necessary for that. What it means is the kernel is tied up doing something lengthy. That could be a bug, or it could be some clever script you run from /etc/inittab. /etc/inittab is run as the kernel process, as are the files referenced by it. All I had to do is "&" the script I was tinkering with, in addition to piping output to a file, and my zombies all went away.

On AIX, anyway, a process that was killed turned into a zombie, and the init process cleaned it up after that. Generally it happens so fast you never see a zombie process, but in the event of a hanging or lengthy task in /etc/inittab you DO see them.

I can't say where the lengthy process is in this case if it isn't a bug, but I'd start looking at any custom scripts that were created recently.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum