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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
12-08-2008, 12:40 AM
|
#1
|
Senior Member
Registered: Jan 2006
Posts: 4,363
Rep:
|
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
|
|
|
12-08-2008, 12:52 AM
|
#2
|
Member
Registered: Apr 2004
Distribution: Slackware & RHEL
Posts: 400
Rep:
|
1) CTRL+ALT+BACKSPACE
or
2) shutdown -r now
|
|
|
12-08-2008, 12:54 AM
|
#3
|
Senior Member
Registered: Jan 2006
Posts: 4,363
Original Poster
Rep:
|
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.
|
|
|
12-08-2008, 02:01 AM
|
#4
|
Member
Registered: Oct 2004
Location: Sydney, Australia
Distribution: Mageia 7
Posts: 406
Rep:
|
maybe try killall
|
|
|
12-08-2008, 02:08 AM
|
#5
|
Senior Member
Registered: Jan 2006
Posts: 4,363
Original Poster
Rep:
|
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.
|
|
|
12-08-2008, 02:36 AM
|
#6
|
LQ Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678
Rep:
|
Can you kill the xterm session you started it from?
|
|
|
12-08-2008, 03:28 AM
|
#7
|
Senior Member
Registered: Jan 2006
Posts: 4,363
Original Poster
Rep:
|
No, I just double clicked on it(no xterm).
|
|
|
12-08-2008, 03:33 AM
|
#8
|
Member
Registered: Apr 2005
Location: France
Distribution: Devuan, Suse, Slackware
Posts: 130
Rep:
|
-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
|
|
|
12-08-2008, 03:36 AM
|
#9
|
LQ Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678
Rep:
|
I take it logging off doesn't help
|
|
|
12-08-2008, 04:32 AM
|
#10
|
Member
Registered: Oct 2004
Location: Sydney, Australia
Distribution: Mageia 7
Posts: 406
Rep:
|
how about
top
r
PID to renice 19 then k
Nigel
|
|
|
12-08-2008, 02:58 PM
|
#11
|
Senior Member
Registered: Jan 2006
Posts: 4,363
Original Poster
Rep:
|
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
|
|
|
12-08-2008, 03:54 PM
|
#12
|
Senior Member
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039
Rep:
|
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.
|
|
|
12-08-2008, 04:30 PM
|
#13
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,314
|
You could probably put it into a cgroup container and not give it (the container) any service. I'll test this later.
|
|
|
12-08-2008, 06:55 PM
|
#14
|
Senior Member
Registered: Jan 2006
Posts: 4,363
Original Poster
Rep:
|
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?
|
|
|
12-08-2008, 08:05 PM
|
#15
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,314
|
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 ....
|
|
|
All times are GMT -5. The time now is 07:16 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|