Unable to kill processes using either Ctrl-C or 'kill'
michaelsprivate at gmail.com
Mon Jun 4 04:12:46 UTC 2018
On Mon, Jun 4, 2018 at 5:51 AM, Shane Ambler <FreeBSD at shaneware.biz> wrote:
> On 04/06/2018 04:33, Michael Schuster wrote:
> > most likely, being root or equivalent won't help in this case. If a
> > processes owner cannot kill it (using -9, which cannot be caught) that
> > implies that the process is hung in the kernel (signal delivery happens
> > when a process leaves kernel context).
> I this situation, is there any way to find what function the hung
> process is in? Attach and backtrace it?
> While I know I can attach lldb/gdb to a running process, I can't seem to
> find a way to interrupt a non-killable process to get control and see
> where it is or what it is doing.
I don't know enough about attaching a debugger to a running process to be
able to answer this authoritatively (if that's an English word ... :-));
I'd assume that this can only happen when a process is executing in user
space or when it's returning from a system call. Since the proceiss in
question is not doing either, that probably won't work.
> and... I just thought I should be looking at dtrace.
DTrace works event-based. If the process that's "hung" is actually caught
in some kind of busy-waiting loop, DTrace may help you to gain some insight
into what's going on. If, OTOH, it's waiting on some synchronisation
mechanism, DTrace is probably not the tool to use here (although it may
help in establishing which kind of problem you're seeing).
recursion, n: see 'recursion'
More information about the freebsd-questions