LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 05-10-2003, 08:41 PM   #1
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
kill problems


Erg. I got wine running right now and I can't seem to kill it. ps ax shows:

4446 ? DW 0:01 [wine]
4850 ? DN 0:00 wine /pub/wine/c/Diablo II/Game.exe
5489 ? D 0:00 wine /pub/wine/c/Diablo II/Game.exe

root # killall -9 wine
root # kill -9 4446
root # kill -9 4850
root # kill -9 5489
root # ps ax | grep wine

4446 ? DW 0:01 [wine]
4850 ? DN 0:00 wine /pub/wine/c/Diablo II/Game.exe
5489 ? D 0:00 wine /pub/wine/c/Diablo II/Game.exe

root # killall -v -9 wine
Killed wine(4446) with signal 9
Killed wine(4850) with signal 9
Killed wine(5489) with signal 9
root # ps ax | grep wine

4446 ? DW 0:01 [wine]
4850 ? DN 0:00 wine /pub/wine/c/Diablo II/Game.exe
5489 ? D 0:00 wine /pub/wine/c/Diablo II/Game.exe

Any ideas? Rebooting seems to work, but there must be a better way. I've tried sending all sorts of other signals to them, too, but signal 9 is supposed to be the no-questions asked, die-right-now signal, right?

Last edited by wapcaplet; 05-10-2003 at 08:43 PM.
 
Old 05-10-2003, 11:39 PM   #2
td3201
Member
 
Registered: Jan 2002
Location: Omaha, NE US
Distribution: Red Hat/CentOS
Posts: 226

Rep: Reputation: 30
Interresting...

try:
ps xauwww -H

This will print all the processes plus show a tree with parent processes at the top. For example:

root 140 0.0 0.1 2700 936 ? S Feb21 1:31 /usr/local/sbin/sshd
root 2778 0.0 0.1 5876 984 ? S May09 0:00 /usr/local/sbin/sshd
root 2781 0.0 0.1 5336 1024 ? S May09 0:00 /usr/local/sbin/sshd
root 2782 0.0 0.1 3784 1168 pts/0 S May09 0:00 -bash
root 7611 0.0 0.2 6340 1796 ? S 23:32 0:00 /usr/local/sbin/sshd
td 7629 0.0 0.2 6364 1752 ? S 23:32 0:00 /usr/local/sbin/sshd
td 7630 0.0 0.2 3824 1872 pts/1 S 23:32 0:00 -bash
td 7749 0.0 0.1 4444 1532 pts/1 R 23:37 0:00 ps xauwww -H
td 7750 0.0 0.0 1496 608 pts/1 S 23:37 0:00 more

This tree here shows you parent sshd process. If you want to kill all the children, kill the parent (which isnt 100% logic but should work)
 
Old 05-11-2003, 09:56 AM   #3
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Original Poster
Rep: Reputation: 48
Thanks, I will have to try that next time it happens... I did try viewing the processes using gtop, which does a kind of hierarchical categorization of them also, but it didn't look like there were any parent processes really.

We shall see...
 
Old 05-11-2003, 07:05 PM   #4
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Original Poster
Rep: Reputation: 48
Well, I now know how to view processes hierarchically... however, killing wine still does not seem to work. The process listing does not seem to show any particular wine process as the parent of another.

One thing I should note - there is usually a 'wineserver' process running, which can be killed. I don't know whether this affects anything, though. Obviously wineserver is not the parent of the wine processes, though.

What baffles me is why killall tells me that it has killed these processes when it clearly has not Why would my Linux lie to me? I feel so betrayed...

Any other suggestions? I refuse to believe that there is no way to do it... This happens pretty often, and I'd hate to have to restart every time wine poops out.
 
Old 05-12-2003, 06:15 AM   #5
td3201
Member
 
Registered: Jan 2002
Location: Omaha, NE US
Distribution: Red Hat/CentOS
Posts: 226

Rep: Reputation: 30
There has to be a shell script that is kicking this off or something.....
 
Old 05-12-2003, 05:38 PM   #6
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Original Poster
Rep: Reputation: 48
Okay, it appears the problem is not limited to Wine... at the moment, there are some Mozilla processes running that refuse to die. kill, killall, kill -9, killing by name or process number; none of them work, even when run as root. No errors, no nothing. (With verbose mode, killall even tells me it has killed them, same as above).

What is up with this? Has kill suddenly acquired a conscience? Does it feel bad about killing? Should I reinstall kill? Has this happened to anyone else? It is driving me slightly nuts!
 
Old 05-12-2003, 05:45 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Things like that happen occasionally ... I've
had "immortal" processes sometimes.

you can still try a kill -15 ... or, if you
don't want to reboot, an init 1 and init X
(whichever starts your X ;})

Cheers,
Tink
 
Old 05-12-2003, 05:47 PM   #8
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Original Poster
Rep: Reputation: 48
Tinkster - I just thought of that actually. I just did:

/sbin/init 1

and was flabbergasted to see that the offending processes are *still* running. I waited a bit, tried various kill commands to them while in init level 1... no dice:

andrea 9904 0.0 0.0 0 0 ? DW 17:12 0:03 [wine]
andrea 9994 0.1 9.1 37400 23580 ? D 18:19 0:02 /usr/lib/mozilla-1.1/mozilla-bin
andrea 10024 0.0 0.0 0 0 ? Z 18:19 0:00 [mozilla-bin <defunct>]
andrea 10357 0.0 0.1 1624 396 ? D 18:29 0:00 /usr/bin/esd -terminate -nobeeps -as 2 -spa

Back to init 5. Same deal. Still running, refuse to die.

Isn't init level 1 supposed to eliminate everything that is non-essential to the OS?
 
Old 05-12-2003, 05:51 PM   #9
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Well, it first sends a "polite request" to all apps
to terminate themselves, then a kill -9, then a kill -15.

Would be interesting to see what they are
stuck at, though ... diablo grabbing the soundcard
while mozilla was using it for flash? :)

Cheers,
Tink
 
Old 05-12-2003, 06:07 PM   #10
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Original Poster
Rep: Reputation: 48
I've noticed a trend... The four processes I have right now that won't die are either in uninterruptible sleep mode (D), or zombie (the child mozilla-bin process). From what I've seen, zombies are already dead, and are just waiting on their parent to acknowledge it - so that explains one of them.

And if the sleep is uninterruptible... how can it be interrupted?

How do sysadmins handle stuff like this, if they are not in a position to reboot?
 
  


Reply



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 if 'kill -9' fails to kill a task? chii-chan Linux - Newbie 15 03-27-2013 03:47 PM
Please, KILL ME... debian laptop wireless problems :'( mcrexx Linux - Newbie 4 09-16-2005 12:21 AM
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
pts + kill problems cereal Linux - General 6 10-28-2003 12:05 PM

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

All times are GMT -5. The time now is 07:18 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