LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 12-13-2004, 06:13 AM   #1
chii-chan
Member
 
Registered: Sep 2003
Location: chikyuu (E103N6)
Distribution: Redhat 8.0 (2.4.25-custom), Fedora Core 1 (2.4.30-custom)
Posts: 357

Rep: Reputation: 30
What if 'kill -9' fails to kill a task?


What should I do if even 'kill -9 PID' won't kill the stalled/defunctioned task/process? Any other powerful way of killing that task/process?

(Other than halt -p or something similar to that...)

Last edited by chii-chan; 12-13-2004 at 06:15 AM.
 
Old 12-13-2004, 07:25 AM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 198Reputation: 198
What kind of process is it? Does it have any parent ID's running?
 
Old 12-13-2004, 09:41 AM   #3
enigma82
Member
 
Registered: Sep 2004
Location: Fagaras, Romania
Distribution: Mandrake 10.0
Posts: 48

Rep: Reputation: 15
Normally it SHOULD NOT HAPPEN!
"kill -9 PID" should and it does kill anything. You can kill even PID 0 (init) - if you are root of course.

Try running kill -9 PID under root credentials. I hope it works for you.
This is the most powerful way of killing processes.


BTW, try using KILL -HUP PID (i think this also does the job).
 
Old 12-13-2004, 11:45 AM   #4
visaris
Member
 
Registered: Dec 2004
Distribution: gentoo
Posts: 190

Rep: Reputation: 30
Sometimes a process will be waiting for kernel to do some I/O and the kernel is waiting for a timeout because of a hardware error, etc. This can happen if you try to do a file copy for instance and a harddrive fails. The 'cp' command may not be killable until the kernel timeout has occurred (this may hang indefinately).

So yeah. Sometimes, you're just shit out of luck.
 
Old 12-13-2004, 03:32 PM   #5
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 51
Quote:
Originally posted by visaris


Sometimes, you're just shit out of luck.
yea sometimes you just can't kill stuff till init goes down and kills off (infantacides) her lost/confused children
 
Old 12-13-2004, 04:33 PM   #6
chii-chan
Member
 
Registered: Sep 2003
Location: chikyuu (E103N6)
Distribution: Redhat 8.0 (2.4.25-custom), Fedora Core 1 (2.4.30-custom)
Posts: 357

Original Poster
Rep: Reputation: 30
The irritating programs most of the time are wine , gqview and nautilus (for gnome 2.8 that comes with Fedora Core 3. The versions before 2.4 are just ok.).. I'm sure it was not due to any hardware problems. I've tried killing them as root though and I found that if the status is 'DEFUNC' in ps aux, there's no hope other than 'halt =p' or 'reboot'. (I haven't tried 'kill hup process' but it is the same as kill -1 process if I'm not mistaken').

I just have a feeling of banging my head agaist the monitor everytime it happened, reminescent of my Windoze days... May be sometime out of luck...

Btw, the parent process was only WindowMaker, and when this happened sometimes I can't even kill WindowMaker and not even rebooting. (Usually restarting X do help killing those stalled programs). Reset button was my only best friend.

Last edited by chii-chan; 12-13-2004 at 04:43 PM.
 
Old 12-13-2004, 05:06 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,978
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
What kernel and graphics hardware are you using?
If these things happen often there may be an issue
with how your kernel and hardware interact.


Cheers,
Tink
 
Old 12-13-2004, 08:00 PM   #8
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,438

Rep: Reputation: 52
Usually if kill -9 doesn't work for me then I would do a 'pkill -9 PID' which works more of the time. Also 'kill -1' (also known as 'kill -HUP') doesn't really kill the process. It actually reloads the configuration for that process. Like say if you have DNS (named) running and want to reload the new modified conf files then you would do a 'kill -1 <PID of named>' and that reloads the new configs.

-twantrd
 
Old 12-13-2004, 08:37 PM   #9
chii-chan
Member
 
Registered: Sep 2003
Location: chikyuu (E103N6)
Distribution: Redhat 8.0 (2.4.25-custom), Fedora Core 1 (2.4.30-custom)
Posts: 357

Original Poster
Rep: Reputation: 30
For the one I have lots of problems are Fedora Core 3. It is on kernel-2.6.9-1.667, and NVIDIA-GeForce FX using NVIDIA-Linux-x86-1.0-6629-pkg1. I'm using WindowMaker 0.91 on this setup, and I think may be somehow it conflicts with GNOME 2.8. I haven't tried KDE. But may be the problems lies in the nautilus itself where you have to let it finish listing the whole directory and calculating how many files inside there before you can change to another directory. It really slows thing down. Then when my friend (he has no Linux knowledge but let him familiarize with Linux) read some manga, after sometime, the nautilus hang when he tried to open some directory quickly. And for gqview, as I let it open automatically when I click a picture in nautilus, so when nautilus hang, it would also hang. And I'm also using the developmental version of it so it is expectable. I don't have wine one this setup because the wine for kernel 2.6 can't run anything I'm used to run using older version for kernel 2.4.

On the second setup, on the same computer, I have Fedora Core 1 with kernel 2.4.22-1.2115 and NVIDIA-Linux-x86-1.0-6106-pkg1 driver. I've no problem with this one really even though I'm using WindowMaker 0.91 and doesn't seem to conflict with GNOME 2.4. This one never give me any problem that I can say you can turn on this computer forever and it will never hang. It is just that sometime when the wine refuse to be killed that I have to reboot it.

The third setup is on Redhat 8.0 custom kernel 2.4.25 with NVIDIA Geforce2 MX with NVIDIA-Linux-x86-1.0-6106-pkg1 driver. This setup never give me any problem at all except for faulty memory modules that I've removed and unstable winmodem driver that spontaneously disconnect sometime.

So far, most of my problem is with Fedora Core 3, and maybe kernel 2.6, and nautilus 2.8. May be it is with the WindowMaker itself, because I read lots of peole saying Fedora Core 3 is the most stable release for Redhat and Fedora. Some even claim of ease of use and setup like Windows. I don't think so.

And thanks for 'pkill'. I never know there is such command to try. And since I'm not at the problematic setup I can't test that.
 
Old 12-13-2004, 08:45 PM   #10
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,109

Rep: Reputation: 312Reputation: 312Reputation: 312Reputation: 312
Unfortunately there are certain states in which a process cannot be killed. Zombie (defunct) processes can't be killed, even with kill -9 (you can't kill the living dead, after all). For a zombie, the thing to do is try and kill its parent, which will cause it to be adopted by init and reaped. If processes are stuck in uninterruptible I/O there might be a dodgy device like a disconnected NFS server causing the problem.

BTW, enigma82, init is PID #1 (PID #0 is either the swapper or in some systems the pager), and init never receives any signal it doesn't want (even from root), -- this is hard-coded into the kernel (see the comment on line 568 in arch/i386/kernel/signal.c of the 2.6.9 Linux kernel).
 
Old 12-14-2004, 06:44 AM   #11
MainframeGuy
Member
 
Registered: Nov 2004
Location: London, UK
Distribution: Ubuntu 10.04
Posts: 50

Rep: Reputation: 16
try skill?

I am just a n00b - but isn't SKILL the next step up for this problem?

If I am wrong feel free to slap me with a kipper!
 
Old 12-14-2004, 07:56 AM   #12
mhearn
Guru
 
Registered: Nov 2002
Location: Durham, England
Distribution: Fedora Core 4
Posts: 1,565

Rep: Reputation: 47
Wine was zombified on some 2.6 kernels due to a kernel bug, but I think it's fixed now.
 
Old 01-17-2010, 05:52 AM   #13
valajbeg
LQ Newbie
 
Registered: Dec 2009
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by btmiller View Post
Unfortunately there are certain states in which a process cannot be killed. Zombie (defunct) processes can't be killed, even with kill -9 (you can't kill the living dead, after all). For a zombie, the thing to do is try and kill its parent, which will cause it to be adopted by init and reaped. If processes are stuck in uninterruptible I/O there might be a dodgy device like a disconnected NFS server causing the problem.

BTW, enigma82, init is PID #1 (PID #0 is either the swapper or in some systems the pager), and init never receives any signal it doesn't want (even from root), -- this is hard-coded into the kernel (see the comment on line 568 in arch/i386/kernel/signal.c of the 2.6.9 Linux kernel).
what would be solution for killing uninterruptible process, how to remove it???

I'm having similar problems with kate, probbably be cause the folder that i mount via sshfs and when connection fails the kate goes to interruptible state and i can't get kate running again...


what should i do there?
 
Old 01-17-2010, 11:17 AM   #14
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,109

Rep: Reputation: 312Reputation: 312Reputation: 312Reputation: 312
Wow, this was an old thread... In general I've never found a good way to kill processes locked up in iowait. Have you tried forcibly unmounting the sshfs file system? I do this for NFS sometimes. Do be careful, however, as forcibly unmounting things can theoretically lead to data corruption (although it's never happened to me with an NFS export, YMMV). In a lot of cases, I simply reboot to avoid leaving the system in an inconsistent state.
 
Old 01-17-2010, 12:31 PM   #15
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,013

Rep: Reputation: 83
Be sure to check the system logs before doing things the windows way and rebooting...

In some situations a reboot could make life more difficult (especially if the issue is caused by a hardware failure)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel Panic -- not syncing: attempted to kill idle task oraclerg Linux - Distributions 15 02-03-2010 03:36 AM
Attempted to kill idle task dasy2k1 Slackware 7 12-03-2005 06:55 PM
how to use kill to kill a batch of processes with same name? dr_zayus69 Linux - Software 2 09-03-2005 06:35 PM
cannot kill process (kill -9 does not work) mazer13a Linux - General 1 05-27-2005 02:32 PM
kernel panic : attempted to kill the idle task abirami Linux - Software 0 09-06-2004 03:56 AM


All times are GMT -5. The time now is 05:16 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration