FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Red Hat Linux

 
 
LinkBack Thread Tools
 
Old 09-14-2011, 01:01 PM
"Mike Burger"
 
Default Options to stop processes that can't be killed -9 other than reboot

> On 13Sep2011 10:14, m.roth@5-cent.us <m.roth@5-cent.us> wrote:
> | sunhux G wrote:
> | <snip>
> | <snip>
> | > # lsof -a -p 7892
> | > < above command just pauses/hangs there; it's been over 2 hrs already
> >
> | >
> | > # strace -p7892
> | > Process 7892 attached - interrupt to quit
> | > < it pauses there & Ctrl-C did not yield any response >
> | > (have to do 'pkill -9 strace' to exit it)
> | <snip>
> | As a side note, did you try <crtl-D>?
> | mark
>
> Sigh. Whatever for? At least ctrl-C sends SIGINT. ctlr-D just flushes
> the input stream, generating a zero length read if the stream is already
> flushed, and a zero length read means EOF. But the program has to be
> running
> _and_ reading its input to notice this.
>
> In short, if "kill -9" doesn't get you anywhere, ctrl-D doesn't even
> make into the waste of time category because it is not even a signal.

I haven't followed this thread, so I apologize if this answer has already
been given.

If you have a process that is stuck in a zombie mode and kill -9 isn't
getting rid of it, you may need to do something with the parent process
that spawned it in the first place.

Often, child processes will hang around for no apparent reason, until the
parent process has ended.

ps -ef | grep <PID> or ps -eaf | grep <PID> will give you the parent
process ID as well as the current PID. The parent process ID is in the
third column, as shown here:

$ ps -eaf | grep sshd
root 3979 1 0 Aug27 ? 00:00:00 /usr/sbin/sshd
root 10872 3979 0 08:09 ? 00:00:00 sshd: XXXXXX [priv]
XXXXXX 10874 10872 0 08:09 ? 00:00:00 sshd: XXXXXX@pts/0


First column: Process owner
Second column: PID of the sshd process(es)
Third column: PID of the process that spawned sshd

So, if my pts/0 shell won't go away, with PID 10874, the parent process
would be PID 10872. You could kill that process, and PID 10874 should end
along with it.

--
Mike Burger
http://www.bubbanfriends.org

Visit the Dog Pound II BBS
telnet://dogpound2.citadel.org or http://dogpound2.citadel.org

To be notified of updates to the web site, visit:

https://www.bubbanfriends.org/mailman/listinfo/site-update

or send a blank email message to:

site-update-subscribe@bubbanfriends.org

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 09-14-2011, 02:13 PM
 
Default Options to stop processes that can't be killed -9 other than reboot

Mike Burger wrote:
>> On 13Sep2011 10:14, m.roth@5-cent.us <m.roth@5-cent.us> wrote:
>> | sunhux G wrote:
>> | <snip>
>> | > # lsof -a -p 7892
>> | > < above command just pauses/hangs there; it's been over 2 hrs
>> already
>> | >
>> | > # strace -p7892
>> | > Process 7892 attached - interrupt to quit
>> | > < it pauses there & Ctrl-C did not yield any response >
>> | > (have to do 'pkill -9 strace' to exit it)
>> | <snip>
>> | As a side note, did you try <crtl-D>?
>>
>> Sigh. Whatever for? At least ctrl-C sends SIGINT. ctlr-D just flushes

Sorry, I was under the impression strace was hung, and thought ctrl-d
might break out, short of killing the strace.
<snip>
> If you have a process that is stuck in a zombie mode and kill -9 isn't
> getting rid of it, you may need to do something with the parent process
> that spawned it in the first place.

Yeah, but too often, the parent process has gone, and the zombie's now got
a parent of 1.

mark

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 09-14-2011, 04:37 PM
"Mike Burger"
 
Default Options to stop processes that can't be killed -9 other than reboot

> Mike Burger wrote:
>> If you have a process that is stuck in a zombie mode and kill -9 isn't
>> getting rid of it, you may need to do something with the parent process
>> that spawned it in the first place.
>
> Yeah, but too often, the parent process has gone, and the zombie's now got
> a parent of 1.

That would stink, yeah. :-(

--
Mike Burger
http://www.bubbanfriends.org

Visit the Dog Pound II BBS
telnet://dogpound2.citadel.org or http://dogpound2.citadel.org

To be notified of updates to the web site, visit:

https://www.bubbanfriends.org/mailman/listinfo/site-update

or send a blank email message to:

site-update-subscribe@bubbanfriends.org

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 

Thread Tools




All times are GMT. The time now is 08:49 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org