kern/164705: inability to terminate process in D state
avg at icyb.net.ua
Thu Feb 2 09:40:12 UTC 2012
The following reply was made to PR kern/164705; it has been noted by GNATS.
From: Andriy Gapon <avg at icyb.net.ua>
To: bug-followup at FreeBSD.org, eugene at zhegan.in
Subject: Re: kern/164705: inability to terminate process in D state
Date: Thu, 02 Feb 2012 11:16:56 +0200
Because you used words "completely ridiculous" in your bug report, I have to ask
you what solution a genius like you can propose for a process which is stuck
inside a system call (that is, in kernel).
Now to techical side. FreeBSD has no problem killing processes which execute in
userland. When a process is executing in kernel (in a system call), it is
impossible to kill the process in a completely safe/clean fashion without
affecting/corrupting internal kernel state.
So bad news is that there will not be a universal kill command that can kill
Good news is that processes should never get stuck forever inside the kernel.
Every time this happens it means that there is a (potentially new) bug in
kernel, which should be properly reported and then hopefully fixed.
So you will have to report concrete bugs with concrete diagnostics.
See PR 164526 for a reference.
P.S. In my explanation I've omitted techicalities of kill sending a signal and
how the signal is delivered to its target process.
More information about the freebsd-bugs