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 > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 03-05-2009, 02:46 PM
Paul E Condon
 
Default to kill a process ?

I have a process that I see in ps, but cannot kill.
This is happening on a host running Lenny in a small LAN.

I run this to get a display of processes:
gq:/var/lib/mlocate# ps -Af | less
---------------

In this list I find this line:
root 9398 1 1 04:59 ? 00:03:11 /usr/bin/updatedb.mlocate
PID PPID

I issue the following command:
gq:/db2/chkpnt# kill -9 9398
--------------

I re-run ps as above. The process is still there! What can I do, short of
rebooting?

Note that the precess was spawned directly from PID==1 and that it is
running that rather special systen program updatedb.mlocate.

This process is blocking/stopping/whatever every night in the daily
cron. This does NOT happen on two other Lenny machines on the same
LAN. It is not leaving behind any locks that I can find. It is
building a new copy of mlocate.db that seems to be to be much too
large. (There os still plenty of space left on disk when it quits
adding bytes to its new version.) But beyond that, I nesitate to
report details of its misbehavior. Without the ability to kill, it is
very difficult to gather verified evidence.

I want to debug, and, perhaps, file a bug report. But first, I need to
clear the bad process so that I can get on with the debugging.

Is there a different Debian list for this? I am not a developer. I hesitate
to involve them in what could be a very stupid question.

Please help.

--
Paul E Condon
pecondon@mesanetworks.net


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 03-05-2009, 03:13 PM
Aneurin Price
 
Default to kill a process ?

On Thu, Mar 5, 2009 at 3:46 PM, Paul E Condon <pecondon@mesanetworks.net> wrote:
> I have a process that I see in ps, but cannot kill.
> This is happening on a host running Lenny in a small LAN.
>
> I run this to get a display of processes:
> gq:/var/lib/mlocate# ps -Af | less
> * * * * * * * * * ---------------
>
> In this list I find this line:
> root * * *9398 * * 1 *1 04:59 ? * * * *00:03:11 /usr/bin/updatedb.mlocate
> * * * * *PID * *PPID
>
> I issue the following command:
> gq:/db2/chkpnt# kill -9 9398
> * * * * * * *--------------
>
> I re-run ps as above. The process is still there! What can I do, short of
> rebooting?
>

Take a look at the output of 'ps 9398', and look at the STAT column.
If it's 'D', then Google for uninterruptible sleep.
I'm afraid I don't have anything specific to mlocate to point you to.

Nye


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 03-05-2009, 06:43 PM
Jörg-Volker Peetz
 
Default to kill a process ?

Paul E Condon wrote:
> I have a process that I see in ps, but cannot kill.
<snip>
>
> I issue the following command:
> gq:/db2/chkpnt# kill -9 9398

Maybe the process is stopped. Just try a

kill -CONT 9398

--
Regards,
Jörg-Volker.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 03-05-2009, 07:33 PM
Martin Kraus
 
Default to kill a process ?

On Thu, Mar 05, 2009 at 08:43:16PM +0100, Jörg-Volker Peetz wrote:
> Paul E Condon wrote:
> > I have a process that I see in ps, but cannot kill.
> <snip>
> >
> > I issue the following command:
> > gq:/db2/chkpnt# kill -9 9398

what is the status of that process? maybe it's stuck in a system call and than
it's unkillable.
mk


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 03-05-2009, 07:49 PM
Paul E Condon
 
Default to kill a process ?

On 2009-03-05_16:13:21, Aneurin Price wrote:
> On Thu, Mar 5, 2009 at 3:46 PM, Paul E Condon <pecondon@mesanetworks.net> wrote:
> > I have a process that I see in ps, but cannot kill.
> > This is happening on a host running Lenny in a small LAN.
> >
> > I run this to get a display of processes:
> > gq:/var/lib/mlocate# ps -Af | less
> > ?? ?? ?? ?? ?? ?? ?? ?? ?? ---------------
> >
> > In this list I find this line:
> > root ?? ?? ??9398 ?? ?? 1 ??1 04:59 ? ?? ?? ?? ??00:03:11 /usr/bin/updatedb.mlocate
> > ?? ?? ?? ?? ??PID ?? ??PPID
> >
> > I issue the following command:
> > gq:/db2/chkpnt# kill -9 9398
> > ?? ?? ?? ?? ?? ?? ??--------------
> >
> > I re-run ps as above. The process is still there! What can I do, short of
> > rebooting?
> >
>
> Take a look at the output of 'ps 9398', and look at the STAT column.
> If it's 'D', then Google for uninterruptible sleep.
> I'm afraid I don't have anything specific to mlocate to point you to.

It is STAT=='D', which is, some say, waiting for a response from a
disk device. It turns out that processes in this status can't be
killed and can't even be investigated in /proc since your process for
listing stuff in /proc will, itself, be force into STAT=='D' by the
act of trying to list the contents of /proc/<num>/.

For some reason, (not so) intelligent design perhaps, ps knows it is
in status 'D' and will display that fact without itself getting stuck
in status 'D'. But it will tell you this fact only if you ask using
BSD style options.

'man proc' does not describe any way of seeing the PIDs of processes that
have been spawned in the file tree of the spawning process. Is it true
that the spawning process does not keep an internal record of the processes
that it has spawned? If it did keep such a record, one might be able to
implement a signal that tells it to kill one of its child processes.

They
do die when it dies. How does that happen, if not during the cleanup during
the killing of the parent?

enough to not try to display status information on
these processes, only the fact that they exist, but not the very
useful fact that ps knows enough to NOT try to verify the suspected
status of the process, because it might be 'D'. But another way of
running ps will tell you that it is status 'D', only NOT that its
parent process in PID==1.

I think I do not want to kill PID==1. I would like to know what disk
device updatedb.mlocate was attempting to access when it got stuck. I
think that would be very useful debug information, but it's turning
out to be very hard to get at. Any ideas?

I call this a bug, but a very deep seated bug. I do know that I CAN
kill processes in status 'D' by killing the parent. Why is
updatedb.mlocate being spawned directly from initd? If there were an
intermediate process whose only function was to be killable, then I
could clear this condition by killing it. But that's not the way
Debian is currently set up. Again, any ideas?

Is there a way to instruct a process to hand off 'parentage' of a
process to another process? By parentage I mean give up the parent
position in relation to another process to a third process that
would become an 'adoptive parent'.

Lots of questions, please help.
--
Paul E Condon
pecondon@mesanetworks.net


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 03-05-2009, 10:44 PM
Paul E Condon
 
Default to kill a process ?

On 2009-03-05_21:33:48, Martin Kraus wrote:
> On Thu, Mar 05, 2009 at 08:43:16PM +0100, J?rg-Volker Peetz wrote:
> > Paul E Condon wrote:
> > > I have a process that I see in ps, but cannot kill.
> > <snip>
> > >
> > > I issue the following command:
> > > gq:/db2/chkpnt# kill -9 9398
>
> what is the status of that process? maybe it's stuck in a system call and than
> it's unkillable.
> mk

I've learned since my initial post that it is in status 'D' and is unkillable.
But I think this is a bug. In Debian? In procfs? In Linux? In Unix? I don't
know which, but surely a system as sophisticated as Debian/GNU/Linux should
not be so vulnerable to the vagaries of hard disk devices. Because it is in
status 'D' , it is incapable of reporting any diagnostic information, like
What HD? and What driver call? I'm learning a lot on this quest.

--
Paul E Condon
pecondon@mesanetworks.net


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 03-06-2009, 06:48 PM
Jörg-Volker Peetz
 
Default to kill a process ?

Maybe the output of

lsof | grep updatedb.mlocate

can give a hint which disk device this process is trying to access.
--
Regards,
Jörg-Volker.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 02:41 AM.

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