From owner-freebsd-stable@FreeBSD.ORG Thu Aug 30 06:43:52 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9B2B5106564A for ; Thu, 30 Aug 2012 06:43:52 +0000 (UTC) (envelope-from mattblists@icritical.com) Received: from mail2.icritical.com (mail2.icritical.com [212.57.248.50]) by mx1.freebsd.org (Postfix) with SMTP id E43D18FC15 for ; Thu, 30 Aug 2012 06:43:51 +0000 (UTC) Received: (qmail 12845 invoked from network); 30 Aug 2012 06:43:49 -0000 Received: from localhost (127.0.0.1) by mail2.icritical.com with SMTP; 30 Aug 2012 06:43:49 -0000 Received: (qmail 12836 invoked by uid 599); 30 Aug 2012 06:43:49 -0000 Received: from unknown (HELO PDC002.icritical.int) (212.57.254.146) by mail2.icritical.com (qpsmtpd/0.28) with ESMTP; Thu, 30 Aug 2012 07:43:49 +0100 Message-ID: <503F0BA2.6060107@icritical.com> Date: Thu, 30 Aug 2012 07:43:46 +0100 From: Matt Burke User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:14.0) Gecko/20120812 Thunderbird/14.0 MIME-Version: 1.0 To: Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-TLS-Incoming: YES X-Virus-Scanned: by iCritical at mail2.icritical.com Subject: Killing processes from DDB X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 06:43:52 -0000 Is it possible to forcibly kill process from DDB which are unkillable from userland? My understanding is the 'kill' command is effectively the same as the userland version, so perhaps a process could be terminated by invoking an OOM handler or something? I just had a VirtualBox instance crash and hog 100% CPU on my desktop: mattb 36939 100.0 13.6 2577328 2276108 ?? I 6:13AM 2:28.44 /usr/local/lib/virtualbox/VirtualBox I kill -9 it mattb 36939 100.0 13.6 2577328 2275804 ?? T 6:13AM 3:10.89 /usr/local/lib/virtualbox/VirtualBox Note it's moved to 'stop' state for some reason, yet is still eating 100% cpu time # procstat -k 36939 PID TID COMM TDNAME KSTACK 36939 227509 VirtualBox - 36939 227836 VirtualBox - mi_switch thread_suspend_switch thread_single exit1 sigexit postsig ast doreti_ast Could this be the trigger - 9.0 binary (from pkgng) against 9.1? $ procstat -b 1 36939 PID COMM OSREL PATH 1 init 901000 /sbin/init 36939 VirtualBox 900044 /usr/local/lib/virtualbox/VirtualBox I couldn't even kill it with "dtrace -n 'pid$target:::' -p 36939 -l" - which so far has proven reliable in killing anything: # dtrace -n 'pid$target:::' -p 2021 -l <--- unimportant proc Bus error: 10 (core dumped) # dtrace -n 'pid$target:::' -p 2044 -l <--- unimportant proc Bus error: 10 (core dumped) # dtrace -n 'pid$target:::' -p 36939 -l <--- virtualbox hangs dtrace ^C I couldn't truss the process or use gcore to get a dump, so my only option was a reboot. Does anyone have any suggestions on a course of action in case this happens again? I can't get a kernel dump since the machine doesn't have enough swap (small SSDs) Thanks -- The information contained in this message is confidential and intended for the addressee only. If you have received this message in error, or there are any problems with its content, please contact the sender. iCritical is a trading name of Critical Software Ltd. Registered in England: 04909220. Registered Office: IC2, Keele Science Park, Keele, Staffordshire, ST5 5NH. This message has been scanned for security threats by iCritical. www.icritical.com