Date: Mon, 4 Jun 2018 06:12:25 +0200 From: Michael Schuster <michaelsprivate@gmail.com> To: Shane Ambler <FreeBSD@shaneware.biz> Cc: freeBSD Mailing List <freebsd-questions@freebsd.org> Subject: Re: Unable to kill processes using either Ctrl-C or 'kill' Message-ID: <CADqw_gL4QGyVjbfQJ7J5OxE0dufAcVOZ17cUSFiTSx5UP_Jf2g@mail.gmail.com> In-Reply-To: <8286a5eb-9bc7-66a0-f84e-da49c12c1b07@ShaneWare.Biz> References: <9a7f62c4-80aa-7eea-91ec-6712612a0451@pobox.com> <CAOZUxFu7LkafvT30H_ZZG6uJ-CkU537RD=dSHcEP=UVRgOdrZw@mail.gmail.com> <CADqw_gLwsSKT3w8iyY7d9%2Bisqyt7YH4CvifRL2WG54OQdvK7Xw@mail.gmail.com> <8286a5eb-9bc7-66a0-f84e-da49c12c1b07@ShaneWare.Biz>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jun 4, 2018 at 5:51 AM, Shane Ambler <FreeBSD@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). HTH Michael -- Michael Schuster http://recursiveramblings.wordpress.com/ recursion, n: see 'recursion'
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADqw_gL4QGyVjbfQJ7J5OxE0dufAcVOZ17cUSFiTSx5UP_Jf2g>