LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-08-2008, 12:40 AM   #1
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
When kill -9 pid Fails?


Hey Guys

I have not run into this one before. I tried to open an unknown file with gedit. It hung (not so unusual), but then I tried to kill it and it will not die (unusual for me). So what does one do when 'kill -9 3144' (the pid) does not work? It takes the command without error but it does not kill it.

Thanks
Lazlow
 
Old 12-08-2008, 12:52 AM   #2
arfon
Member
 
Registered: Apr 2004
Distribution: Slackware & RHEL
Posts: 400

Rep: Reputation: Disabled
1) CTRL+ALT+BACKSPACE

or

2) shutdown -r now
 
Old 12-08-2008, 12:54 AM   #3
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Original Poster
Rep: Reputation: 172Reputation: 172
I am trying to avoid that. It may be several hours before I can shut the machine down and the process is taking 50% of the cpu.
 
Old 12-08-2008, 02:01 AM   #4
nigelc
Member
 
Registered: Oct 2004
Location: Sydney, Australia
Distribution: Mageia 7
Posts: 406
Blog Entries: 4

Rep: Reputation: 80
maybe try killall
 
Old 12-08-2008, 02:08 AM   #5
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Original Poster
Rep: Reputation: 172Reputation: 172
Nigel

No go, but thanks for the suggestion. I really cannot figure this one out. It is showing an RN (running) and not z (zombie) or d (I think of it as dead but not the right term). The little !@#$$%%^ is just sitting there chewing up cycles. It also does not show that it is a daughter process for anything.
 
Old 12-08-2008, 02:36 AM   #6
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Can you kill the xterm session you started it from?
 
Old 12-08-2008, 03:28 AM   #7
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Original Poster
Rep: Reputation: 172Reputation: 172
No, I just double clicked on it(no xterm).
 
Old 12-08-2008, 03:33 AM   #8
thecarpy
Member
 
Registered: Apr 2005
Location: France
Distribution: Devuan, Suse, Slackware
Posts: 130

Rep: Reputation: 21
Code:
kill -11
-11 will tell the kernel to exterminate with no pity!

The kernel thinks the process is trying to access mem addresses that are not assigned to the process and will terminate it immediately. gedit might dump core, but that is not really an issue ... out of curiosity, what were you trying to open, a very big file?

The other option would be to use xkill, it is also an applet for the gnome-panel and allows you to kill xwindow processes pretty darn well ... if that does not work, a reboot is required.

Last edited by thecarpy; 12-08-2008 at 03:42 AM. Reason: added xkill
 
Old 12-08-2008, 03:36 AM   #9
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
I take it logging off doesn't help
 
Old 12-08-2008, 04:32 AM   #10
nigelc
Member
 
Registered: Oct 2004
Location: Sydney, Australia
Distribution: Mageia 7
Posts: 406
Blog Entries: 4

Rep: Reputation: 80
how about
top
r
PID to renice 19 then k

Nigel
 
Old 12-08-2008, 02:58 PM   #11
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Original Poster
Rep: Reputation: 172Reputation: 172
No, logging off did nothing(multiple times). I even tried logging in as root (I know but I was desperate).

Tried to renice earlier(good idea though).

Yeah, I tried -11 (forget where I found that one) no luck. When the app still has a window on the desktop xkill works pretty good, unfortunately the window had been closed long before I realized gedit was hung (ok, really hung). Yes, it was a very big file. One of those times I just tried to open something before I noticed how big it was. I have hung gedit this way before but it has always died respectfully.

All right guys I can (and will) reboot the system now. If anybody has more ideas please go ahead and post them. The next time someone hangs a process, this thread should serve as a good reference.

Thanks for all the help.

Lazlow
 
Old 12-08-2008, 03:54 PM   #12
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 98
If a kill -9 fails the process is probably a zombie.

http://en.wikipedia.org/wiki/Zombie_process

As it's taking CPU cycles, it could be IO bound and in this case it will not respond to a kill until it's been given th resources that it's requesting.

Last edited by Disillusionist; 12-08-2008 at 03:58 PM.
 
Old 12-08-2008, 04:30 PM   #13
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,314

Rep: Reputation: 4172Reputation: 4172Reputation: 4172Reputation: 4172Reputation: 4172Reputation: 4172Reputation: 4172Reputation: 4172Reputation: 4172Reputation: 4172Reputation: 4172
You could probably put it into a cgroup container and not give it (the container) any service. I'll test this later.
 
Old 12-08-2008, 06:55 PM   #14
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Original Poster
Rep: Reputation: 172Reputation: 172
Dissillusionist

As I stated in post #5 there were no Zs (zombies) or Ds(dead processes).


sysg00

Not a clue what you are talking about(my ignorance showing again). Can you move an already running process like this?
 
Old 12-08-2008, 08:05 PM   #15
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,314

Rep: Reputation: 4172Reputation: 4172Reputation: 4172Reputation: 4172Reputation: 4172Reputation: 4172Reputation: 4172Reputation: 4172Reputation: 4172Reputation: 4172Reputation: 4172
Yep, that's the beauty of it - have a look at ../Documentation/cgroups.txt for the basic design.
Used to be (when it was called cpusets) you could only limit by (entire) CPU - (i.e. 1 out of 4 say), not a percentage like 15%. That's how I've used it, but I think CPU controller has been updated to do this (finer control) but I'll have to check. Might only be on (really) recent kernels tho'.

Testing may have to wait - real work is getting in the way ....
 
  


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
What does kill -0 PID do? asihsh.nakul Linux - Newbie 16 11-14-2012 06:18 PM
kill <pid> does not do anything moskito01 Linux - General 9 08-25-2009 01:20 PM
What is the more easier way to check the pid and kill the pid cmx08 Linux - General 5 09-09-2008 11:57 PM
kill pid ekdya Debian 3 04-18-2006 06:04 PM
kill pid.... won't work with 'pid' variable given.. sachitha Programming 6 03-06-2006 08:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:16 PM.

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