Re: cannot kill process with kill -9

2009-04-10 Thread kyanh
On Fri, 10 Apr 2009 15:10:04 +0200
Ruben de Groot  wrote:

> On Thu, Apr 09, 2009 at 01:26:51PM -0600, Joshua Gimer typed:
> > You might also find a little bit information about what the
> > process is waiting on by attaching to it with strace (in ports
> > under devel) (strace -p PID).
> 
> why would you install strace from ports? truss does the same job.
> 

Great tips, Ruben! `strace` requires /proc and I am too lazay to mount `procfs` 
after installing `strace` ports. (In fact I installed `strace` then did 
nothing.) Going to `pkg_delete starce` now :P

> 
> 
> > On Thu, Apr 9, 2009 at 5:47 AM, Eray Aslan
> >  wrote:
> > > On Thu, Apr 09, 2009 at 09:41:31AM +0200, Pieter Donche wrote:
> > >> I have a mount_nfs process that refuses to get killed :
> > >> # ps -jaxw | grep mount
> > >> root ? 60342 ? ? 1 60289 60289 ? ?0 D ? ? ?? ? ?0:00.00
> > >> mount_nfs
> > > [...]
> > >> How to I get this process killed?
> > >
> > > reboot. ?You can't kill a process with a D flag. ?Google for
> > > uninterruptible sleep.
> > >
> > > --

-- 
Ky Anh, Huynh
Homepage: http://viettug.org/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: cannot kill process with kill -9

2009-04-10 Thread Ruben de Groot
On Thu, Apr 09, 2009 at 01:26:51PM -0600, Joshua Gimer typed:
> You might also find a little bit information about what the process is
> waiting on by attaching to it with strace (in ports under devel)
> (strace -p PID).

why would you install strace from ports? truss does the same job.

Ruben


> On Thu, Apr 9, 2009 at 5:47 AM, Eray Aslan  wrote:
> > On Thu, Apr 09, 2009 at 09:41:31AM +0200, Pieter Donche wrote:
> >> I have a mount_nfs process that refuses to get killed :
> >> # ps -jaxw | grep mount
> >> root ? 60342 ? ? 1 60289 60289 ? ?0 D ? ? ?? ? ?0:00.00 mount_nfs
> > [...]
> >> How to I get this process killed?
> >
> > reboot. ?You can't kill a process with a D flag. ?Google for
> > uninterruptible sleep.
> >
> > --
> > Eray
> > ___
> > freebsd-questions@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> > To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
> >
> 
> 
> 
> -- 
> Thx
> Joshua Gimer
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: cannot kill process with kill -9

2009-04-09 Thread Joshua Gimer
You might also find a little bit information about what the process is
waiting on by attaching to it with strace (in ports under devel)
(strace -p PID).

On Thu, Apr 9, 2009 at 5:47 AM, Eray Aslan  wrote:
> On Thu, Apr 09, 2009 at 09:41:31AM +0200, Pieter Donche wrote:
>> I have a mount_nfs process that refuses to get killed :
>> # ps -jaxw | grep mount
>> root   60342     1 60289 60289    0 D     ??    0:00.00 mount_nfs
> [...]
>> How to I get this process killed?
>
> reboot.  You can't kill a process with a D flag.  Google for
> uninterruptible sleep.
>
> --
> Eray
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
>



-- 
Thx
Joshua Gimer
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: cannot kill process with kill -9

2009-04-09 Thread Jacques Manukyan

Eray Aslan wrote:

On Thu, Apr 09, 2009 at 09:41:31AM +0200, Pieter Donche wrote:
  

I have a mount_nfs process that refuses to get killed :
# ps -jaxw | grep mount
root   60342 1 60289 602890 D ??0:00.00 mount_nfs 

[...] 
  

How to I get this process killed?



reboot.  You can't kill a process with a D flag.  Google for
uninterruptible sleep


There is a rare exception that doesn't always work. But you can find 
processes that have locked onto that mount point and kill those. Then 
try unmounting or killing that NFS mount.


Get lsof in /usr/ports/sysutils/lsof and see what's keeping that mount 
point open. Then kill those processes.


But again, this may not work. The only way to release processes marked 
with a D flag is to reboot.


-- Jacques Manukyan

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: cannot kill process with kill -9

2009-04-09 Thread Eray Aslan
On Thu, Apr 09, 2009 at 09:41:31AM +0200, Pieter Donche wrote:
> I have a mount_nfs process that refuses to get killed :
> # ps -jaxw | grep mount
> root   60342 1 60289 602890 D ??0:00.00 mount_nfs 
[...] 
> How to I get this process killed?

reboot.  You can't kill a process with a D flag.  Google for
uninterruptible sleep.

-- 
Eray
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


cannot kill process with kill -9

2009-04-09 Thread Pieter Donche

FreeBSD 7:
I have a mount_nfs process that refuses to get killed :
# ps -jaxw | grep mount
root   60342 1 60289 602890 D ??0:00.00 mount_nfs 
fenix.cmi.ua.ac.be:/opt /home/nfs/fenix/opt

This was called from a script, run bij root cron during the night
(does an NFS mount of a file system of a remote system and makes a backup)
I killed the parent processes: the shell executing the script, the script,
the mount process that calls mount_nfs, leaving me with that last
remaining process:

# kill -9 60342   doesn't do anything
# kill -9 -60289  (60289 is the PGID, see man kill)
doesn't do anything either

How to I get this process killed?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"