LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-24-2013, 04:00 AM   #1
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
Thumbs down How to kill process if it can't be killed?


Hello LQ.org.

I have problems with vlc and kdenlive. Sometimes they hang up and can't be terminated no matter what I do. For example I try to kill vlc with

Code:
killall vlc
which gives me no text output and does nothing to vlc. Or I

Code:
ps aux | grep vlc
and then

Code:
kill
whatever process that is (both as user and as root) and still no luck.
Try htop with "F9" and then different termination signals and none of them work. So the only way to actually terminate those processes for me is to reboot.

Can you suggest any other thing to terminate them without rebooting?
 
Old 11-24-2013, 04:08 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
kill <PID> is a nice way to kill a process, if that does not work you could try kill -9 <PID>

If a process becomes a zombie you cannot kill or remove it, only option is to reboot.
 
1 members found this post helpful.
Old 11-24-2013, 04:24 AM   #3
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by druuna View Post
kill <PID> is a nice way to kill a process, if that does not work you could try kill -9 <PID>
If it's a SIGKILL call, then I already tried it through htop. And zombie process shouldn't consume any CPU resources, right? Not in my case — VLC might load CPU 100% and still be hanging as zombie.
 
Old 11-24-2013, 04:45 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Quote:
Originally Posted by Mr. Alex View Post
If it's a SIGKILL call, then I already tried it through htop.
Yep, kill -9 and kill -SIGKILL do the same thing. Have you tried it from the command line instead of using htop?

Quote:
And zombie process shouldn't consume any CPU resources, right?
Correct.

Quote:
Not in my case — VLC might load CPU 100% and still be hanging as zombie.
A zombie process is recognisable by the process status (the STAT field in ps or the S field in top). The status will be Z for a zombie process.

You can check for zombied processes like this:
Code:
ps aux | awk '{ print $8 " " $2 }' | grep -w Z
 
Old 11-24-2013, 04:48 AM   #5
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by druuna
Have you tried it from the command line instead of using htop?
Probably not. Next time I have this situation, I'll try. But from here it doesn't seem to have any real difference.
 
Old 11-24-2013, 04:59 AM   #6
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,656

Rep: Reputation: 255Reputation: 255Reputation: 255
pkill -9 chromi* <-- not sure

kill -9 <number#> that you find using ps aux
 
Old 11-24-2013, 05:02 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,119

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Possibly running in interrupt context - that's "higher" (FSVO ...) than kernel context.

In which case it's crap code, and you're out of luck trying to kill it.

Just a guess.
 
Old 11-24-2013, 02:20 PM   #8
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Blog Entries: 2

Rep: Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567
Also try:
Code:
sudo {...}
it's worked for me.

Last edited by jamison20000e; 11-24-2013 at 02:21 PM.
 
Old 11-25-2013, 07:42 AM   #9
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Original Poster
Rep: Reputation: Disabled
jamison20000e, I used sudo for this purpose. Back then it didn't help. Last time kdenlive froze, "kill -9" helped. Will see how it does with VLC.
 
Old 03-20-2014, 05:01 AM   #10
rlug
LQ Newbie
 
Registered: Jan 2009
Location: INDIA
Distribution: CentOS, RHEL
Posts: 6

Rep: Reputation: 5
Hi,

You can try good solution suggested at :
# What is Zombie Process ?
# How to Kill Zombie Process ?

Last edited by rlug; 03-20-2014 at 05:12 AM.
 
Old 03-21-2014, 03:29 PM   #11
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
How to kill without the kill command
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kill a zombie process - which process is the parent that I should kill? Mountain Linux - General 3 12-31-2011 02:44 PM
bash `kill`: process 'B' silently dies; but process 'A' = `kill` spews back debris! GrapefruiTgirl Programming 9 06-23-2009 09:42 AM
Process not killed with -KILL (-9) signal hondo Linux - General 2 07-25-2007 09:23 AM
kill the process invoked from a shell script, when the script is killed kskkumar Linux - Software 8 05-23-2007 11:29 AM
When I kill parent process, child isn't killed BengeBoy Linux - Software 0 08-19-2004 04:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:20 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration