From owner-freebsd-questions@freebsd.org Mon Jun 4 04:12:46 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FC1CFEB36A for ; Mon, 4 Jun 2018 04:12:46 +0000 (UTC) (envelope-from michaelsprivate@gmail.com) Received: from mail-qk0-x242.google.com (mail-qk0-x242.google.com [IPv6:2607:f8b0:400d:c09::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ECBFF6F28C for ; Mon, 4 Jun 2018 04:12:45 +0000 (UTC) (envelope-from michaelsprivate@gmail.com) Received: by mail-qk0-x242.google.com with SMTP id y4-v6so5949521qka.5 for ; Sun, 03 Jun 2018 21:12:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Ya2LFuYq0SG33H5S9NJiM67gTXTQVPyGlOaz2isQQ8o=; b=YTP2JLSgANfLjeT9Ts1KcjWTMb6qCS1a9y/V5noEd7jKi7sLhrIkmqP76JeemJGDz2 OeBJoOmc+0vHXyggJ0vpiZDAM+oZq8IeMLi7c91DoIK4YZbD6XcwtE2rTP1YWq9KqDEv EJX9nrcgKkBit9SX3XpMlpGvMtjQ9agWiZZ/kPlFv/OTQrRQ7BXoVsRojLdmhDJZuS9N hp4fvgMZiiP5WNKLE6SqhQVIpR14nXDnkr7Bmf0KR4ZGG/b0LO9GWdhXPzT6mKkjgClE BEoYV5nNrEqzDowT3QQvAZI8vrpelCKGiP2q6lfkXSW/tnDX2ickR79Yl5zfqd15gl8a OB7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Ya2LFuYq0SG33H5S9NJiM67gTXTQVPyGlOaz2isQQ8o=; b=hsvclEf/osL7UXLpXR9VcgTPzUChOpNMLC5uUpyaZDWrBG/pkaDS3goFQPbkidXvyf afXAvSvXiQVP0DyWap2NY3z42SdfZS5FtYwKf26LP9GylRsm6nfE/3IirVt9UuJKUcP4 PIIHiiHp0PL98lgDBMJgZ4HuCMfA052PmFhIlSQZE1++VTFADrYVYdRSZ1L+htXA+htW 8IVeEINNC47BLuBQHxyNkS6wHUX85fCVrgSJCuMzXaqbukdYaj6rfExFVGFIZAZ76ms9 Ig0mgqTzJcxxWL8zHRbrAeQ4PeGWRRr+t42aeFTRe41rL7qRKCKh/gg6e9wLO+TgPEF8 iuPQ== X-Gm-Message-State: APt69E3aFQmtWVhjjHCdU1E7UBY2TcVZwfpR6ZZX9VASFlhFPiQN7BRc GbJEHtZ+6tBMb3QhcDkfmkPMjweZFjUHJCU+n54= X-Google-Smtp-Source: ADUXVKJubvtLlWBFshq5bwTZX5qI2IuQ3GnP0ayMBDHJN52jZT96YTs5dO0m4stW0IfFqx0dENGn9QpivNwrOFF+eCg= X-Received: by 2002:a37:3b85:: with SMTP id i127-v6mr18597797qka.165.1528085565496; Sun, 03 Jun 2018 21:12:45 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a0c:f043:0:0:0:0:0 with HTTP; Sun, 3 Jun 2018 21:12:25 -0700 (PDT) In-Reply-To: <8286a5eb-9bc7-66a0-f84e-da49c12c1b07@ShaneWare.Biz> References: <9a7f62c4-80aa-7eea-91ec-6712612a0451@pobox.com> <8286a5eb-9bc7-66a0-f84e-da49c12c1b07@ShaneWare.Biz> From: Michael Schuster Date: Mon, 4 Jun 2018 06:12:25 +0200 Message-ID: Subject: Re: Unable to kill processes using either Ctrl-C or 'kill' To: Shane Ambler Cc: freeBSD Mailing List Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2018 04:12:46 -0000 On Mon, Jun 4, 2018 at 5:51 AM, Shane Ambler 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'